/* Landing Page Styles */
:root {
    --primary-color: #137fec;
    --primary-hover: #0f6bc7;
    --background-light: #f6f7f8;
    --background-dark: #101922;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(246, 247, 248, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background: rgba(19, 127, 236, 0.1);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(19, 127, 236, 0.2);
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 2000;
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    margin-bottom: 2rem;
}

.mobile-nav-menu li {
    margin-bottom: 1rem;
}

.mobile-nav-menu .nav-link {
    font-size: 1.125rem;
    padding: 0.5rem 0;
    display: block;
}

.mobile-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Stats Section */
.stats {
    padding: 4rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover:not(.bg-blue):not(.bg-pink):not(.bg-green):not(.bg-purple) {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.stat-card:nth-child(1) .stat-number {
    color: #667eea;
}

.stat-card:nth-child(2) .stat-number {
    color: #f093fb;
}

.stat-card:nth-child(3) .stat-number {
    color: #4facfe;
}

.stat-card:nth-child(4) .stat-number {
    color: #43e97b;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, currentColor, currentColor);
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* School Participation Cards */
.school-participation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.participation-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.participation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: transform 0.3s ease;
}

.participation-card.top-school::before {
    background: linear-gradient(90deg, #43e97b, #38f9d7);
}

.participation-card.no-participation::before {
    background: linear-gradient(90deg, #fa709a, #fee140);
}

/* Custom overrides moved from inline styles in index.php */
.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    color: var(--card-fore, #fff);
    padding: 18px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.15);
    transition: transform .22s cubic-bezier(.2, .9, .25, 1), box-shadow .22s;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.2);
}

.stat-card .stat-icon {
    font-size: 34px;
    opacity: 0.98;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card .stat-meta {
    flex: 1;
}

.stat-number {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.95;
    margin-top: 4px;
}

.stat-card.bg-blue {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(6, 182, 212, 0.12));
    --card-fore: #fff;
}

.stat-card.bg-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(249, 115, 22, 0.12));
    --card-fore: #fff;
}

.stat-card.bg-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.12));
    --card-fore: #fff;
}

.stat-card.bg-purple {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(6, 182, 212, 0.12));
    --card-fore: #fff;
}

.school-participation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
}

.participation-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 250, 0.92));
    color: #0b1220;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(14, 20, 30, 0.06);
    border: 1px solid rgba(16, 24, 40, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.participation-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.participation-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.participation-card.top-school .participation-icon {
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.14);
}

.participation-card.no-project .participation-icon {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.08);
}

.school-name {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 10px;
    display: block;
    color: #061028;
}

.participation-stats {
    display: flex;
    gap: 12px;
}

.participation-stat {
    flex: 1;
    background: linear-gradient(180deg, #fbfdff, #f8fbff);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(10, 20, 40, 0.03);
}

.leader-progress {
    height: 12px;
    background: #eef6ff;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
    border: 1px solid rgba(8, 20, 40, 0.03);
}

.leader-progress>.bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f97316, #ef4444);
    transition: width 900ms cubic-bezier(.2, .9, .25, 1);
}

