:root {
    --bg-color: #060b18;
    --surface-color: #111827;
    --surface-hover: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-vibrant: linear-gradient(135deg, #4285F4 0%, #6366f1 50%, #a855f7 100%);
    --border-color: rgba(255, 255, 255, 0.07);
    --glow-primary: rgba(99, 102, 241, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* Floating positioning */
    width: 90%;
    max-width: 1200px;
    margin: 16px auto;
    /* Centered visually */
    padding: 0.7rem 1.8rem;
    position: fixed;
    /* Stick to viewport */
    top: 0;
    left: 0;
    right: 0;

    /* Glassmorphism Effect */
    background: rgba(6, 11, 24, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;

    /* Rounded & Floating Style */
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: all 0.3s ease;
}

.navbar:hover {
    background: rgba(30, 41, 59, 0.8);
    transform: translateY(2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15);
    /* Subtle glow on hover */
    border-color: rgba(99, 102, 241, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* --- BUTTONS --- */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-vibrant, var(--gradient-primary));
    color: white !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55);
}

.btn-secondary {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    border: 1px solid var(--border-color);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent-color);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* --- LAYOUTS & GRIDS --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2,
.section-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* --- FOOTER --- */
.footer {
    background: #020617;
    /* Matches body */
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5rem;
    font-size: 0.9rem;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-brand {
    max-width: 350px;
}

.footer-brand .logo {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand .logo span {
    color: #4285F4;
    /* Google Blue */
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-icon:hover {
    background: rgba(66, 133, 244, 0.1);
    border-color: #4285F4;
    transform: translateY(-3px);
}

.footer-links-group {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #4285F4;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.built-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dots {
    display: flex;
    gap: 4px;
    margin: 0 4px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.blue {
    background-color: #4285F4;
}

.dot.red {
    background-color: #EA4335;
}

.dot.yellow {
    background-color: #FBBC05;
}

.dot.green {
    background-color: #34A853;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }

    .footer-links-group {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* --- ANIMATIONS & RESPONSIVE --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Can be toggled with JS later */
    }
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--surface-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    font-size: 1.2rem;
}


/* --- PRELOADER (Boot Animation) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #020617;
    /* Deepest black/slate */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.icon-wrapper {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.code-symbol {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: #6366f1;
    /* Indigo base */
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    animation: glitch 3s infinite;
    display: inline-block;
}

.loading-bar {
    width: 250px;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7, #22d3ee);
    animation: newLoadProgress 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
    border-radius: 6px;
}

.loading-text {
    font-family: 'Courier New', monospace;
    color: #94a3b8;
    font-size: 1rem;
    letter-spacing: 1px;
    height: 20px;
    /* Prevent layout shift */
    line-height: 20px;
}

.sub-text {
    font-family: 'Inter', sans-serif;
    color: #475569;
    font-size: 0.8rem;
    margin-top: -10px;
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        color: #6366f1;
    }

    20% {
        transform: translate(-2px, 2px);
        color: #a855f7;
    }

    40% {
        transform: translate(-2px, -2px);
        color: #22d3ee;
    }

    60% {
        transform: translate(2px, 2px);
        color: #6366f1;
    }

    80% {
        transform: translate(2px, -2px);
        color: #a855f7;
    }

    100% {
        transform: translate(0);
        color: #22d3ee;
    }
}

@keyframes newLoadProgress {
    0% {
        width: 5%;
    }

    30% {
        width: 45%;
    }

    70% {
        width: 85%;
    }

    100% {
        width: 100%;
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* --- BOOT ANIMATION (Preloader) OVERRIDES --- */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: #020617;
    /* Deep Slate/Black */
    z-index: 99999;
    /* Ensure it's on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* GIF Loader Styling */
.boot-gif {
    /* Adjust size as needed based on your GIF */
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
    /* Glow */
    animation: fadeIn 0.5s ease-out;
}


/* LOADING BAR */
.loading-bar {
    width: 250px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #818cf8, #c084fc, #38bdf8);
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.8);
    border-radius: 4px;
    animation: loadBar 3s ease-in-out forwards;
}

@keyframes loadBar {
    0% {
        width: 0%;
    }

    20% {
        width: 15%;
    }

    50% {
        width: 45%;
    }

    75% {
        width: 80%;
    }

    100% {
        width: 100%;
    }
}

.loading-text {
    font-family: 'Courier New', monospace;
    color: #94a3b8;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulseText 1.5s infinite;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Hide old elements just in case they exist in DOM or old CSS interferes */
.icon-scene,
.code-symbol {
    display: none !important;
}


/* --- BOOT ANIMATION FIX (CSS Tech Spinner) --- */
/* Replacing broken GIF with reliable CSS animation */
.boot-gif {
    display: none !important;
}

.tech-loader {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rotating outer ring */
.tech-loader::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border-top: 2px solid #6366f1;
    border-right: 2px solid transparent;
    animation: spin 2s linear infinite;
}

/* Inner pulsing core */
.inner-circle {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseCore 1.5s ease-in-out infinite alternate;
    opacity: 0.8;
}

/* Scanning radar effect */
.scanner {
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border-bottom: 2px solid #a855f7;
    border-left: 2px solid transparent;
    animation: spinReverse 3s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulseCore {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.9;
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}


/* --- BOOT ANIMATION: RESTORED ORIGINAL --- */
/* Un-hide the original glitch elements */
.icon-scene,
.code-symbol {
    display: flex !important;
}

/* Hide the GIF/Tech spinner artifacts */
.boot-gif,
.tech-loader {
    display: none !important;
}

/* ORIGINAL ICON ANIMATIONS */
.icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-scene {
    font-size: 4rem;
    font-weight: 800;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    min-width: 150px;
    /* Prevent layout shift */
    display: flex;
    justify-content: center;
}

.code-symbol {
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.6));
    animation: glitch 0.4s infinite alternate;
}

@keyframes glitch {
    0% {
        transform: translate(0);
        text-shadow: 2px 2px #ff00c1, -2px -2px #00fff9;
    }

    25% {
        transform: translate(-2px, 2px);
    }

    50% {
        transform: translate(2px, -2px);
        text-shadow: -2px 2px #ff00c1, 2px -2px #00fff9;
    }

    75% {
        transform: translate(0);
        text-shadow: none;
    }

    100% {
        transform: translate(0);
        text-shadow: none;
    }
}

/* --- GDG BUDDY ANIMATION --- */
.buddy-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    height: 90px;
}

.buddy-head {
    width: 70px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
    animation: floatBuddy 6s ease-in-out infinite;
    z-index: 10;
}

/* Antenna Stack */
.buddy-antenna {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 18px;
    background: #94a3b8;
    z-index: -1;
}

.antenna-ball {
    width: 10px;
    height: 10px;
    background: #22d3ee;
    /* Cyan Glow */
    border-radius: 50%;
    position: absolute;
    top: -10px;
    left: -3.5px;
    box-shadow: 0 0 15px #22d3ee;
    animation: pulseAntenna 1.5s infinite alternate;
}

/* Face Details */
.buddy-face {
    position: relative;
    top: 18px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.buddy-eye {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    animation: blinkEye 4s infinite 2s;
    /* Blink every 4s, offset start */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.buddy-mouth {
    position: absolute;
    bottom: -12px;
    width: 10px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    transition: width 0.3s;
}

/* Hover Response (Optional: JS can trigger this too) */
.buddy-head:hover .buddy-mouth {
    width: 18px;
    /* Smile gets wider */
    background: #10b981;
    /* Turns green */
}

/* Floating Animation */
@keyframes floatBuddy {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulseAntenna {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 20px #22d3ee;
    }
}

@keyframes blinkEye {

    0%,
    9%,
    11%,
    19%,
    100% {
        transform: scaleY(1);
    }

    10% {
        transform: scaleY(0.1);
    }

    20% {
        transform: scaleY(0.1);
    }
}

/* --- CARD ANIMATIONS (Scroll Reveal) --- */
.feature-card,
.event-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* While visible, we want to allow hover effects which might use faster transitions.
   However, the INITIAL transition to .visible needs to be slow. 
   Creating a conflict with hover transitions defined elsewhere (like events.css). 
   Let's prioritize the entry transition for the relevant properties. 
*/

.feature-card.visible,
.event-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Force the long duration when NOT hovered to ensure entry is smooth */
.event-card:not(:hover) {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease-out, box-shadow 0.3s ease;
}

/* Staggered Delays - Only apply to initial reveal */
.feature-card:not(.visible):nth-child(1),
.event-card:not(.visible):nth-child(1) {
    transition-delay: 0.1s;
}

.feature-card:not(.visible):nth-child(2),
.event-card:not(.visible):nth-child(2) {
    transition-delay: 0.2s;
}

.feature-card:not(.visible):nth-child(3),
.event-card:not(.visible):nth-child(3) {
    transition-delay: 0.3s;
}

.feature-card:not(.visible):nth-child(4),
.event-card:not(.visible):nth-child(4) {
    transition-delay: 0.4s;
}

.feature-card:not(.visible):nth-child(5),
.event-card:not(.visible):nth-child(5) {
    transition-delay: 0.5s;
}

.feature-card:not(.visible):nth-child(6),
.event-card:not(.visible):nth-child(6) {
    transition-delay: 0.6s;
}

/* Ensure hover effects work nicely with the transition */
.feature-card:hover,
.event-card:hover {
    transform: translateY(-5px);
    transition-delay: 0s;
    /* No delay on hover */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Restore faster transition for hover interaction */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}