:root {
    --bg-dark: #050510;
    --primary-blue: #00f0ff;
    --secondary-purple: #9d00ff;
    --text-main: #e0e0e0;
    --glass-bg: rgba(15, 15, 30, 0.6);
    --glass-border: rgba(0, 240, 255, 0.2);
    --neon-blue: 0 0 10px #00f0ff, 0 0 20px #00f0ff, 0 0 40px #00f0ff;
    --neon-purple: 0 0 10px #9d00ff, 0 0 20px #9d00ff, 0 0 40px #9d00ff;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    position: relative;
}

body.loading {
    overflow: hidden;
    /* Prevent scrolling while loading */
}

/* --- Pre-Loader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #020205;
    /* Even darker for drama */
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

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

.preloader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 0, 40, 0.4) 0%, transparent 60%);
    z-index: 1;
}

.preloader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(1);
    transition: transform 0.8s ease-in-out;
}

#preloader.fade-out .preloader-content {
    transform: scale(0.85);
    /* zoom out effect */
}

/* Circuit Ring */
.circuit-ring {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 240, 255, 0.3);
    border-top: 2px solid var(--primary-blue);
    border-bottom: 2px solid var(--secondary-purple);
    animation: spin 6s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.ring-inner {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px dotted rgba(157, 0, 255, 0.5);
    border-right: 2px solid var(--secondary-purple);
    border-left: 2px solid var(--primary-blue);
    animation: spin-reverse 4s linear infinite;
}

/* Microchips on Ring */
.chip {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--primary-blue);
    box-shadow: 0 0 10px var(--primary-blue);
}

.loader-chip-1 {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.loader-chip-2 {
    bottom: 20%;
    right: -6px;
}

.loader-chip-3 {
    bottom: 20%;
    left: -6px;
}

/* Text Animation */
.loader-text-container {
    position: relative;
}

.loader-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: transparent;
    /* initially transparent */
    letter-spacing: 5px;
    white-space: nowrap;
}

.letter {
    display: inline-block;
    color: #fff;
    opacity: 0;
    text-shadow: var(--neon-blue);
    animation: appear 0.1s forwards;
}

/* Assign delay to each letter via nth-child (approximate) */
.loader-text .letter:nth-child(1) {
    animation-delay: 0.2s;
}

.loader-text .letter:nth-child(2) {
    animation-delay: 0.3s;
}

.loader-text .letter:nth-child(3) {
    animation-delay: 0.4s;
}

.loader-text .letter:nth-child(4) {
    animation-delay: 0.5s;
}

.loader-text .letter:nth-child(5) {
    animation-delay: 0.6s;
}

.loader-text .letter:nth-child(6) {
    animation-delay: 0.7s;
}

.loader-text .letter:nth-child(7) {
    animation-delay: 0.8s;
}

.loader-text .letter:nth-child(8) {
    animation-delay: 0.9s;
}

.loader-text .letter:nth-child(9) {
    animation-delay: 1.0s;
}

/* space */
.loader-text .letter:nth-child(10) {
    animation-delay: 1.1s;
}

.loader-text .letter:nth-child(11) {
    animation-delay: 1.2s;
}

.loader-text .letter:nth-child(12) {
    animation-delay: 1.3s;
}

/* Pulse whole text after letters appear */
.loader-text-container.pulsing .loader-text {
    animation: pulse-glow 1.5s infinite alternate;
}

/* Sparkles (simple line traveling) */
.loader-sparkles {
    position: absolute;
    top: 50%;
    left: -20px;
    width: 10px;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 15px 3px var(--primary-blue);
    opacity: 0;
}

.loader-text-container.pulsing .loader-sparkles {
    animation: spark-travel 2s infinite ease-in-out;
}

.loader-subtitle {
    margin-top: 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--primary-blue);
    letter-spacing: 2px;
    opacity: 0;
    animation: blink 1s infinite alternate 1.5s;
}

/* Keyframes */
@keyframes appear {
    to {
        opacity: 1;
    }
}

@keyframes pulse-glow {
    0% {
        text-shadow: var(--neon-blue);
    }

    100% {
        text-shadow: var(--neon-purple);
        color: #e0e0e0;
    }
}

@keyframes spark-travel {
    0% {
        left: -20px;
        opacity: 0;
    }

    20% {
        opacity: 1;
        width: 40px;
    }

    80% {
        opacity: 1;
        width: 10px;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes blink {
    to {
        opacity: 1;
    }
}


h1,
h2,
h3,
.logo,
.btn {
    font-family: 'Orbitron', sans-serif;
}

/* Background Effects */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow-sphere {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--primary-blue), transparent);
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--secondary-purple), transparent);
}

.glow-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, #ff0055, transparent);
    opacity: 0.15;
}

/* Floating Elements */
.floating-chip {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.2;
    animation: float 10s infinite ease-in-out alternate;
}

.chip-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    right: 15%;
    border: 2px solid var(--primary-blue);
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, var(--glass-border) 10px, var(--glass-border) 20px);
    transform: rotate(15deg);
}

