
.wp-block-tongvh-bo-cuc-game-steam-chuan,
.tongvh-steam-layout {
    --tongvh-steam-bg-dark: #0f1923;
    --tongvh-steam-bg-mid: #162531;
    --tongvh-steam-text: #c7d5e0;
    --tongvh-steam-text-soft: #8f98a0;
    --tongvh-steam-text-label: #556772;
    --tongvh-steam-link: #66c0f4;
    --tongvh-steam-tag-bg: rgba(103, 193, 245, 0.16);
    --tongvh-steam-tag-text: #67c1f5;
    width: 100%;
    max-width: 1048px;
    margin: 0 auto 24px;
    font-family: Arial, Helvetica, sans-serif;
}

.wp-block-tongvh-bo-cuc-game-steam-chuan *,
.tongvh-steam-layout * {
    box-sizing: border-box;
}

.tongvh-steam-layout__inner {
    width: 100%;
    aspect-ratio: 1048 / 471;
    display: grid;
    grid-template-columns: minmax(0, 64.6946565%) minmax(0, 35.3053435%);
    align-items: stretch;
    gap: 0;
    overflow: hidden;
}

.tongvh-steam-layout__left,
.tongvh-steam-layout__right {
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.tongvh-steam-layout__left {
    background: #000;
    overflow: hidden;
}

.tongvh-steam-layout__right {
    display: grid;
    grid-template-rows: minmax(0, 42.462845%) minmax(0, 1fr);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(42, 71, 94, 0.92) 0%, rgba(20, 34, 49, 0.98) 58%, rgba(15, 25, 35, 1) 100%);
    color: var(--tongvh-steam-text);
}

.tongvh-steam-layout__poster {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #10161d;
}

.tongvh-steam-layout__poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-position: center center;
}

.tongvh-steam-layout__poster--cover img {
    object-fit: cover;
}

.tongvh-steam-layout__poster--contain img {
    object-fit: contain;
    background: #10161d;
}

.tongvh-steam-layout__poster--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(199, 213, 224, 0.55);
    font-size: 14px;
    letter-spacing: 0.02em;
}

.tongvh-steam-layout__info {
    min-height: 0;
    padding: 12px 14px 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tongvh-steam-layout__desc {
    margin: 0 0 12px;
    color: #c6d4df;
    font-size: clamp(12px, 1.16vw, 14px);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
    overflow: hidden;
}

.tongvh-steam-layout__desc p {
    margin: 0 0 6px;
}

.tongvh-steam-layout__desc p:last-child {
    margin-bottom: 0;
}

.tongvh-steam-layout__meta {
    display: grid;
    gap: 6px;
    margin-top: 0;
}

.tongvh-steam-layout__row {
    display: grid;
    grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.tongvh-steam-layout__label,
.tongvh-steam-layout__tags-label {
    color: var(--tongvh-steam-text-label);
    font-size: 12px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.tongvh-steam-layout__value {
    min-width: 0;
    color: var(--tongvh-steam-text);
    font-size: clamp(12px, 1.12vw, 14px);
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tongvh-steam-layout__value a {
    color: var(--tongvh-steam-link);
    text-decoration: none;
}

.tongvh-steam-layout__value a:hover,
.tongvh-steam-layout__value a:focus {
    color: #ffffff;
    text-decoration: underline;
}

.tongvh-steam-layout__value-empty {
    color: var(--tongvh-steam-text-soft);
}

.tongvh-steam-layout__tags-wrap {
    margin-top: auto;
    padding-top: 12px;
}

.tongvh-steam-layout__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.tongvh-steam-layout__tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 2px;
    background: var(--tongvh-steam-tag-bg);
    color: var(--tongvh-steam-tag-text);
    font-size: 12px;
    line-height: 1.1;
    white-space: nowrap;
}

.tongvh-steam-layout__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(17, 28, 38, 0.92) 0%, rgba(8, 13, 19, 0.98) 100%);
    color: #c7d5e0;
    text-align: center;
    padding: 30px;
}

.tongvh-steam-layout__placeholder strong {
    font-size: 16px;
    line-height: 1.2;
}

.tongvh-steam-layout__placeholder span {
    font-size: 13px;
    line-height: 1.45;
    color: #8f98a0;
}

.tongvh-steam-gallery {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 81.316348%) minmax(0, 18.683652%);
    background: #000;
}

.tongvh-steam-gallery__stage {
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background: #000;
}