.leader-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-top: 10px;
}

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.chip {
    padding: 8px 12px;
    background: linear-gradient(180deg, #fff, #f6fbff);
    border-radius: 999px;
    border: 1px solid rgba(10, 20, 40, 0.04);
    font-size: 13px;
    color: #07203a;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
}

.leader-loader {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 84px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    z-index: 4;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

.leader-loader .dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 0.9s infinite;
}

.leader-loader .dot:nth-child(2) {
    animation-delay: 0.12s
}

.leader-loader .dot:nth-child(3) {
    animation-delay: 0.24s
}

@keyframes bounce {

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

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

@media(max-width:900px) {
    .school-participation {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 100px;
    }
}

.participation-card:hover:not(.top-school):not(.no-project) {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
}

.participation-card:hover::before {
    transform: scaleX(1);
}

.participation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.participation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.participation-card.top-school .participation-icon {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.participation-card.no-participation .participation-icon {
    background: linear-gradient(135deg, #fa709a, #fee140);
}

.participation-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.participation-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

.school-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.participation-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.participation-stat {
    text-align: center;
}

.participation-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.participation-card.top-school .participation-stat-number {
    color: #43e97b;
}

.participation-card.no-participation .participation-stat-number {
    color: #fa709a;
}

.participation-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Features Section */
.features {
    padding: 4rem 1.5rem;
    background: var(--background-light);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(19, 127, 236, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
}

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

.footer-text {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.1);
}

.alert {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Responsive Design */
@media (max-width: 768px) {

    .nav-menu,
    .nav-buttons {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        max-width: 300px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .school-participation {
        grid-template-columns: 1fr;
    }

    .participation-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-links {
        justify-content: center;
    }
}

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

    .hero-content {
        padding: 0 1rem;
    }

    .stats,
    .features {
        padding: 3rem 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-light: #1f2937;
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --border-color: #374151;
    }

    body {
        background-color: var(--background-dark);
        color: var(--text-dark);
    }

    .header {
        background: rgba(16, 25, 34, 0.8);
        border-bottom-color: var(--border-color);
    }

    .mobile-menu {
        background: var(--background-dark);
    }

    .stats {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .stat-card {
        background: rgba(31, 41, 55, 0.95);
        border-color: var(--border-color);
    }

    .participation-card {
        background: rgba(31, 41, 55, 0.95);
        border-color: var(--border-color);
    }

    .features {
        background: var(--background-dark);
    }

    .feature-card {
        background: var(--background-light);
        border-color: var(--border-color);
    }

    .footer {
        background: var(--background-light);
        border-top-color: var(--border-color);
    }

    .modal-content {
        background: var(--background-light);
    }

    .form-input {
        background: var(--background-dark);
        border-color: var(--border-color);
        color: var(--text-dark);
    }
}

/* Additional responsive improvements */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .school-participation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .participation-card {
        padding: 1.5rem;
    }

    .participation-stats {
        gap: 1rem;
    }
}

/* Performance optimizations */
.hero-video,
.hero iframe {
    will-change: transform;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for better accessibility */
.btn:focus,
.form-input:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 2px;
    }

    .feature-card,
    .stat-card {
        border-width: 2px;
    }
}

/* Print styles */
@media print {

    .header,
    .mobile-menu,
    .hero-buttons,
    .nav-buttons,
    .modal {
        display: none !important;
    }

    .hero {
        background: none !important;
        color: black !important;
        min-height: auto;
    }

    .hero-content {
        color: black !important;
    }

    .hero-video,
    .hero iframe {
        display: none;
    }
}

/* Loading skeleton for stats */
.stat-number.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    color: transparent;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
.modal-content::-webkit-scrollbar,
.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.mobile-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb,
.mobile-menu::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Improved button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.btn:not(:disabled):active {
    transform: translateY(0);
}

/* Better form validation styles */
.form-input:invalid {
    border-color: #dc2626;
}

.form-input:valid {
    border-color: #16a34a;
}

.error-message {
    font-size: 0.875rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Improved modal animations */
.modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

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

/* Better mobile menu animation - styles moved to main mobile-menu rule above */

/* Improved hero video handling */
.hero-video {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-video.loaded {
    opacity: 1;
}

/* Better loading states */
.btn.loading::after {
    border-top-color: currentColor;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

/* Improved focus indicators */
.mobile-menu-btn:focus,
.modal-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Better text selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

::-moz-selection {
    background-color: var(--primary-color);
    color: white;
}

/* --- Strong overrides for stat/participation cards (ensure final layout) --- */
/* Use #stats prefix to increase specificity so these override earlier generic rules */
#stats .stats-container .stats-grid .stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 120px !important;
    text-align: left !important;
    padding: 18px !important;
    background: transparent !important;
    /* gradient backgrounds defined on .bg-* will show */
}

#stats .stat-card .stat-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stats .stat-card .stat-meta {
    flex: 1;
}

#stats .stat-card .stat-number {
    font-size: 30px !important;
    font-weight: 800 !important;
}

#stats .school-participation .participation-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

#stats .school-participation .participation-stats {
    margin-top: 12px;
}

#stats .leader-progress {
    margin-top: auto;
}

/* Ensure loader is not covering contents and is hidden by default */
#leader-loader {
    display: none !important;
}

@media (max-width: 900px) {
    #stats .stats-container .stats-grid .stat-card {
        min-height: 100px !important;
    }
}

