/* Import Modern Sans-Serif */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #050505;
    --accent: #007aff;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a1a1a6;
    --header-bg: rgba(5, 5, 5, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Header --- */
.app-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.header-content {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    background: var(--accent);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 18px;
}

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

.header-nav a {
    color: var(--text-dim);
    text-decoration: none;
    margin-left: 25px;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

.header-nav a:hover {
    color: var(--text-main);
}

/* Active navigation style */
.header-nav a.active {
    color: var(--text-main);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
}

/* --- Main Layout --- */
.welcome-container {
    padding-top: 100px;
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 80px;
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: 100px 20px;
}

.game-title {
    font-size: clamp(48px, 8vw, 92px);
    font-weight: 700;
    letter-spacing: -4px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff 30%, #555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.game-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    color: var(--text-dim);
    margin-bottom: 50px;
    font-weight: 300;
}

.navigation-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.play-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.sub-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

/* --- Info Sections --- */
.info-section {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 60px;
    margin-bottom: 30px;
    transition: border-color 0.4s;
}

.info-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.section-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 3px;
    margin-bottom: 30px;
    font-weight: 700;
}

.section-content p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 800px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 25px;
}

/* --- Featured Categories & Game Modes Section --- */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.featured-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #ffd700);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
}

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

.featured-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.featured-card:hover .featured-icon {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    transform: scale(1.1);
}

.featured-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #fff;
}

.featured-card p {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 15px;
}

.word-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.view-all-container {
    text-align: center;
    margin-top: 20px;
}

.view-all-link {
    display: inline-block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 30px;
    border: 1px solid var(--border);
    border-radius: 40px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.view-all-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateX(5px);
}

.view-all-link::after {
    content: ' →';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.view-all-link:hover::after {
    opacity: 1;
}

/* --- Game Stats & Leaderboard Preview --- */
.stats-preview {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(0, 122, 255, 0.05));
}

.stats-overview {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-item-large {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    min-width: 150px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat-item-large:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
}

.stat-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #ffd700;
    display: block;
    margin-bottom: 5px;
}

.stat-item-large .stat-label {
    font-size: 14px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-preview {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid var(--border);
}

.preview-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: #fff;
    text-align: center;
    font-weight: 600;
}

.leaderboard-entries {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.leaderboard-entry.gold {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-entry.silver {
    background: rgba(192, 192, 192, 0.1);
    border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-entry.bronze {
    background: rgba(205, 127, 50, 0.1);
    border-color: rgba(205, 127, 50, 0.3);
}

.rank {
    font-size: 18px;
    font-weight: 700;
    width: 40px;
    color: #ffd700;
}

.gold .rank, .silver .rank, .bronze .rank {
    color: inherit;
}

.player-name {
    flex: 1;
    font-weight: 500;
    color: #fff;
}

.player-score {
    font-weight: 600;
    color: #ffd700;
}

.view-full-link {
    display: inline-block;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 30px;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.view-full-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* --- Why Play Section --- */
.why-play {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05), rgba(255, 215, 0, 0.05));
}

.why-play-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.why-play-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.why-play-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent);
}

.why-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 15px;
}

.why-play-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.why-play-item p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
}

/* --- Footer --- */
.app-footer {
    border-top: 1px solid var(--border);
    padding: 80px 0;
    background: #000;
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left p {
    font-size: 14px;
    color: var(--text-dim);
}

.version {
    font-size: 11px !important;
    margin-top: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .info-section { 
        padding: 40px 30px; 
    }
    
    .header-nav { 
        display: none; 
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 40px; 
        text-align: center; 
        align-items: center; 
    }
    
    /* Featured categories responsive */
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .featured-card {
        padding: 20px 15px;
    }
    
    .featured-icon {
        font-size: 36px;
        width: 60px;
        height: 60px;
        line-height: 60px;
    }
    
    .featured-card h3 {
        font-size: 18px;
    }
    
    .featured-card p {
        font-size: 13px;
    }
    
    /* Stats section responsive */
    .stats-overview {
        gap: 15px;
    }
    
    .stat-item-large {
        min-width: 120px;
        padding: 15px;
    }
    
    .stat-icon {
        font-size: 36px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .leaderboard-preview {
        padding: 20px;
    }
    
    /* Why Play responsive */
    .why-play-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .info-section {
        padding: 30px 20px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item-large {
        width: 100%;
        max-width: 200px;
    }
    
    .leaderboard-entry {
        padding: 10px 15px;
    }
    
    .rank {
        width: 30px;
        font-size: 16px;
    }
    
    .player-name {
        font-size: 14px;
    }
    
    .player-score {
        font-size: 14px;
    }
    
    .why-play-grid {
        grid-template-columns: 1fr;
    }
    
    .view-all-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

        /* Header */
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }

        .header-nav {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
        }

        /* Mobile Menu Toggle Button */
        .mobile-menu-btn {
            display: none;
            background: transparent;
            color: inherit;
            border: 1px solid currentColor;
            padding: 8px 15px;
            font-size: 1rem;
            cursor: pointer;
            border-radius: 5px;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        .mobile-menu-btn:hover {
            opacity: 0.8;
            background-color: rgba(128, 128, 128, 0.1);
        }

        /* Grids */
        .featured-grid,
        .why-play-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        /* Buttons */
        .navigation-buttons {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
        }

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

            .header-content {
                flex-direction: row; 
                align-items: center; 
                justify-content: space-between;
                position: relative; 
            }

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

            .header-nav {
                flex-direction: column;
                align-items: center; 
                width: 100%;
                margin-top: 10px;
                gap: 0;
                
                /* White Div Container Styling */
                background-color: #ffffff;
                border-radius: 12px; 
                box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); 
                
                /* Smooth Dropdown Animation Properties */
                overflow: hidden;
                max-height: 0;
                opacity: 0;
                padding: 0; 
                transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.3s ease-in-out, padding 0.3s ease-in-out;
            }

            /* Triggered via JavaScript */
            .header-nav.show {
                max-height: 400px; 
                opacity: 1;
                margin-top: 15px;
                padding: 10px 0; 
            }

            .header-nav a {
                display: block;
                width: 100%;
                box-sizing: border-box; 
                padding: 14px 20px; 
                text-align: center; 
                
                color: #333333 !important; 
                text-decoration: none;
                font-weight: 500;
                border-bottom: 1px solid rgba(0, 0, 0, 0.04); 
                transition: all 0.3s ease; 
            }

            .header-nav a:hover, 
            .header-nav a:active {
                background-color: #f0f4f8; 
                color: #0056b3 !important; 
                letter-spacing: 0.5px; 
            }

            .header-nav a:last-child {
                border-bottom: none;
            }

            .game-title {
                font-size: 2rem;
                text-align: center;
            }

            .game-subtitle {
                font-size: 1rem;
                text-align: center;
            }

            .play-btn {
                width: 100%;
            }

            .info-section {
                padding: 20px 10px;
            }
        }

        /* Small phone */
        @media (max-width: 480px) {

            .game-title {
                font-size: 1.6rem;
            }

            .game-subtitle {
                font-size: 0.9rem;
            }

            .section-title {
                font-size: 1.2rem;
            }
        }