/* ============================================================
   FrameForge — Individual Game Detail Page Styles
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.game-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--bg);
}

.game-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: blur(8px) brightness(0.35) saturate(1.4);
    transform: scale(1.1);
    transition: background-image 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-hero-bg.premium-bg {
    filter: blur(20px) brightness(0.4) saturate(1.2);
}

.game-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-deep) 100%);
}

.game-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 120px 40px 48px;
    display: flex;
    align-items: flex-end;
    gap: 40px;
}

.game-cover {
    flex-shrink: 0;
    width: 180px;
    aspect-ratio: 2/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 64px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 8%);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.game-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-cover img.fallback { object-fit: contain; padding: 32px; filter: grayscale(1) opacity(0.2); }

.game-hero-meta { flex: 1; min-width: 0; }

.game-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 16px;
    padding: 6px 14px 6px 10px;
    background: rgb(255 255 255 / 5%);
    border: 1px solid var(--border);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    transition: all .2s;
}
.game-breadcrumb:hover { background: rgb(99 102 241 / 12%); border-color: var(--primary); color: var(--primary-light); }
.game-breadcrumb .material-symbols-rounded { font-size: 16px; }

.game-store-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
    background: rgb(0 0 0 / 60%);
    border: 1px solid rgb(255 255 255 / 15%);
    color: white;
    margin-bottom: 12px;
}

.game-hero-meta h1 {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.05;
    margin: 0 0 16px;
    background: linear-gradient(135deg, var(--text) 30%, var(--primary-light) 100%);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    word-break: break-word;
}

.game-hero-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.game-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    background: rgb(99 102 241 / 12%);
    border: 1px solid rgb(99 102 241 / 25%);
    color: var(--primary-light);
}
.game-tag.green  { background: rgb(16 185 129 / 12%); border-color: rgb(16 185 129 / 25%); color: #34d399; }
.game-tag.cyan   { background: rgb(6 182 212 / 12%);  border-color: rgb(6 182 212 / 25%);  color: #22d3ee; }
.game-tag .material-symbols-rounded { font-size: 16px; }

/* ── Body Layout ──────────────────────────────────────────── */
.game-body {
    max-width: 1260px;
    margin: 0 auto;
    padding: 48px 40px 80px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

/* ── Collapsible Sections ─────────────────────────────────── */
.game-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgb(0 0 0 / 25%);
    margin-bottom: 16px;
    transition: border-color .2s;
}
.game-section:hover { border-color: var(--border-bright); }

.game-section > details > summary {
    list-style: none;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    outline: none;
    transition: background .15s;
}
.game-section > details > summary::-webkit-details-marker { display: none; }
.game-section > details > summary:hover { background: rgb(255 255 255 / 2%); }
.game-section > details[open] > summary { border-bottom: 1px solid var(--border); }

.section-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.section-icon .material-symbols-rounded { color: white; font-size: 20px; }
.section-icon.green-icon  { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 12px rgb(16 185 129 / 30%); }
.section-icon.cyan-icon   { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 4px 12px rgb(6 182 212 / 30%); }
.section-icon.orange-icon { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgb(245 158 11 / 30%); }

.section-title { flex: 1; font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -.01em; }

.section-chevron { color: var(--text-muted); font-size: 20px; transition: transform .25s cubic-bezier(.4,0,.2,1); }
details[open] .section-chevron { transform: rotate(180deg); }

.section-body { padding: 28px; animation: fadeSlide .2s ease; }
@keyframes fadeSlide { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.section-body p { margin: 0; color: var(--text-secondary); font-size: .95rem; line-height: 1.75; }
.section-body .muted { color: var(--text-muted); font-size: .85rem; font-style: italic; }

/* Info Grid */
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; align-items: start; }
.info-key { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; white-space: nowrap; }
.info-val { font-size: .9rem; color: var(--text); font-family: 'JetBrains Mono', Consolas, monospace; background: rgb(99 102 241 / 8%); padding: 3px 10px; border-radius: 6px; word-break: break-all; }
.info-val.plain { font-family: inherit; background: none; padding: 0; }