/* End overrides */

/* Emergency high-specificity fixes: force layouts/visibility if earlier rules collide */
#stats .stats-container .stats-grid .stat-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 120px !important;
    text-align: left !important;
    padding: 18px !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: inherit !important;
}

#stats .stats-grid .stat-card .stat-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
}

#stats .stats-grid .stat-card .stat-meta {
    display: block !important;
}

#stats .stats-grid .stat-card .stat-number {
    display: block !important;
    font-size: 30px !important;
    font-weight: 800 !important;
}

#stats .stat-card.bg-blue {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(6, 182, 212, 0.08)) !important;
}

#stats .stat-card.bg-pink {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(249, 115, 22, 0.08)) !important;
}

#stats .stat-card.bg-green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.08)) !important;
}

#stats .stat-card.bg-purple {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(6, 182, 212, 0.08)) !important;
}

#stats .school-participation .participation-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

#stats .school-participation .participation-icon {
    flex-shrink: 0 !important;
}

#stats .participation-card.top-school:hover,
#stats .participation-card.no-project:hover {
    /* preserve gradient and avoid white overlay — do not change background on hover */
    background-image: none !important;
    background: inherit !important;
    transform: none !important;
    /* do not lift or alter card on hover */
}

/* badge */
.leader-badge {
    background: linear-gradient(90deg, #ffb86b, #ff6b6b);
    color: #071024;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.08);
}

.leader-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leader-title-row .participation-title {
    margin: 0;
}


/* make sure progress track visible even if earlier backgrounds applied */
#stats .leader-progress {
    background: #eef6ff !important;
}

#stats .leader-progress>.bar {
    background: linear-gradient(90deg, #f97316, #ef4444) !important;
}

/* ensure loader is hidden by default and only shown via JS */
#leader-loader {
    display: none !important;
}

/* -----------------
     Palette options
     Implemented: Option A (Warm Sunset leader + Cool Ocean no-project)
     Option A (applied):
         - Leader: Warm Sunset (orange -> deep red)
         - No-project: Cool Ocean (cyan -> deep blue)
     Option B (alt):
         - Leader: Regal Purple (indigo -> violet)
         - No-project: Mint Green (mint -> teal)
     Option C (alt):
         - Leader: Tropical (magenta -> pink)
         - No-project: Slate (slate -> smoky blue)
     To switch, tell me which option and I'll update.
     ----------------- */

/* Increase participation card vertical size and adjust padding */
#stats .school-participation .participation-card {
    min-height: 320px !important;
    padding: 22px !important;
}

/* Option A — applied */
#stats .participation-card.top-school {
    background: linear-gradient(135deg, #ffd6a5 0%, #ff8a65 45%, #ff6b6b 100%) !important;
    color: #061026 !important;
}

#stats .participation-card.top-school .participation-icon {
    background: linear-gradient(135deg, #ff9f43, #ff6b6b) !important;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.12) !important;
}

#stats .participation-card.no-project {
    background: linear-gradient(135deg, #b2f7ff 0%, #4fd1c5 45%, #0072ff 100%) !important;
    color: #041227 !important;
}

#stats .participation-card.no-project .participation-icon {
    background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
    box-shadow: 0 8px 30px rgba(0, 114, 255, 0.1) !important;
}

