/* ===================================
   CSS VARIABLES
   =================================== */

:root {
    --primary-blue: #00A7E1;
    --primary-dark: #041C2C;
    --accent-yellow: #FFC107;
    --accent-green: #00E676;
    --accent-red: #FF5252;
    --text-white: #ffffff;
    --text-gray: rgba(255, 255, 255, 0.8);
    --text-light-gray: rgba(255, 255, 255, 0.6);
    --background-dark: #0f1419;
    --background-secondary: rgba(4, 28, 44, 0.6);
    --border-blue: rgba(0, 167, 225, 0.3);
    --shadow-blue: rgba(0, 167, 225, 0.2);
}

/* ===================================
   BASE STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   HEADER STYLING
   =================================== */

header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, rgba(0, 167, 225, 0.1) 100%);
    border-bottom: 2px solid rgba(0, 167, 225, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: block;
    text-decoration: none;
}

.header-logo {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

nav li {
    margin: 0;
}

nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #ffffff;
    background-color: rgba(0, 167, 225, 0.2);
    transform: translateY(-2px);
}

.login-btn {
    background: linear-gradient(135deg, var(--primary-blue), #0090c1);
    color: white;
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.3);
}

/* ===================================
   COURSE HEADER SECTION (REDUCED)
   =================================== */

.course-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, rgba(0, 167, 225, 0.1) 100%);
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.course-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 167, 225, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.course-intro {
    position: relative;
    z-index: 2;
}

.course-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-green), #00C853);
    color: #002e1f;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4);
    transition: all 0.3s ease;
}

.course-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.6);
}

.badge-icon {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.course-header h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(0, 167, 225, 0.3);
}

.course-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 900px;
    margin: 0 auto 2rem;
    line-height: 1.5;
}

.course-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-yellow);
    margin-bottom: 0.3rem;
    text-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   PREVIEW INFO SECTION (REDUCED)
   =================================== */

.preview-info {
    background: linear-gradient(135deg, var(--background-dark) 0%, var(--primary-dark) 100%);
    padding: 3rem 0;
    border-top: 2px solid var(--border-blue);
}

.preview-content h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: bold;
}

.preview-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.preview-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.8rem 1.2rem;
    border-radius: 15px;
    border: 1px solid var(--border-blue);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.preview-feature:hover {
    background: rgba(0, 167, 225, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 167, 225, 0.4);
    border-color: var(--primary-blue);
}

.preview-feature .feature-icon {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0090c1 50%, #006d94 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 167, 225, 0.5);
    transition: all 0.3s ease;
}

.preview-feature:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 167, 225, 0.7);
}

.preview-feature .feature-content h3 {
    color: var(--primary-blue);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: bold;
}

.preview-feature .feature-content p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.5;
}

/* ===================================
   COMPETITION TEASER SECTION (COMPACT)
   =================================== */

.competition-teaser {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(0, 167, 225, 0.05));
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-blue);
}

.competition-content {
    max-width: 800px;
    margin: 0 auto;
}

.competition-icon {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    animation: trophy-glow 4s ease-in-out infinite;
}

@keyframes trophy-glow {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
    }
}

.competition-content h3 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    font-weight: bold;
}

.competition-content > p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.competition-preview {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-blue);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.leaderboard-mini {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 0.8rem;
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 0 0.5rem;
}

.leader-item {
    background: linear-gradient(135deg, rgba(0, 167, 225, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(0, 167, 225, 0.2);
    border-radius: 8px 8px 0 0;
    padding: 0.8rem 0.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    min-width: 120px;
    flex: 1;
    position: relative;
    text-align: center;
}

/* Podium heights */
.leader-item[data-rank="1"] {
    height: 85px;
    order: 2;
    border-color: var(--accent-yellow);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 255, 255, 0.1));
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.25);
}

.leader-item[data-rank="2"] {
    height: 70px;
    order: 1;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(255, 255, 255, 0.05));
    border-color: #C0C0C0;
}

.leader-item[data-rank="3"] {
    height: 55px;
    order: 3;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(255, 255, 255, 0.05));
    border-color: #CD7F32;
}

.leader-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 167, 225, 0.2);
}

.leader-item[data-rank="1"]:hover {
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
}

/* Podium base effect */
.leader-item::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: inherit;
    border-radius: 0;
    opacity: 0.7;
}

.leader-item[data-rank="1"] .rank {
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    font-size: 1.3rem;
}

.leader-item[data-rank="2"] .rank {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
    font-size: 1.2rem;
}

.leader-item[data-rank="3"] .rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
    font-size: 1.1rem;
}

.rank {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
    text-shadow: 0 0 10px rgba(0, 167, 225, 0.3);
}

.name {
    font-size: 0.85rem;
    color: var(--text-white);
    font-weight: 500;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.score {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent-green);
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}

