/* 
   Theme: Neon Arcade
   Font: Outfit (Geometric Sans)
*/

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

:root {
    --bg-dark: #0a0b14;
    --bg-card: #151725;
    --bg-card-hover: #1e2136;

    --primary: #00f3ff;
    /* Neon Cyan */
    --secondary: #ff00ff;
    /* Neon Magenta */
    --accent: #7000ff;
    /* Deep Purple */

    --text-main: #ffffff;
    --text-muted: #8b9bb4;

    --font-main: 'Outfit', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-glow: 0 0 20px rgba(0, 243, 255, 0.15);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-weight: 300;
}

/* --- Layout Utilities --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 11, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.05em;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* --- Hero --- */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.2) 0%, rgba(10, 11, 20, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-subtitle {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 243, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.hero p {
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    background: #fff;
}

/* --- Game Grid --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

/* ... (rest of card styles remain the same) ... */

/* --- Mobile Responsive --- */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    /* ... (rest of mobile styles) ... */
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(0, 243, 255, 0.3);
    background: var(--bg-card-hover);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #2a2d40;
    position: relative;
    overflow: hidden;
}

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

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

.card-content {
    padding: 1.5rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.game-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.game-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.play-btn {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.game-card:hover .play-btn {
    background: var(--primary);
    color: var(--bg-dark);
}

/* --- Footer --- */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    margin-top: 4rem;
    background: #05060a;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Modals & Overlays --- */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.game-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 243, 255, 0.1);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-overlay:not(.hidden) .modal {
    transform: translateY(0);
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.modal p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.result-stats p {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.instructions-list {
    text-align: left;
    margin-bottom: 2rem;
    list-style: none;
}

.instructions-list li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-muted);
}

.instructions-list li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- Game Controls --- */
.controls,
.actions,
.controls-top {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

/* --- Filter Bar --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.game-card {
    transition: opacity 0.3s, transform 0.3s;
}

/* --- Mobile Responsive --- */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .hero {
        padding-top: 6rem;
    }
}