/* =========================================
   1. GLOBAL STYLES AND THEME TOKENS
   ========================================= */
:root {
    --hover-border: rgba(44, 243, 200, 0.55);
    --hover-shadow: rgba(44, 243, 200, 0.2);
    --container-width: 1600px;
    --container-pad: 16px;

    --slide-w: min(86vw, 1240px);
    --visible-side: 0.2;
    --gap: 24px;
    --shift-amount: calc((var(--slide-w) * (1 - var(--visible-side))) + var(--gap));

    --surface-strong: rgba(7, 18, 31, 0.86);
    --surface-soft: rgba(12, 29, 48, 0.72);
    --surface-card: rgba(10, 25, 42, 0.78);
    --stroke-soft: rgba(149, 214, 255, 0.22);
    --stroke-strong: rgba(44, 243, 200, 0.4);
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
    background:
        radial-gradient(1100px 580px at 7% -12%, rgba(44, 243, 200, 0.2), transparent 60%),
        radial-gradient(900px 520px at 95% -18%, rgba(47, 198, 244, 0.18), transparent 62%),
        linear-gradient(180deg, #04080f 0%, #061122 34%, #071527 100%);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 35vw;
    height: 35vw;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(70px);
    opacity: 0.25;
    animation: ambientFloat 12s ease-in-out infinite;
}

body::before {
    top: -12vw;
    left: -8vw;
    background: rgba(44, 243, 200, 0.7);
}

body::after {
    right: -10vw;
    bottom: 8vh;
    background: rgba(50, 248, 255, 0.55);
    animation-delay: -6s;
}

@keyframes ambientFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(10px, -18px, 0) scale(1.06);
    }
}

section {
    width: 100%;
    overflow: visible;
    position: relative;
}

/* =========================================
   2. UI COMPONENTS
   ========================================= */
.section-title {
    font-size: clamp(1.8rem, 2.2vw, 2.9rem);
    font-weight: 850;
    text-align: center;
    margin-bottom: 14px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
}

.section-title::before {
    content: '';
    position: absolute;
    inset: auto -10px -6px -10px;
    height: 20px;
    z-index: -1;
    background: linear-gradient(90deg, rgba(44, 243, 200, 0), rgba(44, 243, 200, 0.22), rgba(36, 214, 243, 0.25), rgba(36, 214, 243, 0));
    filter: blur(8px);
}

.section-title::after {
    content: '';
    display: block;
    width: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    position: absolute;
    bottom: -12px;
    left: 50%;
    transition: width 0.55s ease, left 0.55s ease;
}

.section-title.animate::after {
    width: 100%;
    left: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
    gap: 12px;
}

.section-header .section-title {
    margin-bottom: 0;
    left: 0;
    transform: none;
}

.section-header .see-all {
    font-size: 0.98rem;
    color: var(--text-light);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
    display: inline-block;
    margin: 0;
}

.section-header .see-all:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(118deg, var(--primary-color), #2ed9ff 54%, var(--secondary-color));
    color: #021019;
    font-weight: 820;
    border-radius: 999px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(8, 17, 28, 0.46), 0 0 0 1px rgba(44, 243, 200, 0.22);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    top: -120%;
    left: -22%;
    width: 34%;
    height: 320%;
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(24deg);
    transition: transform 0.5s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(8, 17, 28, 0.58), 0 0 0 1px rgba(44, 243, 200, 0.4);
    filter: saturate(1.06);
}

.btn:hover::before {
    transform: translateX(265%) rotate(24deg);
}

.game-card,
.news-card,
.cloud-card,
.tournament-card,
.server-card,
.video-slide {
    background: linear-gradient(165deg, rgba(13, 30, 50, 0.95), rgba(9, 20, 34, 0.86));
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--stroke-soft);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(8px);
}

.game-card:hover,
.news-card:hover,
.cloud-card:hover,
.server-card:hover,
.video-slide:hover {
    transform: translateY(-8px);
    border-color: var(--hover-border);
    box-shadow: 0 18px 40px rgba(4, 11, 20, 0.62), 0 0 30px var(--hover-shadow);
}

.fade-in-load {
    opacity: 0;
    animation: fadeInPage 0.95s ease-out 0.12s forwards;
}

