:root {
    --game-bg: #f7f8ff;
    --game-surface: #fff;
    --game-text: #171721;
    --game-muted: #6f7184;
    --game-line: rgba(25,25,40,.08);
    --game-purple: #5b4dff;
    --game-purple-dark: #473af4;
    --game-yellow: #ffe67d;
    --game-blue: #8ee7ff;
    --game-pink: #ff9dbf;
    --game-green: #8fe6ae;
}

.quick-games {
    display: none;
}

.game-page {
    min-height: 100vh;
    color: var(--game-text);
    background: radial-gradient(circle at 8% 3%, rgba(255,230,125,.3), transparent 20%), radial-gradient(circle at 92% 4%, rgba(142,231,255,.26), transparent 22%), var(--game-bg);
}

.game-wide {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 12px;
    padding-right: 12px;
}

.game-top {
    margin: 0;
    padding: 0 0 3px;
}

.breadcrumbs {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 3px 0 4px;
    color: #8c8d9f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.breadcrumbs a {
    color: var(--game-purple);
    font-weight: 900;
}

.breadcrumbs a:hover {
    color: var(--game-purple-dark);
}

.breadcrumbs > span:last-child {
    color: #747587;
    font-weight: 700;
}

.breadcrumb-separator {
    color: #b8bac8;
    font-weight: 700;
}