.chip-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 10%;
    border-radius: 50%;
    border: 3px dashed var(--secondary-purple);
    animation-delay: -2s;
    animation-duration: 8s;
}

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

    100% {
        transform: translateY(-30px) rotate(15deg);
    }
}

/* Common Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.section-container {
    min-height: 100vh;
    padding: 100px 5% 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.neon-text {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.line {
    height: 2px;
    width: 100px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    margin: 10px auto 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.primary-btn {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    text-shadow: 0 0 5px var(--primary-blue);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.2), 0 0 10px rgba(0, 240, 255, 0.2);
}

.primary-btn:hover {
    background: var(--primary-blue);
    color: #000;
    box-shadow: var(--neon-blue);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--secondary-purple);
    color: var(--secondary-purple);
    text-shadow: 0 0 5px var(--secondary-purple);
}

.secondary-btn:hover {
    background: var(--secondary-purple);
    color: #fff;
    box-shadow: var(--neon-purple);
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: var(--neon-blue);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: var(--primary-blue);
    text-shadow: 0 0 5px var(--primary-blue);
}

/* Hero Section */
.hero {
    align-items: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 4rem 2rem;
}

.glitch {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: var(--neon-blue);
    position: relative;
}

/* Simple glitch effect */
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(2px, 9999px, 86px, 0);
    }

    20% {
        clip: rect(61px, 9999px, 83px, 0);
    }

    40% {
        clip: rect(8px, 9999px, 16px, 0);
    }

    60% {
        clip: rect(43px, 9999px, 95px, 0);
    }

    80% {
        clip: rect(59px, 9999px, 7px, 0);
    }

    100% {
        clip: rect(2px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }

    20% {
        clip: rect(2px, 9999px, 17px, 0);
    }

    40% {
        clip: rect(98px, 9999px, 20px, 0);
    }

    60% {
        clip: rect(82px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(97px, 9999px, 99px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 90px, 0);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.event-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
}

.countdown-item span {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--primary-blue);
}

.countdown-item .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #aaa;
    margin-top: 5px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* Events Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.event-card {
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.2);
}

.click-indicator {
    font-size: 0.8rem;
    color: var(--primary-blue);
    opacity: 0.7;
    margin-top: 15px;
    font-weight: 600;
}

/* Info Cards & Lists */
.info-card {
    text-align: left;
}

.info-card .card-icon {
    text-align: center;
    font-size: 2.5rem;
}

.info-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.info-list {
    list-style-position: inside;
    color: #ddd;
    line-height: 1.6;
}

.info-list li {
    margin-bottom: 10px;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.event-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: #fff;
}

.tech-card h3 {
    color: var(--primary-blue);
}

.non-tech-card h3 {
    color: var(--secondary-purple);
}

.card-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 10px;
    background: var(--primary-blue);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alt-glow {
    background: var(--secondary-purple);
}

.event-card:hover .card-glow {
    opacity: 1;
}

/* Registration */
.registration-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.pricing {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.price-tier {
    padding: 2rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.price-tier:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.price-tier h3 {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: var(--neon-blue);
}

.lg-btn {
    font-size: 1.2rem;
    padding: 15px 40px;
    margin-bottom: 2rem;
}

.pulse-glow {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 240, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
    }
}

/* Interactive Bulb features removed */

/* Contact */
.contact-card {
    text-align: center;
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.role {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contact-info {
    font-size: 1.1rem;
}

/* Footer */
.glass-footer {
    background: rgba(5, 5, 16, 0.9);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 5% 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.college-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.college-info p {
    color: #aaa;
}

.website-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}

.website-link:hover {
    text-shadow: var(--neon-blue);
}

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

.social-icon {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.social-icon:hover {
    color: var(--primary-blue);
    text-shadow: 0 0 10px var(--primary-blue);
}

.copyright {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    padding: 3rem 2rem 2rem;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-modal:hover {
    color: rgb(255, 50, 50);
}

.modal-body {
    margin-top: 1.5rem;
    line-height: 1.6;
    color: #ddd;
    text-align: left;
}

.modal-body ul {
    margin: 10px 0 15px 20px;
}

.modal-body p {
    margin-bottom: 10px;
}

.modal-register-btn {
    display: block;
    width: max-content;
    margin: 20px auto 0;
}

/* Mobile Nav Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 101;
}

.bar {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Media Queries */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(10, 10, 25, 0.95);
        backdrop-filter: blur(15px);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        padding-top: 80px;
        transition: right 0.3s ease;
        z-index: 100;
        gap: 0;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 15px 30px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .glitch {
        font-size: 2.5rem;
    }

    .neon-text {
        font-size: 1.8rem;
    }

    .event-details {
        flex-direction: column;
        gap: 1rem;
    }

    .countdown-container {
        flex-wrap: wrap;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-container {
        padding: 80px 5% 50px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    /* Ensure cards take full width nicely on small screens */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .preloader-content {
        width: 100%;
        padding: 0 16px;
    }

    .loader-text-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .loader-text {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
        letter-spacing: clamp(0.5px, 0.5vw, 2px);
        text-align: center;
        white-space: normal;
        line-height: 1.15;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .loader-subtitle {
        font-size: 0.8rem;
        letter-spacing: 1px;
        text-align: center;
    }
}