/* ==========================================================================
   LDY 落地页响应式样式
   适用结构：
   .star-container
   .mar
   .page.home .content-wrapper .home-top-entry .game-wrapper
   .game-wrapper_agbox / .game-wrapper_ag / .game-wrapper_ag-list
   .game-wrapper_ag-join / .bubbly-button
   .ag-card1 / .ag-card-img / .ag-card-content / .ag-card-arrow

   设计目标：
   1. PC、Pad、手机均完整展示，不横向裁剪
   2. iframe 内页面可纵向滚动
   3. 不依赖远程字体
   4. 中文字体统一、清晰、完整
   5. 保留原图片类名和点击结构
   ========================================================================== */

:root {
    --page-bg: #070a16;
    --page-bg-soft: #101a35;
    --card-bg: rgba(22, 30, 59, 0.94);
    --card-bg-hover: rgba(34, 45, 84, 0.98);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-border-active: rgba(255, 202, 71, 0.48);
    --text-main: #ffffff;
    --text-sub: rgba(255, 255, 255, 0.82);
    --text-muted: rgba(255, 255, 255, 0.62);
    --text-gold: #ffe36a;
    --accent-start: #ffd85a;
    --accent-end: #ff9d00;
    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.44);
    --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.34);
    --radius-lg: 18px;
    --radius-md: 15px;
    --font-ui:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Hiragino Sans GB",
        "Microsoft YaHei",
        "Noto Sans CJK SC",
        "Source Han Sans SC",
        Arial,
        sans-serif;
}

/* ---------- 基础重置 ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--page-bg);
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: visible;
    background:
        radial-gradient(circle at 50% 0, #1b2a59 0, #101831 38%, #070a16 78%);
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0;
    word-break: normal;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
    margin: 0;
    padding: 0;
}

ul,
ol,
li {
    list-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    outline: 0;
    cursor: pointer;
}

img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid rgba(255, 216, 90, 0.9);
    outline-offset: 3px;
}

/* ---------- 背景与流星 ---------- */

.star-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(rgba(7, 10, 22, 0.2), rgba(7, 10, 22, 0.55)),
        no-repeat top center / cover url("../picture/background.png");
}

.star-container2 {
    background:
        linear-gradient(rgba(7, 10, 22, 0.2), rgba(7, 10, 22, 0.55)),
        no-repeat top center / cover url("../picture/background.png");
}

.star-container .change {
    position: absolute;
    top: 12%;
    left: 80%;
    width: 48px;
    height: 48px;
    border: 0;
    opacity: 0.85;
    animation: ldy-change 8s linear both;
}

.star-container .meteor {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    opacity: 0;
    animation: ldy-meteor 15s linear infinite;
}

.star-container .meteor::after {
    content: "";
    display: block;
    width: 150px;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.62)
    );
    transform: rotate(-45deg);
    transform-origin: left center;
}

@keyframes ldy-meteor {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate3d(-780px, 100vh, 0);
    }
}

@keyframes ldy-change {
    0% {
        top: 68%;
        left: 42%;
        opacity: 0;
    }

    100% {
        top: 12%;
        left: 80%;
        opacity: 1;
    }
}

/* ---------- 顶部滚动公告 ---------- */

.mar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 8px 0;
    overflow: hidden;
    background: rgba(6, 9, 20, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.22);
    color: var(--text-gold);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.mar marquee {
    display: block;
    width: 100%;
}

/* ---------- 页面容器 ---------- */

.page,
.home,
.home2,
.content-wrapper,
.home-top-entry,
.game-wrapper {
    min-width: 0;
}

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
}

.page.home {
    padding:
        28px
        max(18px, env(safe-area-inset-right))
        calc(36px + env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));
}

.content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.content-wrapper > div {
    width: 100%;
    padding: 0;
}

.home-top-entry {
    width: min(1180px, 100%);
    max-width: 1180px;
    margin: 0 auto;
}

.home-top-entry .game-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0;
}

/* ---------- 主推广大卡片 ---------- */

