/* =========================================
   GLOBAL STYLES (Applies to All)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #00c6ff, #0072ff);
    --dark-bg: #0f0c29;
    --neon-blue: #00d2ff;
    --neon-pink: #ff00de;
}

html, body {
    width: 100%;
    min-height: 100vh;     /* FIXED: Allow height to grow so you can scroll */
    margin: 0;
    padding: 0;
    overflow-x: hidden;    /* Prevents horizontal scrollbar */
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #0072ff; border-radius: 5px; }

/* Utilities */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   LANDING PAGE STYLES (home.ejs)
   ========================================= */

/* Navbar */
.glass-nav {
    background: rgba(15, 12, 41, 0.95); /* Slightly darker for better visibility */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    width: 100%;
    z-index: 1000;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    margin-left: 20px;
    transition: 0.3s;
}
.nav-link:hover { color: #00d2ff !important; }

/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(15,12,41,0.8), rgba(15,12,41,0.9)), 
                url('/images/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px; 
    z-index: 1;
}

.glitch-text {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 3px 3px var(--neon-pink), -3px -3px var(--neon-blue);
    letter-spacing: 2px;
    animation: glitch 1s infinite alternate;
}

/* Responsive Typography for Hero */
@media (max-width: 768px) { 
    .glitch-text { font-size: 2.5rem; } 
    .hero-section { text-align: center; padding: 100px 15px; }
    .hero-section .lead { font-size: 1rem; }
}

/* About Section Styles */
.about-section {
    background-color: #161625;
    color: white;
    width: 100%;
    position: relative; /* Ensures it sits in document flow */
    z-index: 2;         /* Ensures it sits above any fixed background issues */
    padding: 80px 0;
}

.bg-glass {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}
.line-height-sm { line-height: 1.2; }

/* Buttons */
.btn-glow {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 114, 255, 0.5);
    transition: transform 0.3s;
    white-space: nowrap;
}
.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(0, 114, 255, 0.8);
    color: white;
}

/* Event Cards (Home) */
.event-section { 
    background-color: #0b0b14; 
    color: white; 
    width: 100%;
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.custom-card {
    background: #161625;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 30px;
    transition: 0.4s;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.custom-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.1);
}
.card-icon { margin-bottom: 20px; }

/* Footer */
footer { 
    background: #050508; 
    color: #888; 
    padding: 40px 0; 
    width: 100%; 
    position: relative;
    z-index: 2;
}

/* =========================================
   REGISTRATION PAGE STYLES (register.ejs)
   ========================================= */

.register-page {
    background: linear-gradient(45deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    position: relative;
    padding-top: 28px; 
    padding-bottom: 50px;
    width: 100%;
}

/* Floating Animated Background Circles */
.circles {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    z-index: 1;
}
.circles div {
    position: absolute;
    display: block;
    width: 20px; height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}
/* Random positioning */
.circles div:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.circles div:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.circles div:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.circles div:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.circles div:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }

@keyframes animate {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0; }
    100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
}

/* Glass Inputs */
.glass-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 10px;
}
.glass-input:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #00d2ff !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    color: white !important;
    outline: none;
}
.glass-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.form-floating label { color: rgba(255, 255, 255, 0.6); }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #00d2ff;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Icon Box */
.icon-box {
    width: 70px; height: 70px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Event Grid System */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    width: 100%;
}

/* Custom Event Tiles */
.event-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}
.event-tile i { font-size: 1.5rem; transition: 0.3s; }
.event-tile:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

/* Selected State */
.btn-check:checked + .event-tile {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(0, 114, 255, 0.4);
    transform: scale(1.05);
}
.btn-check:checked + .event-tile i { transform: scale(1.2); }

.hover-scale { transition: transform 0.2s; }
.hover-scale:hover { transform: translateX(-5px); }
.letter-spacing-1 { letter-spacing: 1px; }

/* =========================================
   COORDINATORS PAGE STYLES (coordinators.ejs)
   ========================================= */