@keyframes fadeInPage {
    to {
        opacity: 1;
    }
}

.fade-in-scroll {
    opacity: 0;
    transform: translateY(34px) scale(0.99);
    transition: opacity 0.75s ease-out, transform 0.75s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@supports (content-visibility: auto) {
    section.fade-in-scroll {
        content-visibility: auto;
        contain-intrinsic-size: 900px 1000px;
    }
}

/* =========================================
   3. HERO SECTION
   ========================================= */
#hero {
    position: relative;
    width: 100%;
    min-height: clamp(430px, 66vh, 760px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding: 20px 0 16px;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 4% 4% 12%;
    border-radius: 30px;
    background: linear-gradient(120deg, rgba(44, 243, 200, 0.08), rgba(36, 214, 243, 0.07));
    border: 1px solid rgba(117, 188, 231, 0.18);
    pointer-events: none;
}

#hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 100%, rgba(44, 243, 200, 0.12), transparent 55%);
    pointer-events: none;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(360px, 58vh, 640px);
}

.hero-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--slide-w);
    height: 82%;
    background-repeat: no-repeat;
    background-size: var(--size-mobile, cover);
    background-position: var(--pos-mobile, center center);
    background-image:
        var(--hero-gradient, linear-gradient(105deg, rgba(4, 9, 16, 0.95) 0%, rgba(6, 13, 24, 0.72) 40%, rgba(8, 18, 29, 0.15) 100%)),
        var(--bg-mobile-set, var(--bg-mobile));
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease, filter 0.45s ease;
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(4, 10, 16, 0.78) 0%, rgba(7, 18, 30, 0.45) 44%, rgba(8, 19, 33, 0.1) 100%);
    pointer-events: none;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

@media (min-width: 769px) {
    .hero-slide {
        background-image:
            var(--hero-gradient, linear-gradient(105deg, rgba(4, 9, 16, 0.95) 0%, rgba(6, 13, 24, 0.72) 40%, rgba(8, 18, 29, 0.15) 100%)),
            var(--bg-pc-set, var(--bg-pc));
        background-size: var(--size-pc, cover);
        background-position: var(--pos-pc, center center);
    }
}

.hero-slide.active {
    transform: translate(-50%, -50%) translateX(0) scale(1);
    opacity: 1;
    z-index: 3;
    filter: saturate(1.06);
}

.hero-slide.prev {
    transform: translate(-50%, -50%) translateX(calc(-1 * var(--shift-amount))) scale(0.92);
    opacity: 0.3;
    z-index: 2;
    filter: blur(1px) saturate(0.75);
}

.hero-slide.next {
    transform: translate(-50%, -50%) translateX(var(--shift-amount)) scale(0.92);
    opacity: 0.3;
    z-index: 2;
    filter: blur(1px) saturate(0.75);
}

.hero-content {
    position: relative;
    width: min(58%, 680px);
    text-align: left;
    color: var(--text-light);
    background: linear-gradient(130deg, rgba(5, 15, 25, 0.76), rgba(8, 21, 34, 0.26));
    border: 1px solid rgba(163, 212, 255, 0.28);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    margin-left: clamp(16px, 4vw, 70px);
    padding: clamp(18px, 2.5vw, 34px);
    z-index: 4;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease, transform 0.45s ease;
    transform: translateY(12px);
}

.hero-slide.active .hero-content {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    z-index: 10;
    transform: translateY(0);
}

.hero-slide:not(.active) .hero-content.visible {
    opacity: 0 !important;
    visibility: hidden;
}