.game-wrapper_agbox {
    position: relative;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 215, 90, 0.34);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(47, 61, 116, 0.96), rgba(14, 20, 43, 0.98));
    box-shadow:
        var(--shadow-lg),
        inset 0 0 40px rgba(255, 202, 71, 0.08);
    cursor: pointer;
    isolation: isolate;
}

.game-wrapper_agbox::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(
            100deg,
            rgba(7, 11, 26, 0.2) 0,
            rgba(7, 11, 26, 0.05) 45%,
            rgba(7, 11, 26, 0.36) 100%
        );
}

.home-top-entry .game-wrapper_ag {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(220px, 0.85fr)
        minmax(260px, 1fr)
        auto;
    align-items: center;
    gap: 28px;
    width: 100%;
    min-width: 0;
    min-height: 270px;
    padding: 34px;
    overflow: visible;
    border-radius: inherit;
    background-color: transparent;
    background-position: right center, center;
    background-repeat: no-repeat, no-repeat;
    background-size: contain, cover;
}

.home-top-entry .game-wrapper .game-wrapper_agbg {
    background:
        no-repeat right center / contain url("../picture/ag-66.png"),
        linear-gradient(135deg, rgba(43, 56, 110, 0.92), rgba(16, 22, 46, 0.96));
}

.game-wrapper_ag-list {
    width: 100%;
    min-width: 0;
    color: var(--text-gold);
}

.game-wrapper_ag-list ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    width: 100%;
}

.game-wrapper_ag-list li {
    display: flex;
    align-items: center;
    min-width: 0;
    color: var(--text-gold);
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.45;
    white-space: normal;
}

.game-wrapper_ag-list li i {
    flex: 0 0 auto;
    margin-right: 8px;
    color: var(--accent-start);
    font-style: normal;
    font-weight: 800;
}

.game-wrapper_ag-join {
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: center;
}

