:root {
    --bg: #05080f;
    --bg-elevated: #101a2a;
    --surface: #17233a;
    --text: #ecf1ff;
    --muted: #a5b3d4;
    --accent: #ff784a;
    --accent-2: #35c4ff;
    --success: #00b27a;
    --danger: #ff3f64;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 15% 0%, #1f2f53 0%, var(--bg) 60%);
    min-height: 100vh;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
    background: rgba(8, 13, 24, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    font-weight: 800;
    color: var(--accent);
}

.site-header nav {
    display: flex;
    gap: 1.25rem;
}

main {
    padding: 1.5rem 2rem 3rem;
}

.hero {
    position: relative;
    border-radius: 22px;
    padding: 3rem;
    margin-bottom: 2rem;
    background:
        linear-gradient(100deg, rgba(2, 7, 18, 0.92) 30%, rgba(2, 7, 18, 0.58) 70%, rgba(2, 7, 18, 0.35)),
        url("https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    animation: rise-in 0.8s ease;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 12%, rgba(255, 120, 74, 0.28), transparent 48%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 55ch;
}

.hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.grid-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.game-tile {
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.game-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.35);
}

.game-tile img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.tile-overlay {
    padding: 0.8rem;
}

.tile-overlay h3 {
    margin: 0;
    font-size: 1rem;
}

.tile-overlay p {
    margin: 0.5rem 0;
    color: var(--muted);
    min-height: 2.5rem;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.84rem;
    color: #d3dcf9;
}

.stream-hero {
    border-radius: 18px;
    overflow: hidden;
    min-height: min(72vh, 720px);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

.stream-overlay {
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(250px, 320px) 1fr;
    align-items: end;
    gap: 1.5rem;
    padding: 2rem;
}

.stream-left-rail h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stream-play-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: #f0f2f7;
    color: #10151f;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.stream-play-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.stream-like-form {
    margin-top: 0.7rem;
}

.stream-icon-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    background: rgba(8, 13, 23, 0.72);
    color: var(--text);
    padding: 0.72rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.stream-included {
    margin: 0.8rem 0 0;
    color: #9cc4ff;
    font-size: 0.92rem;
}

.stream-main-copy {
    max-width: 74ch;
    margin-bottom: 0.2rem;
}

.stream-description {
    font-size: clamp(1.02rem, 2.2vw, 1.55rem);
    line-height: 1.45;
    margin: 0;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.65);
}

.stream-meta {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #d6def8;
    font-size: 0.95rem;
}

.stream-meta span {
    position: relative;
    padding-right: 0.75rem;
}

.stream-meta span:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: 0;
    opacity: 0.6;
}

.stream-version-row {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.stream-version-title {
    margin: 1.05rem 0 0.35rem;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #89b4f8;
    font-weight: 700;
}

.stream-tabs {
    margin-top: 1rem;
    display: flex;
    gap: 1.4rem;
    padding: 0.15rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.stream-tabs .tab {
    padding: 0.85rem 0.25rem;
    opacity: 0.82;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #dce8ff;
}

.stream-tabs .tab.active,
.stream-tabs .tab:hover {
    opacity: 1;
    border-bottom: 2px solid var(--accent-2);
}

.detail-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: min(45vh, 380px);
    object-fit: cover;
    filter: brightness(0.72) saturate(1.06);
}

.banner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.8rem;
    padding: 1.5rem;
    background:
        linear-gradient(90deg, rgba(3, 7, 17, 0.82) 22%, rgba(3, 7, 17, 0.16) 65%),
        linear-gradient(transparent 22%, rgba(0, 0, 0, 0.78));
}

.version-block,
.engagement-grid,
.comments-area,
.play-shell {
    margin-top: 1.5rem;
    background: linear-gradient(120deg, rgba(14, 23, 39, 0.96), rgba(8, 20, 42, 0.88));
    border: 1px solid rgba(140, 188, 255, 0.15);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 28px rgba(0, 0, 0, 0.24);
}

.version-block h2,
.comments-area h2 {
    margin-top: 0;
    letter-spacing: 0.01em;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.version-list {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.version-chip {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--muted);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.version-chip.active,
.version-chip:hover {
    color: white;
    border-color: var(--accent-2);
}

.cta-play,
.secondary-btn {
    margin-top: 1rem;
    display: inline-block;
    border: 0;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(120deg, var(--accent), #ff4f91);
    color: white;
}

.secondary-btn {
    background: linear-gradient(120deg, var(--accent-2), #148fda);
    box-shadow: 0 8px 24px rgba(20, 143, 218, 0.3);
}

.comment-form {
    display: grid;
    gap: 0.5rem;
}

.comment-form input,
.comment-form textarea {
    background: #071225;
    color: white;
    border: 1px solid rgba(173, 206, 255, 0.24);
    border-radius: 12px;
    padding: 0.8rem;
}

.comment-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.65rem;
}

.comment-item {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(10, 20, 38, 0.9);
    border: 1px solid rgba(133, 170, 230, 0.18);
}

.comment-item h4 {
    margin: 0 0 0.4rem;
}

.player-container iframe {
    margin-top: 0.8rem;
    width: 100%;
    height: min(75vh, 760px);
    border: 0;
    border-radius: 10px;
    background: #000;
}

.play-shell-wide {
    margin-top: 0.75rem;
    padding: 0.65rem;
}

.play-header-wide {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.2rem 0.2rem 0.45rem;
}

.play-header-wide h1 {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.play-header-wide .version-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.play-version-label {
    display: inline-flex;
    align-items: center;
    color: #a9bfec;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-right: 0.35rem;
    transform: translateY(-1px);
}

.player-container-wide iframe {
    margin-top: 0;
    height: min(88vh, 980px);
    border-radius: 12px;
}

.pagination {
    margin-top: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.pagination a {
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    background: #1a2b4a;
}

.alerts {
    display: grid;
    gap: 0.5rem;
    padding: 0 2rem;
}

.alert {
    margin-top: 0.7rem;
    padding: 0.65rem;
    border-radius: 8px;
    background: #1c2d4a;
}

.alert.success {
    border-left: 4px solid var(--success);
}

.alert.error {
    border-left: 4px solid var(--danger);
}

.site-footer {
    padding: 1rem 2rem 2rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.footer-links a {
    color: #d9e4ff;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.empty-state {
    color: var(--muted);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.9rem 1rem;
    }

    main {
        padding: 1rem;
    }

    .hero {
        padding: 1.6rem;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .banner-image {
        height: 220px;
    }

    .stream-overlay {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 1.1rem;
    }

    .stream-left-rail {
        order: 2;
    }

    .stream-main-copy {
        order: 1;
    }

    .stream-description {
        font-size: 1rem;
    }

    .play-shell-wide {
        padding: 0.45rem;
    }

    .play-header-wide {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .play-header-wide .version-list {
        justify-content: flex-start;
    }

    .player-container-wide iframe {
        height: min(82vh, 760px);
    }
}
