/* ============================================================
   深蓝 + 白字 + 冷金 高级主题变量
   ============================================================ */
:root {
    --bg-primary: #050b1a;        /* 深海蓝底 */
    --bg-secondary: #0a1428;      /* 导航/底栏 */
    --bg-card: #0f1d38;           /* 卡片底 */
    --bg-card-hover: #16294d;
    --glass: rgba(15, 29, 56, 0.55);
    --glass-border: rgba(120, 170, 255, 0.18);

    --text-primary: #ffffff;      /* 主文字纯白 */
    --text-secondary: #9db4d8;    /* 次要文字 */
    --text-muted: #6b82a8;

    --accent-blue: #2f7cff;       /* 主蓝 */
    --accent-blue-light: #66a3ff;
    --accent-blue-glow: rgba(47, 124, 255, 0.55);
    --accent-cyan: #4ee0ff;       /* 高亮青 */
    --accent-gold: #e8c87a;       /* 冷金点缀，高级感 */
    --accent-gold-light: #ffe6a8;

    --border-color: rgba(120, 170, 255, 0.15);
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
    --shadow-hover: 0 16px 60px rgba(47, 124, 255, 0.35);
    --footer-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', 'PingFang SC', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

/* ============================================================
   头部
   ============================================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 20, 40, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 12px;
}

/* logo：蓝白流光 */
.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(90deg,
        #ffffff 0%,
        var(--accent-cyan) 25%,
        var(--accent-blue-light) 50%,
        var(--accent-gold-light) 75%,
        #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShine 6s linear infinite;
}

@keyframes logoShine {
    to { background-position: 200% center; }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

/* ============================================================
   主内容
   ============================================================ */
.main {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 32px 24px;*/
    position: relative;
    z-index: 1;
}

.hero { text-align: center; padding: 56px 0 40px; }

.hero h1 {
    font-size: clamp(28px, 6vw, 60px);
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1.2;
    margin-bottom: 14px;
    background: linear-gradient(135deg,
        #ffffff 0%,
        var(--accent-cyan) 40%,
        var(--accent-blue-light) 70%,
        var(--accent-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 24px rgba(78, 224, 255, 0.35));
    animation: heroReveal 1s ease-out both, heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroReveal {
    from { opacity: 0; transform: translateY(30px); letter-spacing: 16px; }
    to   { opacity: 1; transform: translateY(0);    letter-spacing: 6px; }
}

@keyframes heroGlow {
    from { filter: drop-shadow(0 0 18px rgba(78, 224, 255, 0.25)); }
    to   { filter: drop-shadow(0 0 32px rgba(47, 124, 255, 0.55)); }
}

.hero p {
    font-size: clamp(13px, 2.4vw, 18px);
    color: var(--text-secondary);
    letter-spacing: 8px;
    text-transform: uppercase;
}

/* 金线分隔：中间带光点 */
.divider {
    width: 120px;
    height: 2px;
    margin: 24px auto 0;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    position: relative;
    animation: dividerBreath 3s ease-in-out infinite;
}

.divider::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-gold-light);
    box-shadow: 0 0 16px var(--accent-gold);
    transform: translate(-50%, -50%);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dividerBreath {
    0%, 100% { opacity: 0.7; width: 120px; }
    50%      { opacity: 1;   width: 180px; }
}

@keyframes dotPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.8; }
    50%      { transform: translate(-50%, -50%) scale(1.6);  opacity: 1; }
}

/* ============================================================
   分类卡片：玻璃拟态 + 高光描边 + 入场动画
   ============================================================ */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 48px;
}

.category-card {
    position: relative;
    padding: 28px 16px;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(20, 40, 78, 0.85), rgba(8, 18, 38, 0.9));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    animation: cardFadeIn 0.7s ease-out both;
}

/* 卡片依次入场 */
.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.10s; }
.category-card:nth-child(3) { animation-delay: 0.15s; }
.category-card:nth-child(4) { animation-delay: 0.20s; }
.category-card:nth-child(5) { animation-delay: 0.25s; }
.category-card:nth-child(6) { animation-delay: 0.30s; }
.category-card:nth-child(7) { animation-delay: 0.35s; }
.category-card:nth-child(8) { animation-delay: 0.40s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 顶部金色小线 */
.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    transition: width 0.4s;
}

/* 悬浮时的光斑扫过 */
.category-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 60%; height: 200%;
    background: linear-gradient(120deg, transparent, rgba(120, 180, 255, 0.22), transparent);
    transform: rotate(20deg);
    transition: left 0.7s ease;
    pointer-events: none;
}

.category-card:hover::after { left: 140%; }

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(160deg, rgba(28, 54, 100, 0.95), rgba(12, 26, 52, 0.95));
}

.category-card:hover::before { width: 80%; }

.category-icon {
    font-size: 38px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 14px rgba(78, 224, 255, 0.45));
    transition: transform 0.4s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.15) rotate(-4deg);
}

.category-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.category-sub {
    font-size: 12px;
    color: var(--accent-gold-light);
    margin-top: 8px;
    opacity: 0.9;
    letter-spacing: 0.5px;
    transition: color 0.3s, text-shadow 0.3s;
}

.category-card:hover .category-sub {
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(78, 224, 255, 0.6);
}

/* ============================================================
   底部导航（SVG 图标）
   ============================================================ */
.footer-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--footer-height);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    align-items: stretch;
    background: rgba(10, 20, 40, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.7);
    z-index: 200;
}

.footer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    position: relative;
    transition: color 0.25s;
    -webkit-tap-highlight-color: transparent;
}

/* 图标 */
.footer-icon {
    width: 23px;
    height: 23px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                color 0.3s,
                filter 0.3s;
}

/* hover */
.footer-item:hover {
    color: #ffffff;
}

