/* CSS Variables - Design System */
:root {
    --background: hsl(220, 25%, 10%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(220, 20%, 14%);
    --card-foreground: hsl(210, 40%, 98%);
    --primary: hsl(210, 100%, 56%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(210, 100%, 70%);
    --secondary: hsl(30, 100%, 60%);
    --secondary-foreground: hsl(0, 0%, 0%);
    --muted: hsl(220, 15%, 20%);
    --muted-foreground: hsl(215, 15%, 65%);
    --accent: hsl(280, 60%, 55%);
    --border: hsl(220, 20%, 25%);
    --input: hsl(220, 20%, 20%);
    --radius: 0.75rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url('assets/hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        hsla(220, 25%, 10%, 0.8),
        hsla(220, 25%, 10%, 0.6),
        var(--background)
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
    max-width: 64rem;
    margin: 0 auto;
}

.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-icon {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

.hero-description {
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.hero-button {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px -10px hsla(210, 100%, 56%, 0.4);
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px -10px hsla(210, 100%, 56%, 0.6);
}

/* Search Section */
.search-section {
    padding: 3rem 0;
}

.search-wrapper {
    max-width: 42rem;
    margin: 0 auto 2rem;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    height: 3rem;
    padding-left: 2.5rem;
    padding-right: 1rem;
    font-size: 1.125rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(210, 100%, 56%, 0.1);
}

.search-input::placeholder {
    color: var(--muted-foreground);
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.category-btn:hover {
    border-color: var(--primary);
    background-color: hsla(210, 100%, 56%, 0.1);
}

.category-btn.active {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* Games Section */
.games-section {
    padding-bottom: 4rem;
}

.games-header {
    margin-bottom: 2rem;
}

.games-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.games-count {
    color: var(--muted-foreground);
}

.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Game Card */
.game-card {
    display: block;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 40px -10px hsla(210, 100%, 56%, 0.4);
}

.game-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-image {
    transform: scale(1.1);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        hsla(220, 25%, 10%, 0.9),
        transparent
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-button {
    background-color: var(--primary);
    color: var(--primary-foreground);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(1rem);
    transition: transform 0.3s ease;
}

.game-card:hover .play-button {
    transform: translateY(0);
}

.play-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.game-category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.game-content {
    padding: 1rem;
}

.game-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.game-card:hover .game-title {
    color: var(--primary);
}

.game-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-players {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 1rem;
}

.no-results p {
    color: var(--muted-foreground);
    font-size: 1.125rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--muted-foreground);
}