.dynamic-message {
    margin-top: 1rem;
}

.dynamic-message p {
    color: var(--text-gray);
    font-size: 1rem;
    font-style: italic;
}

.competition-info {
    margin-bottom: 1rem;
}

.competition-info small {
    color: var(--text-light-gray);
    font-size: 0.85rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(0, 167, 225, 0.05);
}

.leaderboard-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 167, 225, 0.3);
    text-decoration: none;
}

.leaderboard-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.leaderboard-link:hover::after {
    transform: translateX(5px);
}

/* ===================================
   COURSE CTA SECTION (REDUCED)
   =================================== */

.course-cta {
    background: linear-gradient(135deg, var(--primary-dark), rgba(255, 193, 7, 0.1));
    padding: 3rem 0;
    text-align: center;
    border-top: 2px solid var(--border-blue);
}

.cta-content h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.5;
}

/* ===================================
   START COURSE BUTTON STYLING
   =================================== */

.start-course-button {
    background: linear-gradient(135deg, var(--accent-yellow), #FF8F00) !important;
    color: #1a1a1a !important;
    border: none !important;
    padding: 1.2rem 2.5rem !important;
    border-radius: 15px !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 1rem !important;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    text-decoration: none !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.start-course-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.start-course-button:hover::before {
    left: 100%;
}

.start-course-button:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 12px 35px rgba(255, 193, 7, 0.4) !important;
    background: linear-gradient(135deg, #FFD54F, var(--accent-yellow)) !important;
    text-decoration: none !important;
}

.start-course-button:active {
    transform: translateY(-2px) scale(1.02) !important;
}

.button-icon {
    font-size: 1.3rem !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===================================
   CTA SECTION BUTTON
   =================================== */

.cta-buttons {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ===================================
   FOOTER (REDUCED)
   =================================== */

footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--background-dark) 100%);
    border-top: 2px solid var(--border-blue);
    padding: 2rem 0 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    order: 1;
}

.footer-content p {
    color: var(--text-gray);
    font-size: 1rem;
    margin: 0;
    order: 2;
}

.footer-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1200px) {
    .preview-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .course-header {
        padding: 2.5rem 0 1.5rem;
    }

    .course-header h1 {
        font-size: 2rem;
    }

    .course-description {
        font-size: 1rem;
    }

    .course-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }
    
    .preview-info {
        padding: 2rem 0;
    }
    
    .preview-content h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .preview-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .preview-feature {
        padding: 1.5rem;
    }
    
    .competition-teaser {
        padding: 1.5rem 0;
    }
    
    .competition-content h3 {
        font-size: 1.4rem;
    }
    
    .competition-content > p {
        font-size: 0.95rem;
    }
    
    .competition-preview {
        padding: 1rem;
    }
    
    .leaderboard-mini {
        max-width: 500px;
        gap: 0.5rem;
    }
    
    .leader-item {
        min-width: 100px;
        padding: 0.6rem 0.4rem 1rem;
    }
    
    .leader-item[data-rank="1"] {
        height: 75px;
    }

    .leader-item[data-rank="2"] {
        height: 65px;
    }

    .leader-item[data-rank="3"] {
        height: 50px;
    }
    
    .rank {
        font-size: 0.9rem;
    }
    
    .name {
        font-size: 0.75rem;
    }
    
    .score {
        font-size: 0.85rem;
    }
    
    .course-cta {
        padding: 2.5rem 0;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .start-course-button {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
    }
    
    .footer-links {
        gap: 1.5rem;
    }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav {
        order: 1;
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }
    
    .login-btn {
        order: 2;
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .course-header h1 {
        font-size: 1.8rem;
    }
    
    .course-description {
        font-size: 0.95rem;
    }
    
    .competition-icon {
        font-size: 2.5rem;
    }
    
    .competition-content h3 {
        font-size: 1.3rem;
    }
    
    .competition-content > p {
        font-size: 0.9rem;
    }
    
    .leaderboard-mini {
        max-width: 400px;
        gap: 0.4rem;
    }
    
    .leader-item {
        min-width: 85px;
        padding: 0.5rem 0.3rem 0.8rem;
    }
    
    .leader-item[data-rank="1"] {
        height: 65px;
    }

    .leader-item[data-rank="2"] {
        height: 55px;
    }

    .leader-item[data-rank="3"] {
        height: 45px;
    }
    
    .rank {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }
    
    .name {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
        line-height: 1.1;
    }
    
    .score {
        font-size: 0.75rem;
    }
    
    .competition-info small {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        line-height: 1.3;
    }
    
    .start-course-button {
        width: 100% !important;
        max-width: 300px !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content p {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .header-logo {
        height: 55px;
    }
}