.ag-font {
    margin: 0 0 12px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: clamp(32px, 4vw, 54px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: 1px;
    text-shadow:
        0 3px 12px rgba(0, 0, 0, 0.5),
        0 0 22px rgba(255, 202, 71, 0.18);
    white-space: normal;
}

.game-wrapper_ag-join li,
.game-wrapper_ag-join p {
    color: var(--text-gold);
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.55;
    white-space: normal;
}

.style1,
.bubbly-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 180px;
    min-height: 50px;
    margin: 0;
    padding: 12px 24px;
    overflow: visible;
    border: 0;
    border-radius: 999px;
    background:
        linear-gradient(135deg, var(--accent-start), var(--accent-end));
    box-shadow:
        0 9px 26px rgba(255, 157, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: #3b2100;
    font-family: var(--font-ui);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.2px;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        filter 0.18s ease,
        box-shadow 0.18s ease;
}

.style1:hover,
.bubbly-button:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow:
        0 12px 32px rgba(255, 157, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.style1:active,
.bubbly-button:active {
    transform: scale(0.97);
}

/* 关闭旧版粒子按钮伪元素，防止 iframe 中溢出 */
.bubbly-button::before,
.bubbly-button::after {
    display: none !important;
}

/* ---------- 普通平台卡片 ---------- */

.ag-card1 {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-width: 0;
    min-height: 170px;
    margin: 0;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background:
        linear-gradient(
            145deg,
            rgba(29, 39, 76, 0.96),
            rgba(13, 18, 39, 0.98)
        );
    box-shadow:
        var(--shadow-md),
        inset 0 0 28px rgba(81, 105, 196, 0.07);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.ag-card1:hover {
    transform: translateY(-3px);
    border-color: var(--card-border-active);
    background:
        linear-gradient(
            145deg,
            rgba(38, 49, 93, 0.98),
            rgba(16, 22, 46, 0.99)
        );
    box-shadow:
        0 17px 44px rgba(0, 0, 0, 0.43),
        inset 0 0 30px rgba(255, 202, 71, 0.05);
}

.home-top-entry .game-wrapper .ag-card-img {
    position: relative;
    width: 120px;
    min-width: 120px;
    height: 120px;
    margin: 0;
    overflow: hidden;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.05);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 84%;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ag-card-img_hth {
    background-image: url("../picture/hthlogo.png");
}

.ag-card-img_kaiyun {
    background-image: url("../picture/kaiyunlogo.png");
}

.ag-card-img_jy {
    background-image: url("../picture/jiuyoulogo.png");
}

.ag-card-img_ayx {
    background-image: url("../picture/ayxlogo.png");
}

.ag-card-img_sb {
    background-image: url("../picture/sblogo.png");
}

.ag-card-img_xk {
    background-image: url("../picture/xklogo.png");
}

.ag-card-img_mk {
    background-image: url("../picture/mklogo.png");
}

.ag-card-content,
.ag-card-content1 {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
}

.ag-font1,
.ag-card-content h2,
.ag-card-content h5,
.ag-card-content1 h2,
.ag-card-content1 h5 {
    margin: 0 0 10px;
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 24px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: 0.3px;
    white-space: normal;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
}

.ag-card-content ul,
.ag-card-content1 ul {
    display: block;
    width: 100%;
    min-width: 0;
}

.ag-card-content li,
.ag-card-content1 li,
.ag-card-content p,
.ag-card-content1 p {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 4px 0 0;
    color: var(--text-sub);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 450;
    line-height: 1.65;
    letter-spacing: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.ag-card-content li:first-child,
.ag-card-content1 li:first-child {
    margin-bottom: 5px;
    color: var(--text-gold);
    font-size: 15px;
    font-weight: 650;
}

.home-top-entry .game-wrapper .ag-card-arrow {
    position: relative;
    top: auto;
    right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.ag-card-arrow::before {
    content: "›";
}

.ag-card-arrow .icon,
.ag-card-arrow .iconfont {
    display: none !important;
}

/* ---------- Pad ---------- */

@media screen and (max-width: 1100px) {
    .page.home {
        padding:
            22px
            max(15px, env(safe-area-inset-right))
            calc(30px + env(safe-area-inset-bottom))
            max(15px, env(safe-area-inset-left));
    }

    .home-top-entry .game-wrapper {
        gap: 15px;
    }

    .home-top-entry .game-wrapper_ag {
        grid-template-columns:
            minmax(180px, 0.8fr)
            minmax(230px, 1fr);
        gap: 22px;
        min-height: 250px;
        padding: 28px;
    }

    .style1,
    .bubbly-button {
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: 4px;
    }

    .ag-card1 {
        grid-template-columns: 96px minmax(0, 1fr) 28px;
        gap: 14px;
        min-height: 150px;
        padding: 17px;
    }

    .home-top-entry .game-wrapper .ag-card-img {
        width: 96px;
        min-width: 96px;
        height: 96px;
    }

    .ag-font1,
    .ag-card-content h2,
    .ag-card-content h5,
    .ag-card-content1 h2,
    .ag-card-content1 h5 {
        font-size: 21px;
    }
}

/* ---------- 手机 ---------- */

@media screen and (max-width: 767px) {
    html {
        font-size: 16px;
    }

    body {
        font-size: 16px;
        line-height: 1.62;
        background:
            radial-gradient(circle at 50% 0, #1b2852 0, #0e1530 38%, #070a16 78%);
    }

    .star-container,
    .star-container2 {
        background:
            linear-gradient(rgba(7, 10, 22, 0.16), rgba(7, 10, 22, 0.58)),
            no-repeat top center / cover url("../picture/background.png");
    }

    .mar {
        min-height: 40px;
        padding: 8px 0;
        font-size: 13px;
        line-height: 1.5;
    }

    .page.home {
        padding:
            14px
            max(10px, env(safe-area-inset-right))
            calc(28px + env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
    }

    .home-top-entry {
        width: 100%;
        max-width: 100%;
    }

    .home-top-entry .game-wrapper {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .game-wrapper_agbox {
        width: 100%;
        border-radius: 16px;
    }

    .home-top-entry .game-wrapper_ag {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        width: 100%;
        min-height: 330px;
        padding: 28px 20px;
        background:
            linear-gradient(rgba(15, 21, 44, 0.18), rgba(15, 21, 44, 0.52)),
            no-repeat right top / auto 76% url("../picture/ag-66.png"),
            linear-gradient(145deg, rgba(40, 53, 104, 0.96), rgba(14, 20, 43, 0.98));
    }

    .game-wrapper_ag-list {
        order: 2;
        width: 100%;
    }

    .game-wrapper_ag-list ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px 12px;
    }

    .game-wrapper_ag-list li {
        font-size: 16px;
        font-weight: 650;
        line-height: 1.45;
    }

    .game-wrapper_ag-join {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .ag-font {
        margin-bottom: 10px;
        font-size: 38px;
        line-height: 1.16;
        letter-spacing: 0.5px;
    }

    .game-wrapper_ag-join li,
    .game-wrapper_ag-join p {
        font-size: 16px;
        font-weight: 650;
        line-height: 1.55;
    }

    .style1,
    .bubbly-button {
        order: 3;
        align-self: center;
        width: min(290px, 100%);
        min-width: 0;
        min-height: 54px;
        padding: 13px 22px;
        font-size: 18px;
        font-weight: 750;
    }

    .ag-card1 {
        display: grid;
        grid-template-columns: 102px minmax(0, 1fr) 24px;
        gap: 14px;
        width: 100%;
        min-height: 154px;
        padding: 16px;
        border-radius: 16px;
    }

    .ag-card1:hover {
        transform: none;
    }

    .home-top-entry .game-wrapper .ag-card-img {
        width: 102px;
        min-width: 102px;
        height: 102px;
        border-radius: 14px;
        background-size: 84%;
    }

    .ag-card-content,
    .ag-card-content1 {
        align-self: center;
    }

    .ag-font1,
    .ag-card-content h2,
    .ag-card-content h5,
    .ag-card-content1 h2,
    .ag-card-content1 h5 {
        margin-bottom: 8px;
        font-size: 23px;
        line-height: 1.25;
    }

    .ag-card-content li,
    .ag-card-content1 li,
    .ag-card-content p,
    .ag-card-content1 p {
        margin-top: 3px;
        font-size: 14px;
        line-height: 1.55;
    }

    .ag-card-content li:first-child,
    .ag-card-content1 li:first-child {
        margin-bottom: 5px;
        font-size: 14.5px;
        font-weight: 650;
        line-height: 1.5;
    }

    .home-top-entry .game-wrapper .ag-card-arrow {
        width: 24px;
        min-width: 24px;
        height: 32px;
        font-size: 27px;
    }
}

/* ---------- iPhone 小屏 ---------- */

@media screen and (max-width: 390px) {
    .page.home {
        padding-left: 8px;
        padding-right: 8px;
    }

    .home-top-entry .game-wrapper_ag {
        min-height: 315px;
        padding: 24px 16px;
    }

    .game-wrapper_ag-list ul {
        gap: 9px 8px;
    }

    .game-wrapper_ag-list li {
        font-size: 15px;
    }

    .ag-font {
        font-size: 35px;
    }

    .ag-card1 {
        grid-template-columns: 92px minmax(0, 1fr) 20px;
        gap: 11px;
        min-height: 146px;
        padding: 14px;
    }

    .home-top-entry .game-wrapper .ag-card-img {
        width: 92px;
        min-width: 92px;
        height: 92px;
    }

    .ag-font1,
    .ag-card-content h2,
    .ag-card-content h5,
    .ag-card-content1 h2,
    .ag-card-content1 h5 {
        font-size: 21px;
    }

    .ag-card-content li,
    .ag-card-content1 li,
    .ag-card-content p,
    .ag-card-content1 p {
        font-size: 13px;
    }

    .ag-card-content li:first-child,
    .ag-card-content1 li:first-child {
        font-size: 13.5px;
    }
}

/* ---------- 横屏手机 ---------- */

@media screen and (max-height: 520px) and (orientation: landscape) {
    .page.home {
        padding-top: 10px;
        padding-bottom: 18px;
    }

    .home-top-entry .game-wrapper_ag {
        min-height: 220px;
        padding: 20px;
    }

    .ag-font {
        font-size: 28px;
    }
}

/* ---------- 减少动画偏好 ---------- */

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