:root {
    --primary-blue: #2b6ef0;
    --accent-white: #ffffff;
    --label-color: #2b6ef0;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 6px 16px rgba(0, 20, 60, 0.06);
    --shadow-glass: 0 10px 24px -6px rgba(0, 40, 100, 0.12);
    --text-main: #0f1e3a;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    background: #030a18;
    font-size: 15px;
}

/* ===== 加载动画 ===== */
.loader-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #030a18;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease;
}
.loader-glass.hidden {
    opacity: 0;
    pointer-events: none;
}
.loader-glass .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #2b6ef0;
    border-radius: 50%;
    animation: spinGlass 0.8s linear infinite;
}
@keyframes spinGlass {
    to { transform: rotate(360deg); }
}

/* ===== 背景视频 ===== */
.bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: blur(12px) brightness(0.9);
}
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 15% 10%, rgba(255, 140, 200, 0.35) 0%, transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(100, 180, 255, 0.4) 0%, transparent 45%),
        radial-gradient(circle at 40% 70%, rgba(180, 130, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(70, 230, 250, 0.35) 0%, transparent 45%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: hueShift 12s infinite alternate ease-in-out;
}
@keyframes hueShift {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}
.raster-stripes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    justify-content: space-evenly;
    opacity: 0.15;
}
.raster-stripes span {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9), transparent);
    box-shadow: 0 0 12px rgba(255,255,255,0.5);
}

/* ===== 容器 ===== */
.container {
    position: relative;
    z-index: 10;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 10px 16px;
}

/* ===== 顶部栏 ===== */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0 2px;
    margin-bottom: 0;
}
.logo-area {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12));
}
.share-btn {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 6px 14px rgba(0,30,80,0.1);
    padding: 6px 12px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-blue);
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}
.share-btn svg {
    width: 19px;
    height: 19px;
    stroke: var(--primary-blue);
    stroke-width: 2;
    fill: none;
}
.share-btn:active {
    background: rgba(255,255,255,0.9);
    transform: scale(0.96);
}

/* ===== 标题区域 ===== */
.title-section {
    text-align: center;
    margin: 8px 0 12px;
    padding: 0 4px;
}
.main-title {
    font-size: 44px;
    font-weight: 900;
    color: var(--accent-white);
    letter-spacing: -0.5px;
    text-shadow: 0 0 25px rgba(255,255,255,0.7), 0 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 6px;
    line-height: 1.1;
    display: inline-block;
}
.main-title .char {
    display: inline-block;
    animation: charJumpLoop 1.6s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.24s);
}
@keyframes charJumpLoop {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.sub-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    letter-spacing: 3px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: inline-block;
    padding: 4px 20px;
    background: rgba(20,40,80,0.2);
    border-radius: 40px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid rgba(255,255,255,0.2);
}

/* ===== Toast 提示 ===== */
.toast-tip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: none;
    padding: 14px 16px;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
}
.toast-tip.show {
    transform: translateY(0);
}
.toast-content {
    background: rgba(10,25,55,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    font-weight: 500;
    font-size: 17px;
    padding: 12px 28px;
    border-radius: 60px;
    box-shadow: 0 12px 30px rgba(0,20,70,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}
.toast-content svg {
    width: 22px;
    height: 22px;
    stroke: white;
    stroke-width: 2.5;
}

/* ===== 幻灯片 ===== */
.slider-box {
    margin: 6px 0 12px;
    border-radius: 28px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 3px;
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(255,255,255,0.5);
}
.slider {
    border-radius: 24px;
    overflow: hidden;
    background: transparent;
}
.slides-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    scroll-behavior: smooth;
}
.slides-scroll::-webkit-scrollbar {
    display: none;
}
.slide-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
}
.slide-item img {
    width: 100%;
    height: auto;
    display: block;
    background: #a0b8d4;
}
.dots-container {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 7px;
}
.dot {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    transition: all 0.2s;
}
.dot.active {
    width: 20px;
    background: white;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* ===== 联系方式 ===== */
.contact-box {
    margin: 14px 0 14px;
    padding: 4px;
    border-radius: 32px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: var(--shadow-sm);
}
.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    padding: 6px;
}
.contact-btn {
    flex: 0 0 calc(50% - 3.5px);
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 9px 0;
    border-radius: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #0f2b5c;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(255,255,255,0.7);
    transition: all 0.15s;
}
.contact-btn:active {
    background: rgba(255,255,255,0.9);
    transform: scale(0.97);
}