.source-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 14px;
    font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.source-chip.telemetry { background: rgb(6 182 212 / 12%); border: 1px solid rgb(6 182 212 / 25%); color: #22d3ee; }
.source-chip.community { background: rgb(16 185 129 / 12%); border: 1px solid rgb(16 185 129 / 25%); color: #34d399; }
.source-chip .material-symbols-rounded { font-size: 14px; }

/* ── Sidebar ──────────────────────────────────────────────── */
.game-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 25%);
}
.sidebar-card h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; margin: 0 0 16px; }

.stat-card { background: rgb(99 102 241 / 8%); border: 1px solid rgb(99 102 241 / 18%); border-radius: var(--radius); padding: 20px 24px; text-align: center; margin-bottom: 12px; }
.stat-card .stat-value { font-size: 2.2rem; font-weight: 900; background: linear-gradient(135deg, var(--primary-light), var(--accent)); background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; margin-bottom: 4px; letter-spacing: -.03em; }
.stat-card .stat-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

.btn-steam {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 13px 20px; box-sizing: border-box;
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    border: 1px solid rgb(102 192 244 / 30%); border-radius: var(--radius);
    color: #c6d4df; font-size: .9rem; font-weight: 700; text-decoration: none;
    transition: all .25s;
}
.btn-steam:hover { background: linear-gradient(135deg, #2a475e 0%, #3d6b8c 100%); border-color: rgb(102 192 244 / 60%); color: white; transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / 40%); }
.btn-steam .fa-steam { font-size: 20px; }

/* ── 404 ──────────────────────────────────────────────────── */
.not-found-wrap { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; }
.not-found-wrap .material-symbols-rounded { font-size: 80px; color: var(--text-muted); margin-bottom: 20px; }
.not-found-wrap h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.not-found-wrap p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 32px; }

/* --- Premium Elements --- */

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.screenshot-grid img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgb(255 255 255 / 10%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-grid img:hover {
    transform: scale(1.04) translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 20px rgb(0 0 0 / 40%);
}

.info-sidebar-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.is-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 8px;
    border-bottom: 1px solid rgb(255 255 255 / 5%);
}

.is-key {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.is-val {
    font-size: 0.85rem;
    color: var(--text-bright);
    text-align: right;
    max-width: 60%;
}

.live-active {
    color: #4ade80 !important;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.live-active::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 10px #4ade80;
    animation: pc-pulse 2s infinite;
}

@keyframes pc-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

/* Entrance Animations */
.game-section, .sidebar-card {
    opacity: 0;
    animation: card-entrance 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.game-section:nth-child(1) { animation-delay: 0.1s; }
.game-section:nth-child(2) { animation-delay: 0.2s; }
.game-section:nth-child(3) { animation-delay: 0.3s; }
.game-section:nth-child(4) { animation-delay: 0.4s; }
.game-section:nth-child(5) { animation-delay: 0.5s; }

.sidebar-card:nth-child(1) { animation-delay: 0.2s; }
.sidebar-card:nth-child(2) { animation-delay: 0.3s; }
.sidebar-card:nth-child(3) { animation-delay: 0.4s; }

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

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    transform: scale(0.95);
    animation: zoomIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.9); } to { transform: scale(1); } }

/* System Requirements */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 10px;
}

.specs-col h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.specs-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Steam Specs Styling Override */
.specs-content ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.specs-content li { margin-bottom: 8px; font-size: 0.82rem; }
.specs-content strong { color: var(--text-bright); display: block; font-size: 0.72rem; text-transform: uppercase; margin-bottom: 2px; letter-spacing: 0.05em; }

@media (max-width: 900px) {
    .specs-grid { grid-template-columns: 1fr; }
}

/* ── Shimmer ──────────────────────────────────────────────── */
.shimmer { background: linear-gradient(90deg, rgb(255 255 255 / 3%) 25%, rgb(255 255 255 / 8%) 50%, rgb(255 255 255 / 3%) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; height: 16px; margin-bottom: 10px; }
.shimmer:last-child { width: 70%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Responsive ───────────────────────────────────────────── */
@media (width <= 1024px) {
    .game-body { grid-template-columns: 1fr; }
    .game-sidebar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); }
}
@media (width <= 768px) {
    .game-hero-content { flex-direction: column; align-items: flex-start; padding: 100px 24px 36px; gap: 24px; }
    .game-cover { width: 130px; }
    .game-hero-meta h1 { font-size: 2.1rem; }
    .game-body { padding: 32px 20px 60px; }
    .game-sidebar { grid-template-columns: 1fr; }
}