.hero-slide h1 {
    font-size: clamp(1.9rem, 3vw, 3.25rem);
    margin-bottom: 14px;
    line-height: 1.04;
    text-shadow: var(--hero-text-shadow);
    letter-spacing: 0.015em;
    background: linear-gradient(90deg, #ffffff 0%, #cbfff5 54%, #b8ecff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-slide p {
    font-size: clamp(0.98rem, 1.06vw, 1.22rem);
    margin-bottom: 24px;
    color: var(--hero-text-strong);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
    max-width: 62ch;
}

.hero-content .btn:nth-of-type(2) {
    background: transparent;
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: none;
}

.hero-content .btn:nth-of-type(2):hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(44, 243, 200, 0.1);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(3, 11, 19, 0.82);
    color: #fff;
    border: 1px solid rgba(166, 216, 255, 0.36);
    font-size: 1.45rem;
    padding: 10px;
    border-radius: 999px;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.slider-btn:hover {
    background: linear-gradient(120deg, rgba(44, 243, 200, 0.88), rgba(36, 214, 243, 0.88));
    color: #021019;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5);
}

.slider-btn.prev {
    left: calc((100% - var(--slide-w)) / 2 - 26px);
}

.slider-btn.next {
    right: calc((100% - var(--slide-w)) / 2 - 26px);
}

.hero-pagination {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(4, 10, 18, 0.5);
    border: 1px solid rgba(169, 217, 255, 0.25);
}

.pagination-dot {
    width: 22px;
    height: 6px;
    background-color: rgba(242, 252, 255, 0.28);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    width: 34px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 0 10px rgba(44, 243, 200, 0.5);
}

/* =========================================
   4. CONTENT SECTIONS
   ========================================= */
.container > section {
    margin-top: 24px;
}

#games,
#popular-games,
#servers,
#news,
#tournaments,
#cloud-gaming {
    border-radius: 26px;
    border: 1px solid rgba(147, 210, 255, 0.2);
    padding: clamp(20px, 3vw, 34px);
    background: linear-gradient(155deg, var(--surface-strong), var(--surface-soft));
    box-shadow: 0 18px 42px rgba(2, 9, 17, 0.5);
}

#cloud-gaming {
    margin-bottom: 36px;
}

.video-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 8px 60px;
}

.video-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 56px;
    width: 100%;
}

.video-slide {
    display: flex;
    align-items: stretch;
    gap: 34px;
    flex: 0 0 100%;
    min-width: 100%;
    padding: 26px;
    margin: 0;
    overflow: hidden;
    border-color: rgba(162, 217, 255, 0.26);
    background: linear-gradient(145deg, rgba(16, 37, 61, 0.96), rgba(9, 20, 34, 0.92));
}

.video-player {
    flex: 0 0 60%;
    position: relative;
    align-self: stretch;
    display: flex;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.game-video {
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #030910;
}

.game-video::-webkit-media-controls-panel {
    background-color: rgba(5, 13, 23, 0.86) !important;
    color: var(--text-light) !important;
}

.game-video::-webkit-media-controls-play-button {
    color: var(--primary-color) !important;
}

.vp-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s, transform 0.15s;
}

.vp-center.show {
    opacity: 1;
    transform: scale(1);
}

.vp-center-icon {
    width: 74px;
    height: 74px;
    color: #ecf9ff;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.55));
}

.vp-vol-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.58);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s ease;
    z-index: 2;
}

.video-player:hover .vp-vol-btn {
    opacity: 1;
    visibility: visible;
}

.vp-vol-icon {
    width: 22px;
    height: 22px;
    color: #f1fbff;
}

.vp-vol-btn:hover .vp-vol-icon {
    color: var(--primary-color);
}

.video-description {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    overflow: hidden;
    word-wrap: break-word;
    --video-desc-lines: 6;
}

