/* YG88 Home – PC Figma 16:40 (1920×1081), từng layer PNG, không canvas */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #073307;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

img {
    max-width: none;
    image-rendering: auto;
    -webkit-user-drag: none;
    user-select: none;
}

.yg-viewport {
    width: 100%;
    height: 100svh;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #073307;
}

.yg-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a4a0a;
}

.yg-l {
    position: absolute;
    display: block;
    pointer-events: none;
}

.yg-mb-only {
    display: none !important;
}

/* ---- PC background ---- */
.yg-pc-bg {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.yg-bg-stadium {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ---- Header PC: logo 765,29 390×83 / title 446,132 1028×118 ---- */
.yg-logo {
    left: 50%;
    top: calc(100% * 29 / 1081);
    width: calc(100% * 390 / 1920);
    height: calc(100% * 83 / 1081);
    transform: translateX(-50%);
    object-fit: contain;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    z-index: 4;
}

.yg-title {
    left: 50%;
    top: calc(100% * 118 / 1081);
    width: calc(100% * 1080 / 1920);
    height: calc(100% * 132 / 1081);
    transform: translateX(-50%);
    z-index: 4;
}

.yg-title img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---- Hero trái: 72,218 888×779 ---- */
.yg-hero {
    left: calc(100% * 72 / 1920);
    top: calc(100% * 218 / 1081);
    width: calc(100% * 888 / 1920);
    height: calc(100% * 779 / 1081);
    object-fit: contain;
    z-index: 2;
}

/* ---- 6 nút PC: frame 960,296 785×589.6, cell 241×273.36, gap 31 / 41 ---- */
.yg-links {
    left: calc(100% * 960 / 1920);
    top: calc(100% * 296 / 1081);
    width: calc(100% * 785 / 1920);
    height: calc(100% * 589.592 / 1081);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    column-gap: calc(100% * 31 / 785);
    row-gap: calc(100% * 41 / 589.592);
    place-items: center;
    pointer-events: auto;
    z-index: 5;
}

.yg-link {
    position: relative;
    display: block;
    height: 100%;
    width: auto;
    aspect-ratio: 241 / 273.36;
    max-width: 100%;
    overflow: visible;
    text-decoration: none;
    container-type: inline-size;
    transition: transform 0.15s ease;
}

.yg-link:hover {
    transform: scale(1.04);
    z-index: 2;
}

.yg-link img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    pointer-events: none;
}

.yg-link .speed-meter {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(16px, 19.5cqw, 47px);
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    color: #2ab728;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
    z-index: 2;
    letter-spacing: -0.5px;
}

/* ============ MOBILE Figma 16:14 (440×956) ============ */
@media screen and (max-width: 767px) {
    html,
    body {
        overflow: auto;
        overflow-x: hidden;
        height: auto;
    }

    .yg-viewport {
        align-items: flex-start;
        height: auto;
        min-height: 100svh;
    }

    .yg-stage {
        max-width: none;
        width: 100%;
        height: auto;
        aspect-ratio: 440 / 956;
        min-height: 100svh;
        background: #c8f5a3;
    }

    .yg-pc-only {
        display: none !important;
    }

    .yg-mb-only {
        display: block !important;
    }

    .yg-mb-bg {
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        z-index: 0;
    }

    .yg-logo {
        left: 50%;
        top: calc(100% * 22 / 956);
        width: calc(100% * 262 / 440);
        height: calc(100% * 56 / 956);
        transform: translateX(-50%);
        z-index: 4;
    }

    .yg-title {
        left: calc(100% * 27 / 440);
        top: calc(100% * 107 / 956);
        width: calc(100% * 395 / 440);
        height: calc(100% * 46 / 956);
        transform: none;
        overflow: visible;
        z-index: 4;
    }

    .yg-title img {
        position: static;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .yg-links {
        left: calc(100% * 32 / 440);
        top: calc(100% * 180 / 956);
        width: calc(100% * 376 / 440);
        height: calc(100% * 304 / 956);
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
        grid-auto-flow: row;
        column-gap: calc(100% * 10 / 376);
        row-gap: calc(100% * 8 / 304);
        place-items: stretch;
        z-index: 5;
    }

    .yg-link {
        width: 100%;
        height: 100%;
        max-width: none;
        aspect-ratio: auto;
    }

    .yg-link .speed-meter {
        top: 40%;
        font-size: clamp(12px, 19.5cqw, 24px);
        font-weight: 700;
        color: #2ab728;
        text-shadow: none;
    }

    .yg-hero {
        left: calc(100% * 50 / 440);
        top: calc(100% * 512 / 956);
        width: calc(100% * 340 / 440);
        height: calc(100% * 300 / 956);
        object-fit: contain;
        z-index: 3;
    }
}
