/* ============================================
   GameFlow - Premium Game Library Stylesheet
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #222235;
    --bg-glass: rgba(20, 20, 35, 0.85);
    --bg-glass-light: rgba(30, 30, 50, 0.6);

    --text-primary: #f0f0f5;
    --text-secondary: #9898b0;
    --text-muted: #5c5c78;

    --accent: #7c4dff;
    --accent-light: #a87dff;
    --accent-dark: #5a2dcc;
    --accent-glow: rgba(124, 77, 255, 0.35);

    --success: #00e676;
    --warning: #ffab00;
    --danger: #ff5252;
    --info: #40c4ff;

    --gradient-primary: linear-gradient(135deg, #7c4dff, #448aff);
    --gradient-hero: linear-gradient(135deg, #7c4dff, #e040fb);
    --gradient-card: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));

    --border-color: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(124, 77, 255, 0.3);

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

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Orbitron', sans-serif;

    --nav-height: 70px;
    --container-max: 1400px;

    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) var(--bg-secondary);
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

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

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

select {
    font-family: inherit;
}

/* === Loading Screen === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.loader-logo .logo-icon {
    font-size: 48px;
    animation: glitch-anim 2s infinite;
}

.loader-logo .logo-text {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: text-glitch 3s infinite alternate;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gradient-hero);
    border-radius: 2px;
    animation: loader-fill 2s ease forwards;
}

.loader-text {
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes loader-fill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* === Logo Image Styles === */
.logo-icon-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: var(--transition-base);
}

.loader-logo .logo-icon-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    animation: glitch-anim 2.5s infinite;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-logo:hover .nav-logo-img {
    filter: drop-shadow(0 0 12px var(--accent-glow));
    transform: scale(1.05);
}

.download-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.footer-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    margin-bottom: 4px;
}

@keyframes text-glitch {
    0% { transform: translate(0); text-shadow: none; }
    20% { transform: translate(-2px, 1px); text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; }
    21% { transform: translate(0); text-shadow: none; }
    50% { transform: translate(0); text-shadow: none; }
    52% { transform: translate(2px, -1px); text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff; }
    54% { transform: translate(0); text-shadow: none; }
    100% { transform: translate(0); text-shadow: none; }
}

@keyframes glitch-anim {
    0% { transform: translate(0) scale(1); filter: drop-shadow(0 0 10px var(--accent-glow)) hue-rotate(0deg); }
    10% { transform: translate(-2px, 2px) scale(1.05); filter: drop-shadow(0 0 20px #00ffff) hue-rotate(90deg) contrast(150%); }
    12% { transform: translate(2px, -2px) scale(0.95); filter: drop-shadow(0 0 20px #ff00ff) hue-rotate(-90deg) contrast(150%); }
    14% { transform: translate(0) scale(1.1); filter: drop-shadow(0 0 25px rgba(124, 77, 255, 0.6)) hue-rotate(0deg); }
    16% { transform: translate(0) scale(1); filter: drop-shadow(0 0 10px var(--accent-glow)); }
    100% { transform: translate(0) scale(1); filter: drop-shadow(0 0 10px var(--accent-glow)); }
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--accent-glow)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 20px var(--accent-glow)); }
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo .logo-icon {
    font-size: 28px;
}

.nav-logo .logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.accent {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.nav-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.nav-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-base);
}

.nav-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

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

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-card-hover);
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.search-result-info h4 {
    font-size: 14px;
    font-weight: 600;
}

.search-result-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.search-result-more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: rgba(124, 77, 255, 0.05);
    transition: var(--transition-fast);
}

.search-result-more:hover {
    background: rgba(124, 77, 255, 0.15);
    color: var(--accent);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-base);
    white-space: nowrap;
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass-light);
}

.nav-link.active {
    color: var(--accent-light);
    background: rgba(124, 77, 255, 0.12);
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 8px;
}

.nav-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* === Mobile Menu === */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.mobile-link:hover, .mobile-link.active {
    color: var(--accent-light);
    background: rgba(124, 77, 255, 0.12);
}

