@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@500;700;800&family=Rajdhani:wght@600;700&display=swap');

:root {
    --primary-blue: #1E3A8A;
    --primary-teal: #14B8A6;
    --accent-gold: #FFD700;
    --bg-light: #F9FAFB;
    --bg-dark: #E5E7EB;
    --text-dark: #111827;
    --text-muted: #4B5563;
    --white: #FFFFFF;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-stats: 'Rajdhani', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-dark) 100%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Typography Utilities */
.text-gradient {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gold {
    color: var(--accent-gold);
}

.stat-font {
    font-family: var(--font-stats);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-blue), var(--primary-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-teal));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--primary-teal), var(--accent-gold));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    color: var(--primary-blue);
}

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

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.2);
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.6); /* Adjusted slightly for light mode contrast */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* When placed on top of colorful elements */
.dark-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    color: var(--white);
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(to right, var(--primary-teal), var(--accent-gold));
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0F204C 100%);
    color: var(--white);
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

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

/* Animated Floating Shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    animation: float 10s infinite alternate ease-in-out;
}

.shape-1 {
    width: 300px; height: 300px;
    background: rgba(20, 184, 166, 0.4);
    top: -100px; left: -50px;
}
.shape-2 {
    width: 400px; height: 400px;
    background: rgba(30, 58, 138, 0.5);
    bottom: -150px; right: -100px;
    animation-delay: -3s;
}
.shape-3 {
    width: 200px; height: 200px;
    background: rgba(255, 215, 0, 0.3);
    top: 20%; right: 15%;
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -50px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: center;
}

/* Cards */
.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(20, 184, 166, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary-teal);
}

.challenge-card {
    display: flex;
    flex-direction: column;
}

.challenge-img {
    height: 200px;
    border-radius: 8px;
    background: var(--bg-dark);
    margin-bottom: 1.5rem;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.challenge-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.challenge-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Progress Bars */
.progress-container {
    width: 100%;
    background: rgba(30, 58, 138, 0.1);
    height: 10px;
    border-radius: 5px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-teal), var(--accent-gold));
    border-radius: 5px;
    width: 0; /* Set via JS or inline style */
    transition: width 1s ease-in-out;
}

/* Leaderboard */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.leaderboard-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 2px solid rgba(30, 58, 138, 0.1);
}

.leaderboard-table td {
    padding: 1.2rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

.leaderboard-table tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    font-weight: bold;
}

.leaderboard-table tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    font-family: var(--font-stats);
    font-size: 1.2rem;
    color: var(--primary-blue);
    font-weight: 700;
}

.leaderboard-table tr:hover td {
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.top-3 td {
    position: relative;
    background: linear-gradient(to right, rgba(255,215,0,0.1), transparent) !important;
}

.top-3 td:first-child::before {
    content: '★';
    color: var(--accent-gold);
    margin-right: 0.5rem;
    filter: drop-shadow(0 0 5px rgba(255,215,0,0.5));
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

/* Background gradient blobs for light sections */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.5;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--primary-teal);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

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

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

/* Responsive */
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        display: none;
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
}