/* Make sure hover keeps the gradient */
#stats .participation-card.top-school:hover,
#stats .participation-card.no-project:hover {
    transform: translateY(-8px) !important;
}

/* Option B (Regal Purple + Mint Green) - use by adding class `palette-b` on the parent .school-participation or switch selectors */
#stats.palette-b .participation-card.top-school {
    background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 60%) !important;
    color: #fff !important;
}

#stats.palette-b .participation-card.top-school .participation-icon {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
}

#stats.palette-b .participation-card.no-project {
    background: linear-gradient(135deg, #A7F3D0 0%, #34D399 60%) !important;
    color: #061026 !important;
}

#stats.palette-b .participation-card.no-project .participation-icon {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
}

/* Option C (Tropical + Slate) - use by adding class `palette-c` on the parent .school-participation */
#stats.palette-c .participation-card.top-school {
    background: linear-gradient(135deg, #FF6AB8 0%, #FF8A65 60%) !important;
    color: #071024 !important;
}

#stats.palette-c .participation-card.top-school .participation-icon {
    background: linear-gradient(135deg, #ff6ab8, #ff8a65) !important;
}

#stats.palette-c .participation-card.no-project {
    background: linear-gradient(135deg, #94A3B8 0%, #64748B 60%) !important;
    color: #fff !important;
}

#stats.palette-c .participation-card.no-project .participation-icon {
    background: linear-gradient(135deg, #64748b, #475569) !important;
}


/* --- Strong hover-preserve rules to prevent background flip --- */
/* Prevent generic hover rules from turning cards white/black */
#stats .stat-card:hover {
    transform: none !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

#stats .participation-card:hover {
    transform: none !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
}

/* Re-apply original gradients on hover per class so they never change */
#stats .stat-card.bg-blue:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

#stats .stat-card.bg-pink:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(249, 115, 22, 0.12)) !important;
}

#stats .stat-card.bg-green:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

#stats .stat-card.bg-purple:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

#stats .participation-card.top-school:hover {
    background: linear-gradient(135deg, #ffd6a5 0%, #ff8a65 45%, #ff6b6b 100%) !important;
}

#stats .participation-card.no-project:hover {
    background: linear-gradient(135deg, #b2f7ff 0%, #4fd1c5 45%, #0072ff 100%) !important;
}

/* Final enforcement: ensure gradients persist in all modes and on hover */
#stats .participation-card.top-school,
#stats .participation-card.top-school:hover {
    background: linear-gradient(135deg, #ffd6a5 0%, #ff8a65 45%, #ff6b6b 100%) !important;
    color: #061026 !important;
}

/* Styles for the new leader / no-project layout (Tailwind-like) */
.participation-card.top-school {
    padding: 28px !important;
    border-radius: 14px;
    color: #041026;
}

.leader-avatar {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.2);
    object-fit: cover;
}

.school-title {
    font-size: 1.35rem;
    font-weight: 900;
    margin: 0;
    color: #071024;
}

.school-sub {
    color: rgba(3, 7, 18, 0.6);
    margin: 0;
}

.leader-number {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0;
    color: #071024;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.leader-label {
    font-size: 1rem;
    font-weight: 700;
    opacity: 0.9;
    margin-top: -6px;
}

.participation-card.no-project {
    padding: 28px !important;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
    color: #fff;
}

.participation-card.no-project .no-project-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participation-card.no-project .no-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.participation-card.no-project .no-item .name {
    font-weight: 700;
    color: #f8fafc;
}

.participation-card.no-project .no-item .city {
    color: rgba(248, 250, 252, 0.6);
    font-size: 0.95rem;
}

/* Make sure our new styles override previous no-project backgrounds */
#stats .participation-card.no-project,
#stats .participation-card.no-project:hover {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
}

#stats .participation-card.no-project,
#stats .participation-card.no-project:hover {
    background: linear-gradient(135deg, #b2f7ff 0%, #4fd1c5 45%, #0072ff 100%) !important;
    color: #041227 !important;
}

