:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f093fb;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(20px);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, var(--bg-dark), var(--bg-darker));
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography & Links */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    animation: slideInLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, backgroundPan 5s linear infinite;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--text-main);
    margin-bottom: 1rem;
    animation: slideInLeft 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes backgroundPan {
    to { background-position: 200% center; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 15px rgba(0, 242, 254, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 242, 254, 0.5); }
    100% { box-shadow: 0 0 15px rgba(0, 242, 254, 0.2); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
}

.logoImg {
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(0,242,254,0.6));
    animation: float 4s ease-in-out infinite;
}

.navLinks {
    display: flex;
    gap: 2rem;
}

.navLinks a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.navLinks a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.navLinks a:hover {
    color: var(--text-main);
}

.navLinks a:hover::after {
    width: 100%;
}

/* Layout */
.mainContent {
    flex: 1;
    padding: 4rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Glassmorphism Cards */
.glassCard, .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 3rem;
    width: 100%;
    max-width: 900px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.glassCard::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.glassCard:hover::before {
    opacity: 1;
}

/* Buttons */
.actionBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.actionBtn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.actionBtn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
}

.actionBtn:hover::after {
    left: 100%;
}

/* Grid System */
.stepGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
}

.stepCard {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: scaleIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.stepCard:nth-child(1) { animation-delay: 0.1s; }
.stepCard:nth-child(2) { animation-delay: 0.3s; }
.stepCard:nth-child(3) { animation-delay: 0.5s; }
.stepCard:nth-child(4) { animation-delay: 0.7s; }

.stepCard:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 242, 254, 0.3);
}

.stepCard h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.stepNumber {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

/* Timeline */
.timelineContainer {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timelineContainer::after {
    content: '';
    position: absolute;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    top: 0; bottom: 0; left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timelineProgress {
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    top: 0; left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    height: 0%;
    z-index: 0;
    transition: height 0.2s ease-out;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

.timelineItem {
    padding: 10px 50px;
    position: relative;
    width: 50%;
    perspective: 1000px;
}

.timelineItem::after {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    right: -12px;
    background-color: var(--bg-dark);
    border: 4px solid rgba(255, 255, 255, 0.2);
    top: 50%; transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.5s ease;
}

.timelineItem.visible::after {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.8);
    background-color: var(--primary);
}

.left { left: 0; opacity: 0; transform: translateX(-50px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.right { left: 50%; opacity: 0; transform: translateX(50px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.right::after { left: -12px; }

.timelineItem.left.visible { opacity: 1; transform: translateX(0); }
.timelineItem.right.visible { opacity: 1; transform: translateX(0); }

.timelineContent {
    padding: 2rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: transform 0.3s ease;
    overflow: hidden; /* Prevent text overflow */
    position: relative;
}

.timelineContent h2 {
    margin-top: 0; /* Fix header crossing borders */
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.timelineItem:hover .timelineContent {
    transform: scale(1.03);
    border-color: rgba(0, 242, 254, 0.3);
}

/* Chat Assistant */
.helpBtn {
    position: fixed;
    bottom: 40px; right: 40px;
    width: 65px; height: 65px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 32px; font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(240, 147, 251, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    animation: glowPulse 2s infinite;
}

.helpBtn:hover { transform: scale(1.15) rotate(10deg); }

.helpPopup {
    display: none;
    position: fixed;
    bottom: 120px; right: 40px;
    width: 380px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 25px;
    z-index: 999;
    flex-direction: column;
}

.helpPopup.active {
    display: flex;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.helpHeader {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.helpHeader h3 {
    margin: 0; color: var(--text-main); font-size: 1.2rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.closeBtn {
    cursor: pointer; color: var(--text-muted); font-size: 1.2rem;
    transition: color 0.3s;
}
.closeBtn:hover { color: #ef4444; }

.aiChatBox {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 15px;
    display: flex; flex-direction: column; gap: 15px;
}

.aiChatBox::-webkit-scrollbar { width: 6px; }
.aiChatBox::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.chatMsg {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem; line-height: 1.5;
    max-width: 85%;
    animation: fadeInUp 0.3s ease-out forwards;
}

.msgAi {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    color: var(--text-main);
}

.msgUser {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-bottom-right-radius: 4px;
    color: white;
    align-self: flex-end;
}

.chatInputArea { display: flex; gap: 10px; }

.chatInput {
    flex: 1;
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.chatInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0,242,254,0.2);
}

.chatSendBtn {
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    border: none; border-radius: 30px;
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}

.chatSendBtn:hover {
    transform: scale(1.05); box-shadow: 0 5px 15px rgba(0,242,254,0.4);
}

/* Forms & Selects */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300f2fe%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem top 50% !important;
    background-size: 0.65rem auto !important;
}

select option {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .hamburger {
        display: flex;
    }

    .navLinks {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        padding: 2rem;
    }

    .navLinks.active {
        right: 0;
    }

    .navLinks a {
        font-size: 1.2rem;
    }

    .timelineContainer::after { left: 31px; }
    .timelineProgress { left: 31px; } /* Fix neon light alignment */
    .timelineItem { width: 100%; padding-left: 70px; padding-right: 20px; }
    .timelineItem::after { left: 19px; }
    .right { left: 0%; }
    
    .helpBtn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .helpPopup { 
        width: 90%; 
        right: 5%; 
        bottom: 90px;
        padding: 20px;
    }

    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.6rem !important; }
    
    .glassCard, .glass-panel { 
        padding: 2rem 1.2rem; 
        border-radius: 20px;
    }

    .mainContent {
        padding: 2rem 1.5rem;
    }
}

/* --- Constituency Revamp --- */
.constituency-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .constituency-container {
        grid-template-columns: 1fr;
    }
}

.selection-panel {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.constituency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.constituency-card {
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.constituency-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.constituency-card .c-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.constituency-card .c-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 12px;
}

.type-assembly { background: rgba(0, 242, 254, 0.1); color: #00f2fe; border: 1px solid rgba(0, 242, 254, 0.2); }
.type-parliamentary { background: rgba(161, 74, 245, 0.1); color: #a14af5; border: 1px solid rgba(161, 74, 245, 0.2); }

.constituency-card .c-info-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    margin-bottom: 2px;
}

.constituency-card .c-rep {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
}

.constituency-card .c-party {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

.ai-badge {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.65rem;
    color: #ff00ff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#googleMapContainer {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}