.tongvh-steam-gallery__stage-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.tongvh-steam-gallery__action {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 3px;
    background: rgba(26, 40, 54, 0.92);
    color: #d8e4ee;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.tongvh-steam-gallery__action:hover,
.tongvh-steam-gallery__action:focus {
    background: rgba(52, 82, 106, 0.96);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.tongvh-steam-gallery__action[aria-pressed="true"] {
    background: rgba(103, 193, 245, 0.2);
    border-color: rgba(103, 193, 245, 0.5);
    color: #67c1f5;
}

.tongvh-steam-gallery__action[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.tongvh-steam-gallery__action[disabled]:hover,
.tongvh-steam-gallery__action[disabled]:focus {
    background: rgba(26, 40, 54, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
    color: #d8e4ee;
    transform: none;
}

.tongvh-steam-gallery__action-icon {
    display: inline-block;
    transform: translateY(-1px);
}

.tongvh-steam-gallery__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    margin: 0;
}

.tongvh-steam-gallery__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.tongvh-steam-gallery__slide--image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.tongvh-steam-gallery.is-fit .tongvh-steam-gallery__slide--image img {
    object-fit: contain;
    background: #000;
}

.tongvh-steam-gallery__video-shell,
.tongvh-steam-gallery__video-poster,
.tongvh-steam-gallery__video-frame {
    width: 100%;
    height: 100%;
}

.tongvh-steam-gallery__video-poster {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.tongvh-steam-gallery__video-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.tongvh-steam-gallery__video-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.42) 100%),
        radial-gradient(circle at center, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.62) 78%);
}

.tongvh-steam-gallery__video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 112px;
    height: 112px;
    margin: -56px 0 0 -56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}

.tongvh-steam-gallery__video-play-icon::before {
    content: '';
    position: absolute;
    left: 44px;
    top: 33px;
    width: 0;
    height: 0;
    border-top: 23px solid transparent;
    border-bottom: 23px solid transparent;
    border-left: 34px solid rgba(20, 30, 40, 0.94);
}

.tongvh-steam-gallery__video-frame {
    background: #000;
}

.tongvh-steam-gallery__video-frame[hidden] {
    display: none !important;
}

