.game-detail-page .game-page {
    max-width: 1480px;
    margin: 0 auto;
}

.game-detail-page .game-title-bar {
    margin-bottom: 16px;
    padding: 0;
    border: 0;
    background: transparent;
}

.game-detail-page .game-title-bar h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.15;
    letter-spacing: 0;
}

.game-detail-page .game-title-bar .game-stats {
    margin-top: 8px;
}

.game-detail-page .game-title-bar .game-quick-info {
    display: none;
}

.game-detail-page .game-stage-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 16px;
    align-items: start;
}

.game-detail-page .game-stage-layout.no-next-games {
    grid-template-columns: 1fr;
}

.game-detail-page .game-stage-main {
    min-width: 0;
}

.game-detail-page .game-stage-main .game-frame-wrapper {
    margin: 0;
}

.game-detail-page .game-stage-main .game-controls {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(144, 156, 255, 0.16);
    border-radius: 8px;
    background: #111622;
}

.game-detail-page .game-stage-main .game-controls .btn {
    min-height: 42px;
    margin: 0;
    padding: 0 14px;
    border-radius: 6px;
    justify-content: center;
    font-size: 0.78rem;
    letter-spacing: 0;
    box-shadow: none;
    transition: color 170ms ease, background-color 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.game-detail-page .game-stage-main .game-controls .btn.btn-primary,
.game-detail-page .ctp-play-btn {
    border-color: #626fe3;
    color: #ffffff;
    background: #626fe3;
    box-shadow: none;
}

.game-detail-page .ctp-external-btn {
    border: 1px solid rgba(144, 156, 255, 0.3);
    color: #d4d8e4;
    background: #252b40;
    box-shadow: none;
}

.game-detail-page .ctp-play-btn:hover,
.game-detail-page .ctp-play-btn:focus-visible,
.game-detail-page .game-stage-main .game-controls .btn.btn-primary:hover,
.game-detail-page .game-stage-main .game-controls .btn.btn-primary:focus-visible {
    border-color: #7380ee;
    background: #7380ee;
}

.game-detail-page .ctp-external-btn:hover,
.game-detail-page .ctp-external-btn:focus-visible {
    border-color: rgba(139, 151, 255, 0.65);
    color: #ffffff;
    background: #30374f;
}

.game-detail-page .game-stage-main .game-controls .btn:not(.btn-primary) {
    border-color: rgba(144, 156, 255, 0.24);
    color: #c5cada;
    background: #181d2b;
}

.game-detail-page .game-stage-main .game-controls .btn:hover,
.game-detail-page .game-stage-main .game-controls .btn:focus-visible {
    transform: translateY(-1px);
}

.game-detail-page .game-stage-main .game-controls .btn:not(.btn-primary):hover,
.game-detail-page .game-stage-main .game-controls .btn:not(.btn-primary):focus-visible {
    border-color: rgba(139, 151, 255, 0.62);
    color: #ffffff;
    background: #252b40;
}

.game-detail-page .game-next-rail {
    min-width: 0;
    padding: 0;
}

.game-detail-page .game-next-rail h2 {
    margin: 0 0 10px;
    color: #f7f8fb;
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}

.game-detail-page .game-next-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.game-detail-page .game-next-card {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    background: #141824;
}

.game-detail-page .game-next-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.game-detail-page .game-next-card span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 28px 10px 8px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    background: linear-gradient(to top, rgba(5, 7, 12, 0.96), rgba(5, 7, 12, 0));
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.game-detail-page .game-next-card:hover img,
.game-detail-page .game-next-card:focus-visible img {
    transform: scale(1.018);
}

.game-detail-page .game-next-card:hover span,
.game-detail-page .game-next-card:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.game-detail-page .game-next-card:focus-visible {
    outline: 2px solid #ff4da6;
    outline-offset: 2px;
}

.game-detail-page .game-description {
    margin-top: 32px;
}

.game-detail-page .game-description > h2,
.game-detail-page .game-share-section > h2,
.game-detail-page .rating-header > h2,
.game-detail-page .comments-header > h2 {
    font-size: 1.16rem;
    line-height: 1.35;
    letter-spacing: 0;
}

.game-detail-page .game-source-summary {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 200, 255, 0.2);
}

.game-detail-page .game-source-summary h3,
.game-detail-page .game-test-info h3 {
    margin: 0 0 9px;
    color: #29c8ff;
    font-size: 1.02rem;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: uppercase;
}

.game-detail-page .game-source-summary p {
    max-width: 900px;
    margin: 0;
    color: #c4c9d8;
    font-size: 0.92rem;
    line-height: 1.7;
}

