.wc-games {
    padding-block: 24px 42px;
}

.wc-games h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 750;
}

.wc-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 16px;
    max-width: 1140px;
    margin-top: 22px;
}

.wc-game-card,
#wc-game-page {
    color: var(--wc-text);
    background: var(--wc-surface);
    border: 1px solid var(--wc-border);
    border-radius: 14px;
}

.wc-game-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wc-game-art {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 7;
    color: #fff;
    background: #263550;
    font-size: 44px;
}

.wc-game-art img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.wc-game-art-race { background: #514597; }
.wc-game-art-platform { background: #215482; }
.wc-game-art-bricks { background: #874467; }
.wc-game-art-maze { background: #096476; }

.wc-game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
}

.wc-game-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.wc-game-info .btn {
    margin-top: auto;
}
.wc-game-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
}
.wc-game-info p { margin-bottom: 18px; }
.wc-game-info .wc-game-genre {
    margin-bottom: 5px;
    color: var(--studio-muted);
    font-size: 13px;
}

#pt-body .wc-games .btn {
    min-height: 42px;
    border: 1px solid var(--wc-border);
    border-radius: 8px;
    background: var(--wc-tint);
    color: var(--wc-text) !important;
    font-weight: 700;
}

#wc-game-page {
    max-width: 820px;
    margin-top: 18px;
    padding: clamp(10px, 3vw, 18px);
}

.wc-games-back {
    display: inline-block;
    margin-bottom: 12px;
}

.wc-game-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    gap: 22px;
    align-items: start;
    margin-top: 18px;
}

.wc-game-layout-with-ad {
    column-gap: 160px;
}

.wc-game-sidebar-ad {
    margin-top: 28px;
    text-align: center;
}

@media (max-width: 1000px) {
    .wc-game-layout-with-ad {
        grid-template-columns: minmax(0, 1fr);
    }

    .wc-game-sidebar-ad {
        margin-top: 160px;
    }
}

.wc-game-embed,
.wc-game-description,
.wc-game-related {
    background: var(--wc-surface);
    border: 1px solid var(--wc-border);
    border-radius: 12px;
}

.wc-game-embed {
    overflow: hidden;
    background: #0c1525;
}

.wc-game-embed iframe {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 72dvh;
    margin: auto;
    border: 0;
}

.wc-game-embed-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 14px;
    background: var(--wc-surface);
}

.wc-game-description,
.wc-game-related {
    padding: 16px;
}

.wc-game-description {
    margin-top: 16px;
}

.wc-game-description h2,
.wc-game-related h2 {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
}

.wc-game-related a {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 8px;
}

.wc-game-related a:hover { background: var(--wc-tint); }
.wc-game-related img,
.wc-game-related i {
    width: 54px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--wc-tint);
}

.wc-game-related i {
    display: grid;
    place-items: center;
}

@media (max-width: 760px) {
    .wc-game-layout { grid-template-columns: minmax(0, 1fr); }
}

.wc-game-ad {
    max-width: 820px;
    margin-top: 160px;
    text-align: center;
}

#wc-game-screen {
    display: block;
    width: 100%;
    height: auto;
    max-height: 53dvh;
    object-fit: contain;
    border-radius: 8px;
    background: #142239;
}

#wc-game-help {
    margin: 10px 0;
    color: var(--studio-muted);
}

.wc-game-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wc-game-controls [data-key] {
    touch-action: none;
    user-select: none;
}

.wc-game-controls [hidden] { display: none !important; }