.video-description h3 {
    font-size: clamp(1.35rem, 1.9vw, 2rem);
    line-height: 1.16;
    color: var(--primary-color);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.video-description p {
    font-size: 1rem;
    color: var(--text-dark);
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: var(--video-desc-lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-desc-image {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    max-width: 100%;
    flex: 0 0 auto;
}

.video-slider-wrapper .slider-btn {
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.video-slider-wrapper .slider-btn.prev {
    left: 8px;
}

.video-slider-wrapper .slider-btn.next {
    right: 8px;
}

.video-pagination {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 12px;
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(4, 10, 18, 0.44);
    gap: 10px;
    border: 1px solid rgba(170, 218, 255, 0.2);
}

#carousel {
    padding: 30px 0;
    background:
        linear-gradient(160deg, rgba(10, 23, 39, 0.94), rgba(6, 13, 24, 0.96)),
        radial-gradient(circle at 20% 30%, rgba(44, 243, 200, 0.14), transparent 50%);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-top: 1px solid rgba(147, 210, 255, 0.25);
    border-bottom: 1px solid rgba(147, 210, 255, 0.25);
}

.carousel-track {
    display: flex;
    width: max-content;
    margin-bottom: 16px;
}

.carousel-track.row-1 {
    animation: scrollLeft 24s linear infinite;
}

.carousel-track.row-2 {
    animation: scrollRight 24s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-track a {
    display: block;
    padding: 0 10px;
    transition: transform 0.28s ease;
}

.carousel-track a:hover {
    transform: scale(1.05);
}

.carousel-track .media-placeholder {
    width: auto;
    height: 210px;
    border-radius: 12px;
    position: relative;
    background-color: rgba(8, 20, 34, 0.9);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.carousel-track a:hover .media-placeholder {
    border-color: var(--hover-border);
    box-shadow: 0 14px 30px var(--hover-shadow);
}

.carousel-track .media-placeholder img {
    position: static !important;
    width: auto !important;
    height: 210px !important;
    border-radius: 12px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.42s ease;
}

.carousel-track .media-placeholder img.loaded {
    opacity: 1;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.horizontal-scroll-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(5, 11, 20, 0.7);
    padding: 32px 10px 6px;
    margin: 0 -10px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    margin: 0 10px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 999px;
}

.game-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}

.game-grid::after {
    content: '';
    display: block;
    min-width: 1px;
    height: 1px;
}

.game-card {
    flex: 0 0 calc((100% - 100px) / 6);
    margin-right: 0;
    z-index: 1;
}

#popular-games .game-card {
    border-radius: 16px;
}

#popular-games .game-card:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 10;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.62), 0 0 26px rgba(44, 243, 200, 0.28);
}

#popular-games .game-card .media-placeholder {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#popular-games .game-card .media-placeholder img {
    transform: scale(1.08);
    transition: transform 0.45s ease, filter 0.45s ease;
}

#popular-games .game-card:hover .media-placeholder img {
    transform: scale(1.14);
    filter: brightness(0.86);
}

.game-card .card-content {
    padding: 15px;
}

