/* 阿璃APP导航 —— 前台样式（金色主题，移动端优先） */
:root {
    --gold: #b38f00;
    --gold-light: #ffeb99;
    --bg1: #ffffff;
    --bg2: #fff8e1;
    --bg3: #f4e1d2;
    --card: #ffffff;
    --text: #000000;
    --radius: 14px;
    --cols: 3;
    --line: rgba(179, 143, 0, .22);
    --line2: rgba(179, 143, 0, .14);
    --soft: rgba(179, 143, 0, .10);
    --deep: rgba(179, 143, 0, .9);
    --neon-gold: linear-gradient(135deg, #fff 0%, #ffeb99 20%, #b38f00 60%, #fff 100%);
    --neon-color: linear-gradient(to right, #ff0000, #ff7f00, #b38f00, #00ff00, #0000ff, #4b0082, #ff0000);
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #fff8e1 50%, #f4e1d2 100%);
    --pk21-ann-dur: 16s;
}

/* 七彩流光文字 */
.neon-text,
.wave-text,
.tool-title {
    background: var(--neon-color);
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 旋转流光边框（conic-gradient + rotate） */
@keyframes pk21-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    color: var(--text);
}

.container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 4px 100px;
}

/* ---------- 顶部 ---------- */
.header-area {
    text-align: center;
    padding: 24px 8px 12px;
}

.main-title {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 900;
    background: var(--neon-gold);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-breathe 4s ease-in-out infinite, shine 5s linear infinite;
    margin-bottom: 6px;
    line-height: 1.25;
    word-break: break-word;
    letter-spacing: .3px;
}

.sub-title {
    font-size: 11px;
    color: rgba(0, 0, 0, .45);
    font-weight: 600;
    letter-spacing: .5px;
    line-height: 1.5;
    word-break: break-word;
}

@keyframes title-breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes shine {
    to {
        background-position: 400% center;
    }
}

/* ---------- 轮播 ---------- */
.slider-box {
    position: relative;
    margin: 0 4px 14px;
    padding: 3px;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(179, 143, 0, .2);
}

/* 旋转流光边框 */
.slider-box::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(#fff, var(--gold), transparent 25%, #fff 50%, var(--gold), transparent 75%, #fff 100%);
    animation: pk21-rotate 3s linear infinite;
}

.slider {
    position: relative;
    z-index: 2;
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
}

.slide-track {
    display: flex;
    width: 100%;
}

.pk21-slide-half {
    flex: 0 0 100%;
    display: block;
}

.pk21-slide-half img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- 滚动公告 ---------- */
.pk21-marquee-wrap {
    margin: 0 4px 12px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .92);
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: 0 4px 14px var(--soft);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
}

.pk21-mq-ic {
    flex: 0 0 18px;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .9;
}