.coordinators-page {
    min-height: 100vh;
    margin: 0;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 87, 163, 0.25), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(67, 97, 238, 0.35), transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(0, 209, 178, 0.24), transparent 45%),
        linear-gradient(140deg, #140b2d 0%, #21104b 45%, #180f36 100%);
    -webkit-font-smoothing: antialiased;
}

.coordinator-wrap {
    max-width: 1100px;
}

.coordinator-header {
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-title {
    font-size: clamp(1.6rem, 3.4vw, 2.35rem);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
    color: #ffde59;
    text-shadow: 0 0 10px rgba(255, 222, 89, 0.72), 0 0 24px rgba(255, 184, 0, 0.52);
}

.home-btn {
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    transition: 0.25s ease;
}

.home-btn:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, #ff4db8, #6a5cff);
    transform: translateY(-2px);
}

.lead-text {
    max-width: 700px;
    font-size: 1.05rem;
    line-height: 1.55;
    color: #d9ddf8;
}

.coordinator-card {
    height: 100%;
    padding: 1.5rem !important;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
    box-shadow: 0 18px 34px rgba(7, 4, 20, 0.45);
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 1.2rem;
    letter-spacing: 0.4px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    color: #7dd3ff;
}

.badge-strip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
    color: #190f34;
}

.badge-convenor { background: linear-gradient(90deg, #1bc98e, #14a873); }
.badge-student { background: linear-gradient(90deg, #ff9f1c, #ff5f6d); }
.badge-faculty { background: linear-gradient(90deg, #4cc9f0, #4361ee); }

.contact-line {
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: #f8f9ff;
}

.contact-line:last-child {
    margin-bottom: 0;
}

.contact-name {
    color: #ffd670;
}

.contact-value {
    color: #f8f9ff;
}

.contact-name,
.contact-value {
    overflow-wrap: anywhere;
}

.page-home-footer {
    display: flex;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .coordinator-wrap {
        max-width: 900px;
    }

    .lead-text {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .coordinator-wrap {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .coordinator-header {
        position: relative;
        flex-direction: column;
        align-items: stretch !important;
        padding-top: 0.2rem;
        margin-bottom: 1rem !important;
    }

    .hero-title {
        text-align: center;
        font-size: 1.7rem;
    }

    .coordinator-header .home-btn {
        position: absolute;
        top: 0;
        right: 0;
        width: auto;
        padding: 0.48rem 1rem;
        font-size: 0.9rem;
    }

    .lead-text {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1rem !important;
    }

    .card-title {
        font-size: 1.08rem;
    }
}

@media (max-width: 576px) {
    .coordinator-wrap {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .coordinator-header .home-btn {
        top: 0;
        right: 0;
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 1.45rem;
        letter-spacing: 0.5px;
    }

    .coordinator-card {
        border-radius: 16px;
        padding: 1.1rem !important;
    }

    .badge-strip {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .contact-line {
        font-size: 0.95rem;
        line-height: 1.45;
    }
}

/* =========================================
   SCHEDULE PAGE STYLES (schedule.ejs)
   ========================================= */
.schedule-wrap {
    max-width: 1100px;
}

.schedule-page .hero-title {
    color: #ffd24d;
    text-shadow: 0 0 10px rgba(255, 210, 77, 0.72), 0 0 22px rgba(255, 180, 0, 0.52);
}

.schedule-date {
    color: #d8ddff;
    font-size: 1.02rem;
    font-weight: 600;
}

.schedule-card {
    border-radius: 20px;
}

.schedule-table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-color: #fff;
    --bs-table-border-color: rgba(255, 255, 255, 0.15);
}

.schedule-table thead th {
    color: #72d9ff;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-bottom-width: 2px;
    white-space: nowrap;
}

.schedule-table td {
    color: #f6f8ff;
    font-weight: 600;
}

@media (max-width: 767.98px) {
    .schedule-date {
        text-align: center;
        margin-bottom: 1rem !important;
    }

    .schedule-table {
        font-size: 0.92rem;
    }
}

@media (max-width: 576px) {
    .schedule-table {
        font-size: 0.86rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.55rem;
    }
}