@media (max-width: 1050px) {
    .game-detail-page .game-stage-layout {
        grid-template-columns: 1fr;
    }

    .game-detail-page .game-next-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 5px;
        scroll-snap-type: x proximity;
    }

    .game-detail-page .game-next-card {
        flex: 0 0 210px;
        scroll-snap-align: start;
    }
}

@media (max-width: 600px) {
    .game-detail-page .game-title-bar h1 {
        font-size: 1.35rem;
    }

    .game-detail-page .game-next-card {
        flex-basis: 158px;
    }

    .game-detail-page .game-next-card span {
        padding: 24px 8px 7px;
        font-size: 0.72rem;
        opacity: 1;
        transform: none;
    }

    .game-detail-page .game-stage-main .game-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 8px;
    }

    .game-detail-page .game-stage-main .game-controls .btn {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        white-space: normal;
        line-height: 1.2;
    }

    .game-detail-page .game-stage-main .game-controls .btn:first-child {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-detail-page .game-next-card img,
    .game-detail-page .game-next-card span {
        transition: none;
    }
}


/* Mobile game launch and accessible controls */
.game-detail-page .game-frame-wrapper {
    position: relative;
}

.game-detail-page .game-orientation-notice {
    position: absolute;
    top: 10px;
    right: 10px;
    left: 10px;
    z-index: 24;
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 12px;
    color: #e9f6ff;
    background: rgba(5, 18, 34, 0.94);
    border: 1px solid rgba(87, 201, 250, 0.38);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.35;
}

.game-detail-page .game-orientation-notice[hidden] {
    display: none;
}

.game-detail-page .game-orientation-notice > i {
    flex: 0 0 auto;
    color: #57c9fa;
    font-size: 1rem;
}

.game-detail-page .game-orientation-notice span {
    min-width: 0;
    margin-right: auto;
}

.game-detail-page .game-orientation-notice button,
.game-detail-page .mobile-game-toolbar button {
    appearance: none;
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #eef7ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
}

.game-detail-page .game-orientation-notice button:hover,
.game-detail-page .mobile-game-toolbar button:hover {
    color: #ffffff;
    background: rgba(87, 201, 250, 0.2);
    border-color: rgba(87, 201, 250, 0.5);
}

.game-detail-page .game-orientation-notice button:focus-visible,
.game-detail-page .mobile-game-toolbar button:focus-visible,
.game-detail-page .ctp-fullscreen-btn:focus-visible,
.game-detail-page .game-controls .btn:focus-visible {
    outline: 3px solid rgba(87, 201, 250, 0.32);
    outline-offset: 2px;
}

.game-detail-page .ctp-fullscreen-btn {
    display: none;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    color: #061522;
    background: #57c9fa;
    border: 1px solid #87dafd;
    border-radius: 8px;
    box-shadow: none;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    cursor: pointer;
}

.game-detail-page .mobile-game-toolbar {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 30;
    display: flex;
    gap: 8px;
}

.game-detail-page .mobile-game-toolbar[hidden] {
    display: none;
}

.game-detail-page .game-frame-wrapper.is-fullscreen,
.game-detail-page .game-frame-wrapper:fullscreen,
.game-detail-page .game-frame-wrapper:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    background: #000;
    border: 0;
    border-radius: 0;
    aspect-ratio: auto;
}

.game-detail-page .game-stage-main .game-controls .btn {
    min-height: 44px;
}

@media (max-width: 820px) {
    .game-detail-page .ctp-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: min(100%, 430px);
    }

    .game-detail-page .ctp-play-btn {
        grid-column: 1 / -1;
        width: 100%;
    }

    .game-detail-page .ctp-fullscreen-btn {
        display: inline-flex;
        width: 100%;
    }

    .game-detail-page .ctp-external-btn {
        width: 100%;
        min-height: 48px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .game-detail-page .game-stage-main .game-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .game-detail-page .game-stage-main .game-controls .btn,
    .game-detail-page .game-stage-main .game-controls .btn:first-child {
        grid-column: auto;
        min-height: 48px;
        padding: 0;
        white-space: nowrap;
    }

    .game-detail-page .game-stage-main .game-controls .btn i {
        margin: 0;
        font-size: 1rem;
    }

    .game-detail-page .game-stage-main .game-controls .game-control-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .game-detail-page .game-orientation-notice {
        top: 8px;
        right: 8px;
        left: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-detail-page .game-orientation-notice,
    .game-detail-page .mobile-game-toolbar,
    .game-detail-page .game-stage-main .game-controls .btn {
        transition: none;
    }
}