/* 滚动区独立裁剪，文字不会盖到铃铛上 */
.pk21-mq-view {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.pk21-marquee-track {
    display: flex;
    width: max-content;
    animation: pk21-mq var(--pk21-ann-dur) linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.pk21-marquee-seg {
    font-size: 12px;
    color: #6b5300;
    font-weight: 600;
    padding-right: 56px;
    letter-spacing: .2px;
}

@keyframes pk21-mq {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.pk21-marquee-wrap:active {
    transform: scale(.995);
}

/* ---------- 联系栏 ---------- */
.contact-box {
    position: relative;
    margin: 0 6px 16px;
    padding: 1.5px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(179, 143, 0, .15);
}

/* 旋转流光边框 */
.contact-box::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(transparent, var(--gold), transparent 30%);
    animation: pk21-rotate 2.5s linear infinite;
}

.contact-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 10px;
    background: #fff;
    border-radius: 50px;
}

.wave-text {
    font-size: 12.5px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: .3px;
    animation: shine 5s linear infinite, wave 1.5s ease-in-out infinite;
    text-align: center;
    max-width: 48%;
    word-break: break-word;
    line-height: 1.4;
}

.pk21-tdwz-plain {
    max-width: 100%;
    display: block;
    cursor: default;
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* ---------- 分组标题 ---------- */
.label {
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
    margin: 18px 6px 9px;
    letter-spacing: .4px;
    line-height: 1.5;
    word-break: break-word;
}

/* ---------- 应用网格 ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 9px;
    padding: 0 4px;
}

.card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line2);
    border-radius: var(--radius);
    padding: 10px 4px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 14px var(--soft);
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
    overflow: hidden;
}

.card:active {
    transform: scale(.965);
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(179, 143, 0, .18);
    }
}

.pk21-app-logo,
.card .ph {
    width: 42px;
    height: 42px;
    aspect-ratio: auto;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #f6f2e6;
    border: 1px solid var(--line2);
    margin: 0 auto 6px;
}

.card .name {
    font-size: 11.5px;
    font-weight: 800;
    margin-top: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    padding: 0 2px;
    width: 100%;
}

/* 小标签：永远单行，字号/字宽由 JS 微调，保证完整显示不换行 */
.card .promo {
    display: block;
    width: 100%;
    margin: 3px 0 4px;
    padding: 2px 4px;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff5a4e 0%, #e01f14 100%);
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 7px rgba(224, 31, 20, .3);
}

/* 内层：文字太长时只做横向压缩，红条宽度不变，观感更整齐 */
.card .promo .promo-in {
    display: block;
    width: 100%;
    white-space: nowrap;
    transform-origin: center center;
}

.card .btn {
    width: 85%;
    margin: 7px auto 0;
    padding: 4px 0;
    font-size: 10px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(180deg, var(--gold-light) 0%, #cca300 100%);
    border-radius: 6px;
    letter-spacing: 1px;
    text-align: center;
}

/* ---------- 工具区 ---------- */
.tool-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 4px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #333 0%, #000 100%);
    border-radius: 12px;
    padding: 13px 10px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    position: relative;
    overflow: hidden;
    transition: transform .18s ease;
}

.tool-card:active {
    transform: scale(.975);
}

.tool-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 32px;
    border: 1px solid #555;
    background: #222;
}

.tool-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #d9ae00 0%, var(--gold) 100%);
    border: none;
}

.tool-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tool-title {
    font-size: 13px;
    font-weight: 900;
    line-height: 1.3;
    animation: shine 5s linear infinite, wave 1.8s ease-in-out infinite;
}

.tool-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, .45);
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-chev {
    display: none;
}

/* ---------- 页脚 ---------- */
.pk21-site-footer {
    text-align: center;
    font-size: 11px;
    color: rgba(0, 0, 0, .38);
    line-height: 1.9;
    padding: 26px 12px 8px;
}

.pk21-footer-domain {
    color: var(--gold);
    font-weight: 800;
}

.pk21-footer-extra {
    display: block;
    margin-top: 2px;
    color: rgba(0, 0, 0, .3);
}

/* ---------- 悬浮客服 ---------- */
.pk21-float-service {
    position: fixed;
    right: 12px;
    bottom: 88px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid var(--gold);
    box-shadow: 0 6px 16px rgba(179, 143, 0, .28);
    z-index: 60;
    animation: svc-float 3s ease-in-out infinite;
}

.pk21-float-service img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes svc-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* ---------- 公告弹窗 ---------- */
#pk21AnnouncementPopup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    padding: 24px;
}

#pk21AnnouncementPopup.pk21-ann-show {
    opacity: 1;
    visibility: visible;
}

.pk21-ann-box {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px 14px;
    text-align: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
    transform: scale(.92);
    transition: transform .22s cubic-bezier(.2, .9, .3, 1.2);
    position: relative;
    border: 1px solid var(--line2);
}

#pk21AnnouncementPopup.pk21-ann-show .pk21-ann-box {
    transform: scale(1);
}

.pk21-ann-close {
    position: absolute;
    right: 8px;
    top: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: rgba(0, 0, 0, .3);
    cursor: pointer;
}

.pk21-ann-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 1px;
}

.pk21-ann-body {
    font-size: 13px;
    line-height: 1.75;
    color: #333;
    text-align: left;
    max-height: 46vh;
    overflow-y: auto;
    word-break: break-word;
}

.pk21-ann-ok {
    margin-top: 14px;
    width: 100%;
    padding: 9px 0;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #d9ae00 0%, var(--gold) 100%);
    cursor: pointer;
}

/* ---------- 无障碍：仅收敛必要的动效，不波及跑马灯 ---------- */
@media (prefers-reduced-motion: reduce) {
    .main-title {
        animation: none;
    }

    .pk21-float-service {
        animation: none;
    }

    .wave-text {
        animation: none;
    }
}