.tongvh-steam-gallery__video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.tongvh-steam-gallery__strip {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 4px;
    align-items: stretch;
    width: 100%;
    min-height: 0;
    background: linear-gradient(180deg, #21364b 0%, #1b2838 100%);
    padding: 0 0 6px;
}

.tongvh-steam-gallery__nav {
    align-self: end;
    width: 34px;
    height: 24px;
    margin: 0 0 6px;
    border: 0;
    border-radius: 2px;
    background: rgba(103, 193, 245, 0.15);
    color: #c7d5e0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tongvh-steam-gallery__nav:hover,
.tongvh-steam-gallery__nav:focus {
    background: rgba(103, 193, 245, 0.32);
    color: #ffffff;
    outline: none;
}

.tongvh-steam-gallery__thumb-viewport {
    overflow: hidden;
    height: 100%;
}

.tongvh-steam-gallery__thumbs {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0;
    margin: 0;
}

.tongvh-steam-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.tongvh-steam-gallery__thumb {
    position: relative;
    flex: 0 0 92px;
    width: 92px;
    height: 52px;
    padding: 0;
    margin: 0 0 6px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.tongvh-steam-gallery__thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.58;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tongvh-steam-gallery__thumb:hover img,
.tongvh-steam-gallery__thumb:focus img {
    opacity: 0.82;
    transform: translateY(-1px);
}

.tongvh-steam-gallery__thumb.is-active {
    border-color: #ffffff;
}

.tongvh-steam-gallery__thumb.is-active img {
    opacity: 1;
}

.tongvh-steam-gallery__thumb-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.78);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.tongvh-steam-gallery__thumb-play::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #ffffff;
}

.tongvh-steam-layout__shortcode,
.tongvh-steam-layout__shortcode > * {
    width: 100%;
    height: 100%;
}

.tongvh-steam-layout__shortcode {
    overflow: hidden;
    background: #000;
}

.tongvh-steam-layout__shortcode .metaslider,
.tongvh-steam-layout__shortcode .metaslider .flexslider,
.tongvh-steam-layout__shortcode .metaslider .slides,
.tongvh-steam-layout__shortcode .metaslider .slides > li,
.tongvh-steam-layout__shortcode .smartslider,
.tongvh-steam-layout__shortcode .n2-ss-slider,
.tongvh-steam-layout__shortcode .swiper,
.tongvh-steam-layout__shortcode .swiper-wrapper,
.tongvh-steam-layout__shortcode .swiper-slide,
.tongvh-steam-layout__shortcode .tongvh-slideshow,
.tongvh-steam-layout__shortcode .slideshow,
.tongvh-steam-layout__shortcode .wp-block-shortcode {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

.tongvh-steam-layout__shortcode img,
.tongvh-steam-layout__shortcode video,
.tongvh-steam-layout__shortcode iframe {
    max-width: 100%;
    display: block;
}

.tongvh-steam-gallery__modal[hidden] {
    display: none !important;
}

.tongvh-steam-gallery__modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.tongvh-steam-gallery__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.tongvh-steam-gallery__modal-dialog {
    position: relative;
    z-index: 1;
    width: min(96vw, 1400px);
    height: min(90vh, 900px);
    margin: 4vh auto 0;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 14px;
    align-items: center;
}

.tongvh-steam-gallery__modal-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.tongvh-steam-gallery__modal-figure,
.tongvh-steam-gallery__modal-video {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #000;
}

.tongvh-steam-gallery__modal-figure {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tongvh-steam-gallery__modal-figure img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tongvh-steam-gallery__modal-video[hidden],
.tongvh-steam-gallery__modal-figure[hidden] {
    display: none !important;
}

.tongvh-steam-gallery__modal-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.tongvh-steam-gallery__modal-close,
.tongvh-steam-gallery__modal-nav {
    border: 0;
    border-radius: 3px;
    background: rgba(26, 40, 54, 0.94);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tongvh-steam-gallery__modal-close:hover,
.tongvh-steam-gallery__modal-close:focus,
.tongvh-steam-gallery__modal-nav:hover,
.tongvh-steam-gallery__modal-nav:focus {
    background: rgba(52, 82, 106, 0.96);
    transform: translateY(-1px);
    outline: none;
}

.tongvh-steam-gallery__modal-close {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(calc(-100% - 10px));
    width: 38px;
    height: 38px;
    font-size: 26px;
    line-height: 1;
}

.tongvh-steam-gallery__modal-nav {
    width: 48px;
    height: 64px;
    font-size: 28px;
    line-height: 1;
}

html.tongvh-steam-modal-open,
body.tongvh-steam-modal-open {
    overflow: hidden;
}

.editor-styles-wrapper .wp-block-tongvh-bo-cuc-game-steam-chuan {
    margin-bottom: 24px;
}

.editor-styles-wrapper .wp-block-tongvh-bo-cuc-game-steam-chuan .block-editor-block-list__layout {
    margin: 0;
}

@media (max-width: 782px), (orientation: portrait) and (max-width: 1024px) {
    .tongvh-steam-layout__inner {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow: visible;
    }

    .tongvh-steam-layout__right {
        order: -1;
        display: block;
        height: auto;
        min-height: 0;
    }

    .tongvh-steam-layout__left {
        height: auto;
        min-height: 0;
    }

    .tongvh-steam-layout__poster {
        width: 100%;
        height: auto;
        aspect-ratio: 370 / 200;
    }

    .tongvh-steam-layout__info {
        padding: 12px 12px 14px;
        overflow: visible;
    }

    .tongvh-steam-layout__desc {
        -webkit-line-clamp: initial;
        overflow: visible;
    }

    .tongvh-steam-layout__tags-wrap {
        margin-top: 12px;
    }

    .tongvh-steam-gallery {
        height: auto;
        grid-template-rows: auto auto;
    }

    .tongvh-steam-gallery__stage {
        aspect-ratio: 678 / 383;
    }

    .tongvh-steam-gallery__strip {
        min-height: 74px;
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        padding-bottom: 4px;
    }

    .tongvh-steam-gallery__nav {
        width: 30px;
        height: 22px;
        margin-bottom: 6px;
    }

    .tongvh-steam-gallery__thumb {
        flex-basis: 78px;
        width: 78px;
        height: 44px;
        margin-bottom: 6px;
    }

    .tongvh-steam-gallery__stage-actions {
        top: 8px;
        right: 8px;
        gap: 6px;
    }

    .tongvh-steam-gallery__action {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .tongvh-steam-gallery__video-play-icon {
        width: 86px;
        height: 86px;
        margin: -43px 0 0 -43px;
    }

    .tongvh-steam-gallery__video-play-icon::before {
        left: 34px;
        top: 25px;
        border-top-width: 18px;
        border-bottom-width: 18px;
        border-left-width: 26px;
    }

    .tongvh-steam-gallery__modal-dialog {
        width: 94vw;
        height: min(78vh, 760px);
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
    }

    .tongvh-steam-gallery__modal-nav {
        width: 40px;
        height: 54px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .tongvh-steam-layout__row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .tongvh-steam-layout__label,
    .tongvh-steam-layout__tags-label {
        font-size: 11px;
    }

    .tongvh-steam-layout__value {
        font-size: 13px;
    }

    .tongvh-steam-gallery__thumb {
        flex-basis: 70px;
        width: 70px;
        height: 40px;
    }

    .tongvh-steam-gallery__thumb-play {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
    }

    .tongvh-steam-gallery__thumb-play::before {
        left: 6px;
        top: 4px;
    }
}