.game-card h3 {
    font-size: 1.08rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-type {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.download-btn {
    width: 100%;
    text-align: center;
    padding: 10px;
}

.server-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.server-card {
    position: relative;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
}

.server-card::after {
    content: 'LIVE';
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(90deg, #3aa9ff, #24d6f3);
    box-shadow: 0 0 14px rgba(255, 78, 78, 0.45);
    z-index: 5;
}

.server-card .server-img-placeholder,
.server-card .hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s;
}

.server-card .hover-video {
    opacity: 0;
    z-index: 1;
}

.server-card:hover .hover-video {
    opacity: 1;
}

.server-card:hover .server-img-placeholder {
    opacity: 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-card .card-content {
    padding: 18px;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.news-card p {
    color: var(--text-dark);
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.tournament-card {
    background: linear-gradient(160deg, rgba(18, 39, 64, 0.96), rgba(9, 20, 34, 0.9));
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tournament-card:hover {
    transform: translateY(-10px) scale(1.015);
}

.tournament-card .card-image .media-placeholder {
    height: 220px !important;
}

.tournament-card .card-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tournament-card h3 {
    font-size: 1.42rem;
    color: var(--esport-accent);
    margin-bottom: 8px;
}

.details {
    margin: 10px 0;
    color: var(--text-light);
    font-weight: 650;
    font-size: 1rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
}

.chip {
    background: rgba(44, 243, 200, 0.13);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid rgba(44, 243, 200, 0.28);
}

.tourney-btn {
    width: 100%;
    text-align: center;
    background: linear-gradient(120deg, var(--esport-accent), #2ed9ff 55%, var(--secondary-color));
    border-color: rgba(255, 255, 255, 0.4);
    color: #03111b;
    margin-top: auto;
}

.tourney-btn:hover {
    color: #03111b;
}

.cloud-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cloud-card {
    padding: 25px 20px;
    text-align: center;
}

.cloud-card .cloud-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #44dcff;
    background: radial-gradient(circle at 30% 25%, rgba(15, 57, 87, 0.85), rgba(7, 28, 44, 0.92));
    border: 1px solid rgba(114, 212, 255, 0.3);
    box-shadow: 0 0 0 1px rgba(12, 42, 64, 0.48), 0 0 20px rgba(68, 220, 255, 0.26);
}

.cloud-card .cloud-icon svg {
    width: 42px;
    height: 42px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(68, 220, 255, 0.35));
}

.cloud-card h3 {
    font-size: 1.22rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.media-placeholder {
    display: block;
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: rgba(15, 31, 50, 0.95);
    transition: background-color 0.4s;
}

.media-placeholder::before,
.placeholder-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(146, 222, 255, 0.26) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shimmer-animation 1.8s infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes shimmer-animation {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.media-placeholder.loaded::before,
.media-placeholder.loaded {
    background-color: transparent !important;
    animation: none !important;
}

.media-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.45s;
    z-index: 2;
}

.media-placeholder img.loaded {
    opacity: 1 !important;
}

#cloud-gaming .cloud-card .media-placeholder {
    background-color: transparent !important;
}

#cloud-gaming .cloud-card .media-placeholder img {
    object-fit: contain !important;
    position: absolute !important;
}

@media (min-width: 1400px) {
    .video-description {
        --video-desc-lines: 7;
    }
}

/* =========================================
   5. RESPONSIVE BREAKPOINTS
   ========================================= */
@media (max-width: 1200px) {
    :root {
        --slide-w: min(90vw, 980px);
    }

    .news-grid,
    .cloud-grid,
    .server-grid,
    .tournament-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-card {
        flex: 0 0 calc((100% - 60px) / 4);
    }

    .video-description {
        --video-desc-lines: 5;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .hero-content {
        width: 65%;
        margin-left: 22px;
        padding: 18px 24px;
    }

    .video-slide {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
    }

    .video-player,
    .video-description {
        width: 100%;
        flex: none;
    }

    .video-desc-image {
        display: none;
    }

    .video-description p {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .video-slider-wrapper {
        padding: 12px 46px;
    }

    .video-slider-track {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --slide-w: 92vw;
        --visible-side: 0.07;
        --gap: 10px;
    }

    body::before,
    body::after {
        width: 62vw;
        height: 62vw;
        opacity: 0.16;
        filter: blur(55px);
    }

    #hero {
        min-height: 300px;
        padding: 10px 0 10px;
        margin-top: 4px;
    }

    .hero-slider {
        width: 100%;
        height: 300px;
    }

    .hero-slide {
        top: 0;
        left: 50%;
        width: var(--slide-w);
        height: 100%;
        transform: translate(-50%, 0) scale(0.9) !important;
        opacity: 0;
        z-index: 1;
        border-radius: 18px;
    }

    .hero-slide.active {
        opacity: 1 !important;
        transform: translate(-50%, 0) scale(1) !important;
        z-index: 3;
        filter: none;
    }

    .hero-slide.prev {
        opacity: 0.22 !important;
        transform: translate(calc(-50% - var(--shift-amount)), 0) scale(0.9) !important;
        z-index: 2;
        filter: blur(1px);
    }

    .hero-slide.next {
        opacity: 0.22 !important;
        transform: translate(calc(-50% + var(--shift-amount)), 0) scale(0.9) !important;
        z-index: 2;
        filter: blur(1px);
    }

    .hero-content,
    .hero-content.fade-in-scroll,
    .hero-content.fade-in-scroll.visible {
        width: calc(100% - 20px) !important;
        margin: 0 auto;
        padding: 14px !important;
        text-align: center;
        align-items: center;
        opacity: 0 !important;
        pointer-events: none;
        z-index: 4;
        transform: translateY(0);
    }

    .hero-slide.active .hero-content,
    .hero-slide.active .hero-content.fade-in-scroll.visible {
        opacity: 1 !important;
        pointer-events: auto;
    }

    .hero-slide h1 {
        font-size: 1.28rem !important;
        margin-bottom: 8px;
        line-height: 1.12;
    }

    .hero-slide p {
        font-size: 0.83rem !important;
        line-height: 1.35;
        margin-bottom: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-content .btn {
        padding: 7px 14px !important;
        font-size: 0.8rem !important;
        width: auto !important;
        display: inline-flex !important;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1.05rem;
    }

    .vp-center-icon {
        width: 60px;
        height: 60px;
    }

    .slider-btn.prev {
        left: 6px;
    }

    .slider-btn.next {
        right: 6px;
    }

    .hero-pagination {
        bottom: 6px;
        gap: 8px;
        padding: 5px 10px;
    }

    .pagination-dot {
        width: 18px;
        height: 5px;
    }

    .pagination-dot.active {
        width: 28px;
    }

    .container > section {
        margin-top: 18px;
    }

    #games,
    #popular-games,
    #servers,
    #news,
    #tournaments,
    #cloud-gaming {
        border-radius: 18px;
        padding: 16px;
    }

    #carousel {
        width: 100%;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
        border-radius: 14px;
        overflow: hidden;
        padding: 12px 0 8px;
    }

    .carousel-track {
        margin-bottom: 10px;
    }

    .carousel-track a {
        padding: 0 6px;
    }

    .carousel-track .media-placeholder,
    .carousel-track .media-placeholder img {
        height: 150px !important;
    }

    #cloud-gaming {
        margin-bottom: 22px;
    }

    .video-slider-wrapper {
        padding: 2px 0;
    }

    .video-slide {
        flex-direction: column;
        padding: 14px;
        gap: 14px;
    }

    .video-player {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        flex: 0 0 auto;
        position: relative !important;
        z-index: 1;
    }

    .game-video {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .video-desc-image {
        display: none !important;
    }

    .cloud-card .cloud-icon {
        width: 68px;
        height: 68px;
    }

    .cloud-card .cloud-icon svg {
        width: 38px;
        height: 38px;
    }

    .video-description h3 {
        font-size: 1.35rem;
    }

    .video-description {
        --video-desc-lines: 4;
    }

    .video-description p {
        font-size: 0.96rem;
        max-width: 100%;
    }

    .video-slider-wrapper .slider-btn {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 20 !important;
    }

    .video-slider-wrapper .slider-btn.prev {
        left: 10px !important;
    }

    .video-slider-wrapper .slider-btn.next {
        right: 10px !important;
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-header .section-title {
        left: 50%;
        transform: translateX(-50%);
    }

    .see-all {
        position: static !important;
        margin-top: 4px !important;
    }

    .server-grid,
    .tournament-grid,
    .news-grid,
    .cloud-grid {
        grid-template-columns: 1fr !important;
    }

    .horizontal-scroll-wrapper {
        overflow-x: auto;
        margin: 0 -10px;
        padding: 16px 10px 6px;
    }

    .game-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        width: max-content;
    }

    .game-grid::after {
        display: block;
    }

    .game-card {
        flex: 0 0 240px;
        width: auto;
        min-width: 0;
    }

    .game-card .card-content {
        display: flex;
        flex-direction: column;
        min-height: 164px;
    }

    .download-btn {
        margin-top: auto;
    }
}

@media (max-width: 560px) {
    .section-title {
        font-size: 1.55rem;
    }

    #hero {
        min-height: 270px;
    }

    .hero-slider {
        height: 270px;
    }

    .hero-slide h1 {
        font-size: 1.06rem !important;
    }

    .hero-slide p {
        font-size: 0.7rem !important;
        margin-bottom: 8px !important;
    }

    .hero-content .btn {
        padding: 6px 12px !important;
        font-size: 0.72rem !important;
    }

    .video-slide {
        padding: 12px;
    }

    .game-card {
        flex: 0 0 210px;
    }
}

@media (max-width: 420px) {
    #hero {
        min-height: 248px;
    }

    .hero-slider {
        height: 248px;
    }

    .hero-pagination {
        gap: 6px;
    }

    .game-card {
        flex: 0 0 190px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .vp-vol-btn {
        opacity: 1;
        visibility: visible;
    }

    .video-slide,
    .video-slide:hover,
    .video-slide:active,
    .video-slide:focus,
    .video-slide:focus-visible {
        transform: none !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4) !important;
        border-color: rgba(255, 255, 255, 0.14) !important;
        transition: none !important;
        outline: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
