/* PlayHub - Casual Gaming Theme */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --light: #f8f9fa;
    --dark: #2d3436;
    --gray: #636e72;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-fun: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-menu a {
    padding: 10px 18px;
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: var(--white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 25px;
    padding: 0 16px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    padding: 10px;
    width: 180px;
    font-size: 0.9rem;
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

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

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

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    text-align: center;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--warning);
    color: var(--dark);
    font-weight: 700;
    border-radius: 25px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

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

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-games {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-game {
    position: absolute;
    font-size: 3rem;
    animation: float 4s ease-in-out infinite;
    animation-delay: var(--delay);
    background: var(--color);
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.float-game:nth-child(1) { top: 15%; left: 10%; }
.float-game:nth-child(2) { top: 25%; right: 15%; }
.float-game:nth-child(3) { bottom: 30%; left: 8%; }
.float-game:nth-child(4) { bottom: 20%; right: 10%; }
.float-game:nth-child(5) { top: 60%; right: 25%; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Categories Scroll */
.categories {
    padding: 30px 0;
    background: var(--white);
    border-bottom: 1px solid #eee;
}

.categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
}

.see-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.see-all:hover {
    text-decoration: underline;
}

/* Featured Games */
.featured-games {
    padding: 60px 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

.featured-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.featured-card.large {
    grid-row: span 2;
}

.game-thumb {
    height: 150px;
    position: relative;
}

.featured-card.large .game-thumb {
    height: 100%;
    min-height: 300px;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.game-info {
    padding: 16px;
}

.game-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 15px;
    margin-bottom: 8px;
}

.game-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray);
}

/* New Games Grid */
.new-games {
    padding: 60px 0;
    background: var(--white);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.game-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.game-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.game-card .game-thumb {
    height: 140px;
    position: relative;
}

.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
}

.game-card h3 {
    padding: 12px 16px 4px;
    font-size: 0.95rem;
}

.game-tag {
    display: block;
    padding: 4px 16px 12px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Category Section */
.category-section {
    padding: 60px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.category-card {
    background: var(--bg-color);
    padding: 30px 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--white);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.05);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.category-card span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Leaderboard */
.leaderboard {
    padding: 60px 0;
    background: var(--white);
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.leaderboard-card {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    background: var(--gradient-primary);
    color: var(--white);
}

.card-header h3 {
    font-size: 1.1rem;
}

.rank-list,
.player-list {
    list-style: none;
    padding: 10px;
}

.rank-item,
.player-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
}

.rank-item:hover,
.player-item:hover {
    background: var(--white);
}

.rank {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 50%;
    font-weight: 800;
    color: var(--gray);
}

.rank.gold {
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
    color: var(--white);
}

.rank.silver {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: var(--white);
}

.rank.bronze {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: var(--white);
}

.rank-info h4,
.player-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.rank-info span,
.player-info span {
    font-size: 0.8rem;
    color: var(--gray);
}

.player-avatar {
    width: 40px;
    height: 40px;
    background: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-primary);
}

.cta-content {
    text-align: center;
    color: var(--white);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: 60px 0 30px;
}

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

.footer-brand p {
    margin-top: 16px;
    color: var(--gray);
}

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

.footer-links a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .featured-card.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

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

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

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