#stats .stat-card.bg-blue,
#stats .stat-card.bg-blue:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

#stats .stat-card.bg-pink,
#stats .stat-card.bg-pink:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(249, 115, 22, 0.12)) !important;
}

#stats .stat-card.bg-green,
#stats .stat-card.bg-green:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

#stats .stat-card.bg-purple,
#stats .stat-card.bg-purple:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(6, 182, 212, 0.12)) !important;
}

@media (prefers-color-scheme: dark) {

    /* Dark-mode overrides to keep gradients visible instead of dark backgrounds */
    #stats .participation-card.top-school,
    #stats .participation-card.top-school:hover {
        background: linear-gradient(135deg, #ffc38a 0%, #ff7a59 45%, #ff5a5a 100%) !important;
        color: #071026 !important;
    }

    #stats .participation-card.no-project,
    #stats .participation-card.no-project:hover {
        background: linear-gradient(135deg, #9be7ff 0%, #3fc9b1 45%, #0a6bff 100%) !important;
        color: #001827 !important;
    }

    #stats .stat-card.bg-blue,
    #stats .stat-card.bg-blue:hover {
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.28), rgba(6, 182, 212, 0.18)) !important;
    }

    #stats .stat-card.bg-pink,
    #stats .stat-card.bg-pink:hover {
        background: linear-gradient(135deg, rgba(236, 72, 153, 0.28), rgba(249, 115, 22, 0.18)) !important;
    }

    #stats .stat-card.bg-green,
    #stats .stat-card.bg-green:hover {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(6, 182, 212, 0.18)) !important;
    }

    #stats .stat-card.bg-purple,
    #stats .stat-card.bg-purple:hover {
        background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(6, 182, 212, 0.18)) !important;
    }
}

/* Tailwind Mobile Menu Override */
.mobile-menu.active {
    transform: translateX(0) !important;
}

/* Smooth transitions for mobile menu */
.mobile-menu {
    transition: transform 0.3s ease-in-out !important;
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Hero Section Overlay Improvements */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 25, 34, 0.4), rgba(16, 25, 34, 0.6));
    z-index: 1;
    pointer-events: none;
}

.hero video,
.hero iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Enhanced Mobile Responsive Styles */
@media (max-width: 640px) {

    /* Hero Section Mobile */
    .hero {
        min-height: 100vh !important;
        padding: 80px 0 40px 0;
    }

    /* Stronger overlay on mobile for better readability */
    .hero::before {
        background: linear-gradient(135deg, rgba(16, 25, 34, 0.6), rgba(16, 25, 34, 0.8));
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 1rem !important;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    /* Header Mobile */
    .navbar {
        padding: 0.75rem 1rem !important;
    }

    /* Stats Mobile */
    .stats {
        padding: 3rem 1rem !important;
    }

    /* Performance Cards Mobile */
    .performance-card {
        padding: 1rem !important;
    }

    .performance-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .performance-badge {
        align-self: center !important;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 480px) {

    /* Extra Small Mobile */
    .hero h1 {
        font-size: 1.75rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    .hero .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }

    .stat-card {
        padding: 1rem !important;
    }

    .stat-number {
        font-size: 2rem !important;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem !important;
    }

    .hero p {
        font-size: 1.25rem !important;
    }

    .stats {
        padding: 4rem 2rem !important;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1440px) {
    .hero h1 {
        font-size: 4.5rem !important;
    }

    .hero p {
        font-size: 1.5rem !important;
    }

    .container {
        max-width: 1400px !important;
    }
}

/*
 Hero Text Shadow for Better Readability */
.hero h1,
.hero p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero .btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Additional overlay for very bright videos/images */
.hero-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    z-index: -1;
    border-radius: 20px;
}

@media (max-width: 640px) {

    .hero h1,
    .hero p {
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    }
}