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

:root {
    --primary-color: #4aa3ff;
    --secondary-color: #6d5cff;
    --dark-bg: #0b1020;
    --card-bg: rgba(255, 255, 255, 0.06);
    --card-bg-strong: rgba(255, 255, 255, 0.10);
    --text-light: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.70);
    --text-faint: rgba(255, 255, 255, 0.55);
    --accent: #4aa3ff;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.25);
    --radius: 16px;
    --radius-sm: 12px;
    --speed: 160ms;
    --hover-scale: 1.05;
}

@media (prefers-color-scheme: light) {
    :root {
        --dark-bg: #f6f8ff;
        --card-bg: rgba(15, 23, 42, 0.05);
        --card-bg-strong: rgba(15, 23, 42, 0.08);
        --text-light: rgba(15, 23, 42, 0.92);
        --text-muted: rgba(15, 23, 42, 0.70);
        --text-faint: rgba(15, 23, 42, 0.55);
        --border: rgba(15, 23, 42, 0.12);
        --shadow: 0 12px 35px rgba(2, 6, 23, 0.12);
        --shadow-soft: 0 8px 22px rgba(2, 6, 23, 0.10);
    }
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(74, 163, 255, 0.25), transparent 55%),
        radial-gradient(900px 520px at 90% 0%, rgba(109, 92, 255, 0.18), transparent 50%),
        var(--dark-bg);
    color: var(--text-light);
    line-height: 1.55;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 70%, white 30%);
    outline-offset: 3px;
    border-radius: 10px;
}

/* Navigation */
.navbar {
    background: color-mix(in srgb, var(--dark-bg) 70%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform var(--speed) ease;
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 720;
    color: var(--accent);
    letter-spacing: 0.2px;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    transition: background var(--speed) ease, color var(--speed) ease;
}

.nav-links a:hover {
    background: var(--card-bg);
    color: var(--text-light);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 3rem 2rem 2rem;
    text-align: center;
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 720;
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 2.2vw, 2.5rem);
    margin: 3rem 0 2rem;
    color: var(--text-light);
    letter-spacing: -0.2px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.game-card {
    background: linear-gradient(180deg, var(--card-bg), color-mix(in srgb, var(--card-bg) 65%, transparent));
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform var(--speed) ease, border-color var(--speed) ease, box-shadow var(--speed) ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
    position: relative;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--border) 55%, var(--accent) 45%);
    box-shadow: var(--shadow);
}

.game-card-image {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow-soft);
}

.game-card-content {
    padding: 1.25rem 0 1.5rem;
    text-align: center;
}

.game-card-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 660;
    letter-spacing: -0.2px;
}

.game-card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-platforms {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 650;
}

/* Game Page Styles */
.game-header {
    margin-top: 80px;
    padding: 3rem 2rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.game-header-content {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: start;
}

.game-icon {
    width: 150px;
    height: 150px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.game-info h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
    letter-spacing: -0.4px;
}

.game-meta {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.game-description {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.download-section {
    margin: 2rem 0;
}

.download-btn {
    display: inline-block;
    transition: transform var(--speed) ease, opacity var(--speed) ease;
}

.download-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.download-btn img {
    height: 60px;
}

/* Screenshots Gallery */
.screenshots-gallery {
    margin: 3rem 0;
}

.screenshots-gallery h2 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    margin-bottom: 2rem;
    color: var(--text-light);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.screenshot {
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--speed) ease, box-shadow var(--speed) ease;
    cursor: pointer;
    border: 1px solid var(--border);
}

.screenshot:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

/* Screenshot Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    padding: 2rem;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightbox-in 200ms ease;
    cursor: default;
}

@keyframes lightbox-in {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--speed) ease, transform var(--speed) ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--speed) ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    .lightbox-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .lightbox-prev { left: 0.75rem; }
    .lightbox-next { right: 0.75rem; }
}

/* About Page */
.about-content,
.privacy-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    line-height: 1.8;
}

.about-content h2,
.privacy-content h2 {
    color: var(--accent);
    margin: 2rem 0 1rem;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.about-content h3,
.privacy-content h3 {
    color: var(--text-light);
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.about-content p,
.privacy-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: transform var(--speed) ease;
}

.team-member:hover {
    transform: translateY(-3px);
}

.team-member h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.team-member p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--card-bg);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    line-height: 2;
    transition: color var(--speed) ease;
}

.footer-section a:hover {
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
    }

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

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

    .game-header-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .game-icon {
        margin: 0 auto;
    }

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

/* Cookie Consent Popup */
.cookie-consent-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: color-mix(in srgb, var(--dark-bg) 70%, rgba(255, 255, 255, 0.10));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border);
}

.cookie-consent-overlay.show {
    transform: translateY(0);
}

.cookie-consent-container {
    max-width: 1120px;
    margin: 0 auto;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cookie-header h3 {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.cookie-text {
    color: var(--text-muted);
    line-height: 1.6;
}

.cookie-text a {
    color: var(--accent);
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-main-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--speed) ease, background var(--speed) ease, border-color var(--speed) ease;
    font-size: 0.95rem;
    background: var(--card-bg);
    color: var(--text-light);
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 26%, var(--card-bg) 74%), color-mix(in srgb, var(--secondary-color) 18%, var(--card-bg) 82%));
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border) 45%);
    color: var(--text-light);
}

.cookie-btn-accept:hover {
    background: color-mix(in srgb, var(--accent) 35%, var(--card-bg) 65%);
}

.cookie-btn-reject {
    background: var(--card-bg);
    color: var(--text-muted);
}

.cookie-btn-reject:hover {
    background: var(--card-bg-strong);
    color: var(--text-light);
}

.cookie-btn-customize {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.cookie-btn-customize:hover {
    background: var(--card-bg);
    color: var(--text-light);
    border-color: color-mix(in srgb, var(--border) 60%, var(--accent) 40%);
}

.cookie-customize {
    display: none;
    background: var(--card-bg-strong);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
}

.cookie-category h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.cookie-category p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.cookie-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cookie-switch input[type="checkbox"] {
    width: 44px;
    height: 24px;
    appearance: none;
    background: color-mix(in srgb, var(--text-muted) 30%, transparent);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background var(--speed) ease;
}

.cookie-switch input[type="checkbox"]:checked {
    background: var(--accent);
}

.cookie-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform var(--speed) ease;
}

.cookie-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.cookie-switch input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-switch label {
    color: var(--text-light);
    cursor: pointer;
}

.cookie-customize-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Cookie Settings Link */
.cookie-settings-link {
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--speed) ease;
}

.cookie-settings-link:hover {
    color: var(--accent);
}

/* Section Header / View All Link */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 3rem 0 1rem;
}

.section-header .section-title {
    margin: 0;
    text-align: left;
}

.view-all-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--speed) ease;
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--text-light);
}

/* Category Badge Variant */
.platform-badge.category-badge {
    background: color-mix(in srgb, var(--secondary-color) 15%, transparent);
    border-color: color-mix(in srgb, var(--secondary-color) 30%, var(--border) 70%);
}

/* Mobile Responsive Cookie Consent */
@media (max-width: 768px) {
    .cookie-consent-overlay {
        padding: 1.5rem 1rem;
    }

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

    .cookie-main-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-customize-buttons {
        flex-direction: column;
    }
}