/* === Pages === */
.page {
    display: none;
    min-height: 100vh;
    padding-top: var(--nav-height);
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Hero Section === */
.hero {
    position: relative;
    height: 75vh;
    min-height: 500px;
    max-height: 700px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease, transform 8s ease;
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
        var(--bg-primary) 0%,
        rgba(10, 10, 15, 0.7) 40%,
        rgba(10, 10, 15, 0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px 60px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    animation: slideInLeft 0.6s ease;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation: slideInLeft 0.7s ease;
}

.hero-desc {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 16px;
    animation: slideInLeft 0.8s ease;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    animation: slideInLeft 0.9s ease;
}

.hero-meta .meta-tag {
    padding: 4px 12px;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    animation: slideInLeft 1s ease;
}

.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.hero-dot.active {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    width: 28px;
    border-radius: 5px;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-glow {
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-glass-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

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

.btn-lg svg {
    width: 20px;
    height: 20px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* === Sections === */
.section {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.view-all {
    font-size: 14px;
    color: var(--accent-light);
    font-weight: 500;
    transition: var(--transition-base);
}

.view-all:hover {
    color: var(--accent);
}

/* === Game Grid === */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.game-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-base);
    animation: fadeInUp 0.5s ease backwards;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg), 0 0 20px var(--accent-glow);
}

.game-card-image {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

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

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

.game-card-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-card-rating.high { color: var(--success); }
.game-card-rating.medium { color: var(--warning); }
.game-card-rating.low { color: var(--danger); }

.game-card-platform-icons {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
}

.platform-icon {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    backdrop-filter: blur(4px);
}

.game-card-info {
    padding: 14px;
}

.game-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-genres {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(124, 77, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Browse Page === */
.browse-header {
    text-align: center;
    padding: 50px 24px 20px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.browse-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 8px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.browse-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

.browse-filters {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-group select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

.filter-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.browse-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px 20px;
}

.load-more-container {
    text-align: center;
    padding: 20px 0 60px;
}

.btn-load-more {
    min-width: 200px;
}

/* === Categories Page === */
.categories-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 24px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    height: 180px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.category-card:hover .category-card-bg {
    transform: scale(1.08);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0.3) 100%);
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.category-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.category-card-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* === Game Detail Page === */
.detail-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.detail-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.detail-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
        var(--bg-primary) 0%,
        rgba(10, 10, 15, 0.7) 50%,
        rgba(10, 10, 15, 0.3) 100%);
}

.detail-hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px 40px;
    width: 100%;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    margin-bottom: 20px;
    transition: var(--transition-base);
}

.btn-back svg {
    width: 16px;
    height: 16px;
}

.btn-back:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.detail-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta .meta-tag {
    padding: 4px 12px;
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 13px;
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Detail Body */
.detail-body {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 20px 24px 60px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Screenshots */
.screenshots-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.screenshot-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Detail Description */
.detail-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.detail-description p {
    margin-bottom: 12px;
}

/* Info Card */
.info-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

.info-card-header {
    position: relative;
}

.info-card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.info-card-body {
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-of-type {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.info-tag {
    padding: 4px 10px;
    background: rgba(124, 77, 255, 0.12);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    font-size: 11px;
    color: var(--accent-light);
}

/* Requirements Card */
.req-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 20px;
}

.req-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.req-card-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.req-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.req-tab {
    flex: 1;
    padding: 10px;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition-base);
    border-bottom: 2px solid transparent;
}

.req-tab:hover {
    color: var(--text-secondary);
}

.req-tab.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent);
    background: rgba(124, 77, 255, 0.06);
}

.req-content {
    padding: 16px 20px;
}

.req-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.req-item:last-child {
    border-bottom: none;
}

.req-item-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.req-item-value {
    font-size: 13px;
    color: var(--text-primary);
}

.req-no-data {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* === Download Page === */
.download-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.download-hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.download-game-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.download-game-cover {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.download-game-text {
    text-align: left;
}

.download-game-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.download-game-size {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Download Options */
.download-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.download-option {
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--gradient-card);
    transition: var(--transition-base);
    position: relative;
}

.download-option.promoted {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    background: linear-gradient(145deg, rgba(124, 77, 255, 0.08), var(--bg-card));
}

.promoted-badge {
    position: absolute;
    top: -12px;
    left: 28px;
    padding: 4px 16px;
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.download-option-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.download-option-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.download-option-icon.secondary-icon {
    background: var(--bg-glass-light);
    border: 1px solid var(--border-color);
}

.download-option-icon.secondary-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
}

.download-option-info h2 {
    font-size: 20px;
    font-weight: 700;
}

.download-option-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.download-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.download-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

.direct-download-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 171, 0, 0.08);
    border: 1px solid rgba(255, 171, 0, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.direct-download-warning svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
    flex-shrink: 0;
}

.direct-download-warning span {
    font-size: 13px;
    color: var(--warning);
}

.btn-back-detail {
    display: inline-flex;
    margin: 0 auto;
}

/* === Footer === */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 0;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    max-width: 300px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.footer-brand .logo-icon {
    font-size: 28px;
}

.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.footer-links-grid {
    display: flex;
    gap: 50px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: var(--transition-base);
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
}

.skeleton-card .skeleton-image {
    aspect-ratio: 3/4;
}

.skeleton-card .skeleton-text {
    margin: 14px;
    height: 16px;
    border-radius: 4px;
}

.skeleton-card .skeleton-text-sm {
    margin: 0 14px 14px;
    height: 12px;
    width: 60%;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === Screenshot Modal === */
.screenshot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.screenshot-modal.active {
    opacity: 1;
    visibility: visible;
}

.screenshot-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.screenshot-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass-light);
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.screenshot-modal-close:hover {
    background: var(--danger);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .detail-body {
        grid-template-columns: 1fr;
    }

    .info-card {
        position: static;
    }

    .download-features {
        grid-template-columns: 1fr;
    }
}

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

    .nav-menu-btn {
        display: flex;
    }

    .hero {
        height: 60vh;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 18px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }

    .footer-top {
        flex-direction: column;
    }

    .footer-links-grid {
        flex-wrap: wrap;
        gap: 30px;
    }

    .download-game-info {
        flex-direction: column;
        text-align: center;
    }

    .download-game-text {
        text-align: center;
    }

    .download-option {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-search {
        max-width: none;
    }

    .hero {
        height: 50vh;
        min-height: 400px;
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .section {
        padding: 30px 16px;
    }

    .browse-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select {
        min-width: unset;
        width: 100%;
    }

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

    .screenshots-carousel {
        grid-template-columns: 1fr;
    }
}