.game-title-row {
    position: relative;
    min-height: 31px;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.game-title-copy {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    z-index: 2;
}

.game-category {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid rgba(91,77,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.76);
    color: var(--game-purple);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.top-game-title {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    max-width: 70%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    text-align: center;
    transform: translate(-50%, -50%);
}

.top-game-title h1 {
    margin: 0;
    padding: 0;
    color: var(--game-text);
    font-size: clamp(18px, 1.6vw, 27px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.035em;
    white-space: nowrap;
}

.top-game-title h1 span {
    background: linear-gradient(90deg, #5b4dff, #9b45ff, #ff4e91, #ff8a3d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(91,77,255,.22);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(245,244,255,.9));
    color: #aaa9b9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
}

.ad-slot small {
    display: block;
    margin-top: 3px;
    color: #b8b7c6;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.inline-ad {
    min-height: 85px;
    margin-top: 12px;
}

.compact-side-ad {
    width: 100%;
    min-height: 180px;
    margin-top: 10px;
    padding: 14px;
    border-radius: 15px;
}

.compact-side-ad small {
    font-size: 7px;
}

.compact-side-ad-secondary {
    width: 100%;
    min-height: 120px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 15px;
}

.compact-side-ad-secondary small {
    font-size: 7px;
}

.game-layout {
    display: grid;
    grid-template-columns: minmax(170px, 195px) minmax(0, 1fr) minmax(205px, 235px);
    gap: 10px;
    align-items: start;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 28px;
}

.side-column {
    position: sticky;
    top: 100px;
}

.game-center {
    min-width: 0;
}

.game-shell {
    overflow: hidden;
    border: 1px solid rgba(25,25,40,.09);
    border-radius: 18px;
    background: #151922;
    box-shadow: 0 20px 55px rgba(31,35,80,.13);
}

.game-frame {
    width: 100%;
    overflow: hidden;
    background: #151922;
}

.game-toolbar {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 12px 9px 15px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: #11151d;
    color: #fff;
}

.game-toolbar-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.game-toolbar-title {
    font-size: 13px;
    font-weight: 900;
}

.game-toolbar-category {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #929aa9;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.game-toolbar-right {
    display: flex;
    gap: 7px;
}

.game-tool {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.game-tool:hover {
    background: rgba(255,255,255,.12);
}

.game-info {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 10px;
    margin-top: 10px;
}

.game-info-card {
    position: relative;
    overflow: hidden;
    padding: 15px 17px;
    border: 1px solid rgba(25,25,40,.06);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(31,35,80,.045);
}

.game-info-card.controls-card {
    background: linear-gradient(145deg, #fff0ae, #fffaf0);
}

.game-info-card.about-card {
    background: linear-gradient(145deg, #e5f7ff, #f8fcff);
}

.game-info-label {
    display: block;
    margin-bottom: 6px;
    color: var(--game-purple);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.game-info h2 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.game-info p {
    margin: 0;
    color: var(--game-muted);
    font-size: 12px;
    line-height: 1.55;
}

.sidebar-panel {
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--game-line);
    border-radius: 20px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 10px 30px rgba(31,35,80,.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sidebar-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 11px;
}

.sidebar-panel-header strong {
    color: var(--game-text);
    font-size: 15px;
    line-height: 1.2;
}

.sidebar-panel-header a {
    flex: 0 0 auto;
    color: var(--game-purple);
    font-size: 10px;
    font-weight: 900;
}

.sidebar-related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-related-game {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(31,35,80,.05);
    transition: transform .18s ease, box-shadow .18s ease;
}

.sidebar-related-game:hover {
    transform: translateX(3px);
    box-shadow: 0 9px 22px rgba(31,35,80,.1);
}

.sidebar-related-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffe67d, #fff5c5);
    font-size: 27px;
}

.sidebar-related-game:nth-child(4n+2) .sidebar-related-icon {
    background: linear-gradient(145deg, #8ee7ff, #d8f7ff);
}

.sidebar-related-game:nth-child(4n+3) .sidebar-related-icon {
    background: linear-gradient(145deg, #bba0ff, #e8dcff);
}

.sidebar-related-game:nth-child(4n+4) .sidebar-related-icon {
    background: linear-gradient(145deg, #ff9dbf, #ffe0ea);
}

.sidebar-related-copy {
    min-width: 0;
}

.sidebar-related-copy small {
    display: block;
    margin-bottom: 3px;
    color: #9798a8;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sidebar-related-copy strong {
    display: block;
    overflow: hidden;
    color: var(--game-text);
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-controls {
    padding: 13px 15px;
    border: 1px solid var(--game-line);
    border-radius: 18px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 8px 25px rgba(31,35,80,.05);
}

.quick-controls-label {
    margin-bottom: 7px;
    color: var(--game-purple);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.quick-controls strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.quick-controls p {
    margin: 0;
    color: var(--game-muted);
    font-size: 11px;
    line-height: 1.45;
}

.game-navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.game-navigation-card {
    min-width: 0;
    display: block;
    padding: 10px;
    border: 1px solid var(--game-line);
    border-radius: 14px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 6px 18px rgba(31,35,80,.05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.game-navigation-card:hover {
    transform: translateX(-3px);
    border-color: rgba(91,77,255,.2);
    box-shadow: 0 10px 25px rgba(31,35,80,.1);
}

.game-navigation-direction {
    display: block;
    margin-bottom: 6px;
    color: var(--game-purple);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.game-navigation-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-navigation-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffe67d, #fff5c5);
    font-size: 26px;
}

.game-navigation-info > span:last-child {
    min-width: 0;
}

.game-navigation-info small {
    display: block;
    margin-bottom: 2px;
    color: #9495a5;
    font-size: 7px;
    font-weight: 900;
    text-transform: uppercase;
}

.game-navigation-info strong {
    display: block;
    overflow: hidden;
    color: var(--game-text);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-navigation-random {
    background: linear-gradient(145deg, rgba(232,224,255,.92), rgba(255,255,255,.96));
}

.game-navigation-random .game-navigation-icon {
    background: linear-gradient(145deg, #bba0ff, #e8dcff);
}

.game-navigation-next .game-navigation-icon {
    background: linear-gradient(145deg, #8ee7ff, #d8f7ff);
}

.sidebar-play-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-play-game {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(31,35,80,.045);
    transition: transform .18s ease, box-shadow .18s ease;
}

.sidebar-play-game:hover {
    transform: translateX(-3px);
    box-shadow: 0 8px 20px rgba(31,35,80,.09);
}

.sidebar-play-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(145deg, #ffe67d, #fff5c5);
    font-size: 25px;
}

.sidebar-play-game:nth-child(3n+2) .sidebar-play-icon {
    background: linear-gradient(145deg, #8ee7ff, #d8f7ff);
}

.sidebar-play-game:nth-child(3n+3) .sidebar-play-icon {
    background: linear-gradient(145deg, #bba0ff, #e8dcff);
}

.sidebar-play-copy {
    min-width: 0;
}

.sidebar-play-copy strong {
    display: block;
    overflow: hidden;
    color: var(--game-text);
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-play-copy small {
    display: block;
    margin-top: 3px;
    color: #9495a5;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sidebar-play-all {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    border-radius: 11px;
    background: #171721;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    transition: background .18s ease;
}

.sidebar-play-all:hover {
    background: var(--game-purple);
}

.mobile-side-content {
    display: none;
}

.mobile-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.mobile-ad {
    display: none;
}

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

    .left-column {
        display: none;
    }

    .mobile-side-content {
        display: block;
    }

    .compact-side-ad,
    .compact-side-ad-secondary {
        display: none;
    }
}

@media (max-width: 900px) {
    .right-column {
        display: none;
    }

    .game-layout {
        display: block;
    }

    .mobile-ad {
        display: flex;
        min-height: 85px;
        margin-top: 12px;
    }

    .mobile-side-content {
        display: block;
    }

    .mobile-side-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .game-wide {
        width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .game-top {
        margin: 0;
        padding: 0 0 4px;
    }

    .breadcrumbs {
        overflow-x: auto;
        justify-content: center;
        gap: 6px;
        margin: 0;
        padding: 3px 0 4px;
        font-size: 10px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }

    .game-title-row {
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    .game-title-copy {
        margin: 0;
    }

    .game-category {
        padding: 4px 8px;
        font-size: 8px;
    }

    .top-game-title {
        position: static;
        width: 100%;
        max-width: none;
        margin: 0;
        transform: none;
        text-align: center;
    }

    .top-game-title h1 {
        font-size: clamp(18px, 5vw, 24px);
        white-space: normal;
    }

    .game-layout {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 20px;
    }

    .game-shell {
        border-radius: 15px;
    }

    .game-toolbar-category {
        display: none;
    }

    .game-info {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .game-info-card {
        padding: 16px;
        border-radius: 16px;
    }

    .mobile-side-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-panel {
        padding: 12px;
    }

    .sidebar-related-game {
        padding: 9px;
    }

    .game-navigation-card {
        padding: 10px;
    }
}

@media (min-width: 1181px) {
    .game-layout {
        grid-template-columns: minmax(205px, 225px) minmax(0, 1fr) minmax(245px, 270px);
    }
}