.footer-item:hover .footer-icon {
    color: var(--accent-cyan);
    transform: translateY(-3px);
    filter: drop-shadow(0 0 10px rgba(78, 224, 255, 0.8));
}

/* 选中 */
.footer-item.selected {
    color: #ffffff;
}

.footer-item.selected .footer-icon {
    color: var(--accent-cyan);
    transform: translateY(-3px);
    filter: drop-shadow(0 0 12px rgba(78, 224, 255, 0.9));
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%   { transform: translateY(0)    scale(1); }
    50%  { transform: translateY(-6px) scale(1.15); }
    100% { transform: translateY(-3px) scale(1); }
}

/* 选中项顶部金线 */
.footer-item.selected::before {
    content: '';
    position: absolute;
    top: 0; left: 25%; right: 25%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold-light), transparent);
    box-shadow: 0 0 12px var(--accent-gold);
}

/* 徽章 */
.badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 22px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff5470, #d62b4b);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 84, 112, 0.7);
    pointer-events: none;
}

.main-pulse { animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* ============================================================
   动态背景层：深海蓝 + 蓝青光晕 + 漂浮粒子
   ============================================================ */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at top, #0a1a3a 0%, #050b1a 55%, #02050e 100%);
}

/* 深蓝渐变流动 */
.bg-gradient {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 30%, rgba(47, 124, 255, 0.30), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(78, 224, 255, 0.20), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(20, 60, 140, 0.35), transparent 60%);
    background-size: 200% 200%;
    animation: gradientDrift 20s ease-in-out infinite alternate;
}

@keyframes gradientDrift {
    0%   { background-position: 0% 0%;     transform: scale(1)    rotate(0deg); }
    50%  { background-position: 100% 100%; transform: scale(1.06) rotate(2deg); }
    100% { background-position: 50% 20%;   transform: scale(1)    rotate(-2deg); }
}

/* 光晕 */
.bg-orbs { position: absolute; inset: 0; }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    will-change: transform;
}

.orb-1 {
    width: 460px; height: 460px;
    top: -140px; left: -140px;
    background: radial-gradient(circle, rgba(47, 124, 255, 0.65), transparent 70%);
    animation: orbFloat1 22s ease-in-out infinite;
}

.orb-2 {
    width: 540px; height: 540px;
    bottom: -180px; right: -160px;
    background: radial-gradient(circle, rgba(78, 224, 255, 0.45), transparent 70%);
    animation: orbFloat2 28s ease-in-out infinite;
}

.orb-3 {
    width: 340px; height: 340px;
    top: 40%; left: 55%;
    background: radial-gradient(circle, rgba(232, 200, 122, 0.28), transparent 70%);
    animation: orbFloat3 24s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(140px, 90px) scale(1.15); }
    66%      { transform: translate(60px, -70px) scale(0.95); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%      { transform: translate(-150px, -110px) scale(1.1); }
    70%      { transform: translate(-60px, 70px) scale(0.9); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-110px, 130px) scale(1.2); }
}

/* ---------- 粒子漂浮 ---------- */
.bg-particles { position: absolute; inset: 0; }

.bg-particles span {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 12px 3px rgba(78, 224, 255, 0.8);
    opacity: 0;
    animation: particleRise linear infinite;
}

.bg-particles span:nth-child(1)  { left: 6%;  animation-duration: 16s; animation-delay: 0s;    }
.bg-particles span:nth-child(2)  { left: 15%; animation-duration: 20s; animation-delay: 3s;    }
.bg-particles span:nth-child(3)  { left: 27%; animation-duration: 14s; animation-delay: 6s;    }
.bg-particles span:nth-child(4)  { left: 38%; animation-duration: 22s; animation-delay: 1.5s;  }
.bg-particles span:nth-child(5)  { left: 50%; animation-duration: 18s; animation-delay: 8s;    }
.bg-particles span:nth-child(6)  { left: 61%; animation-duration: 24s; animation-delay: 2s;    }
.bg-particles span:nth-child(7)  { left: 70%; animation-duration: 17s; animation-delay: 5s;    }
.bg-particles span:nth-child(8)  { left: 80%; animation-duration: 21s; animation-delay: 7s;    }
.bg-particles span:nth-child(9)  { left: 90%; animation-duration: 15s; animation-delay: 4s;    }
.bg-particles span:nth-child(10) { left: 47%; animation-duration: 19s; animation-delay: 9s;    }

@keyframes particleRise {
    0%   { bottom: -10px; opacity: 0;   transform: translateX(0); }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.5; }
    100% { bottom: 105%;  opacity: 0;   transform: translateX(50px); }
}

/* 背景图视差（可选，配合你的图） */
.bg-image {
    position: absolute;
    inset: -5%;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    filter: saturate(0.7) brightness(0.7) hue-rotate(180deg);
    animation: bgZoom 32s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes bgZoom {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}

/* 移动端降低负担 */
@media (max-width: 640px) {
    .footer-item { font-size: 10px; gap: 3px; }
    .footer-icon { width: 21px; height: 21px; }
}

@media (max-width: 640px) {
    .orb { filter: blur(50px); opacity: 0.45; }
    .orb-1 { width: 300px; height: 300px; }
    .orb-2 { width: 360px; height: 360px; }
    .orb-3 { width: 220px; height: 220px; }
    .bg-gradient { animation-duration: 26s; }
}

/* 尊重减少动态效果 */
@media (prefers-reduced-motion: reduce) {
    .bg-gradient,
    .orb,
    .bg-image,
    .bg-particles span,
    .logo,
    .hero h1,
    .divider,
    .divider::after,
    .category-card {
        animation: none !important;
    }
}

/* IKAYA88 手机版顶部按钮靠右 */

@media (max-width: 700px) {

    .header .nav-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }

}