/* ===== 分类标签 ===== */
.label {
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    margin: 18px 0 12px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: var(--shadow-sm);
    color: var(--label-color);
    text-shadow: 0 0 15px rgba(43,110,240,0.5);
}
.label::before,
.label::after {
    content: "";
    height: 2px;
    width: 22px;
    background: linear-gradient(90deg, transparent, var(--label-color), transparent);
    opacity: 0.6;
    border-radius: 2px;
}

/* ===== 卡片网格 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 2px;
}
.card {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 6px 3px 8px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 18px rgba(0,20,60,0.08);
    border: 1px solid rgba(255,255,255,0.6);
    transition: transform 0.15s;
    height: 100%;
}
.card:active {
    transform: scale(0.97);
    background: rgba(255,255,255,0.75);
}
.card .logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    margin-bottom: 5px;
    object-fit: contain;
    background: white;
    padding: 3px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.02);
    border: 1px solid #e0edff;
}
.card .name {
    font-size: 14px;
    font-weight: 800;
    color: #0b1e3c;
    margin-bottom: 3px;
    line-height: 1.3;
    text-align: center;
    word-break: keep-all;
}
.card .promo {
    font-size: 10.5px;
    color: #d6482b;
    font-weight: 600;
    margin-bottom: 6px;
    padding: 0 4px;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    max-width: 100%;
}
.card .btn {
    width: 100%;
    background: linear-gradient(145deg, #2f7bff, #1f6bff);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 0;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(31,111,235,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    letter-spacing: 0.3px;
    margin-top: auto;
}

/* ===== 工具菜单 ===== */
.tool-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 2px 2px;
}
.tool-card {
    background: rgba(15,30,55,0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 9px;
    border-radius: 24px;
    text-decoration: none;
    display: flex;
    align-items: center;
    box-shadow: 0 14px 26px -6px rgba(0,30,80,0.35);
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.15s;
    position: relative;
}
.tool-card:active {
    background: rgba(25,45,80,0.85);
    transform: scale(0.98);
}
.tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    margin-right: 10px;
    background: white;
    padding: 4px;
    object-fit: contain;
    border: 1px solid rgba(255,255,255,0.5);
}
.tool-info {
    display: flex;
    flex-direction: column;
}
.tool-title {
    font-size: 15px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
}
.tool-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}
.tool-card::after {
    content: "↗";
    position: absolute;
    bottom: 6px;
    right: 10px;
    font-size: 15px;
    color: white;
    opacity: 0.8;
    font-weight: 400;
}

/* ===== 页脚 ===== */
footer {
    text-align: center;
    padding: 24px 0 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.8px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 14px;
}

/* ===== 弹幕覆盖 ===== */
.kkedh-marquee {
    margin: 6px 0 10px !important;
    border-radius: 40px !important;
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    padding: 8px 16px !important;
}
.kkedh-marquee-text {
    color: rgba(255,255,255,0.95) !important;
    text-shadow: 0 0 20px rgba(43,110,240,0.3) !important;
}

/* ===== 音乐播放器适配 ===== */
.music-player {
    background: rgba(255,255,255,0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    border-radius: 60px !important;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    .card .logo {
        width: 44px;
        height: 44px;
    }
    .card .name {
        font-size: 12px;
    }
    .main-title {
        font-size: 32px;
    }
    .tool-box {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .contact-btn {
        font-size: 13px;
        padding: 7px 0;
    }
}
@media (max-width: 380px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .main-title {
        font-size: 28px;
    }
}
