/* ============================================================
   glass-core.css — 玻璃磨砂 UI 公共样式 (Glass Morphism Core)
   版本: 2.0 | 存放: 网站根目录 css/
   依赖: 页面须同时引入 bootstrap.css, custom.css, advancedAppearance.css
   设计辅助: DeepSeek AI
   ============================================================ */

/* === CSS 变量 (Design Tokens) === */
:root {
    /* 玻璃基底 */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-hover: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
    --glass-blur: saturate(180%) blur(20px);

    /* 主题色系 */
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #a855f7;
    --accent-4: #ec4899;
    --accent-5: #f43f5e;
    --accent-warm: #f59e0b;

    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #475569;

    /* 圆角 */
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
}

/* === 全局背景 === */
body {
    background: linear-gradient(135deg,
        #fce4ec 0%,
        #f3e5f5 12%,
        #ede7f6 25%,
        #e8eaf6 37%,
        #e3f2fd 50%,
        #e0f7fa 62%,
        #e8f5e9 75%,
        #fff8e1 87%,
        #fff3e0 100%
    );
    background-attachment: fixed;
    background-size: 500% 500%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* === 渐变动画关键帧 === */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    25%      { background-position: 100% 0%; }
    50%      { background-position: 100% 100%; }
    75%      { background-position: 0% 100%; }
}

/* === 确保内容在 emoji 粒子上层 === */
.hero-section, section, footer {
    position: relative;
    z-index: 1;
}

/* ============================================================
   浮动 Emoji 背景粒子
   ============================================================ */
.emoji-particle {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    font-size: 2.5rem;
    opacity: 0.22;
    animation: emojiFloat 18s linear infinite;
    filter: blur(0.5px);
    user-select: none;
}
.emoji-particle:nth-child(1)  { top: 5%;  left: 3%;  animation-delay: 0s;    font-size: 3rem; }
.emoji-particle:nth-child(2)  { top: 12%; left: 88%; animation-delay: -2s;   font-size: 2.2rem; }
.emoji-particle:nth-child(3)  { top: 22%; left: 10%; animation-delay: -4s;   font-size: 3.5rem; }
.emoji-particle:nth-child(4)  { top: 32%; left: 78%; animation-delay: -6s;   font-size: 2rem; }
.emoji-particle:nth-child(5)  { top: 44%; left: 6%;  animation-delay: -8s;   font-size: 3.2rem; }
.emoji-particle:nth-child(6)  { top: 54%; left: 84%; animation-delay: -10s;  font-size: 2.4rem; }
.emoji-particle:nth-child(7)  { top: 65%; left: 14%; animation-delay: -12s;  font-size: 2.8rem; }
.emoji-particle:nth-child(8)  { top: 76%; left: 92%; animation-delay: -14s;  font-size: 3.6rem; }
.emoji-particle:nth-child(9)  { top: 84%; left: 7%;  animation-delay: -16s;  font-size: 2.1rem; }
.emoji-particle:nth-child(10) { top: 92%; left: 80%; animation-delay: -18s;  font-size: 3rem; }

@keyframes emojiFloat {
    0%   { transform: translateY(0)    translateX(0)    rotate(0deg)  scale(1); }
    25%  { transform: translateY(-40px) translateX(25px)  rotate(8deg)  scale(1.08); }
    50%  { transform: translateY(-80px) translateX(-15px) rotate(-5deg) scale(0.95); }
    75%  { transform: translateY(-30px) translateX(-30px) rotate(3deg)  scale(1.05); }
    100% { transform: translateY(0)    translateX(0)    rotate(0deg)  scale(1); }
}

/* ============================================================
   Banner + Hero 合体区域 (.hero-section)
   ============================================================ */
.hero-section {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-primary) !important;
    position: relative;
    padding: 24px 0 32px 0;
    margin-bottom: 16px;
}
.hero-section .hero-nav-brand,
.glass-nav .hero-nav-brand {
    font-weight: 700;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}
.hero-section .hero-nav-link,
.glass-nav .hero-nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    text-decoration: none;
}
.hero-section .hero-nav-link:hover,
.glass-nav .hero-nav-link:hover {
    color: var(--accent-1);
}
.hero-section .hero-nav-link::after,
.glass-nav .hero-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-3));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}
.hero-section .hero-nav-link:hover::after,
.glass-nav .hero-nav-link:hover::after {
    width: 70%;
}

/* 固定导航栏玻璃磨砂背景 */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}

/* Hero 标题 */
.hero-title {
    font-weight: 800;
    font-size: 2.4rem;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                text-shadow 0.4s ease;
    cursor: default;
}
.hero-title:hover {
    transform: scale(1.08);
    text-shadow: 0 4px 20px rgba(139, 92, 246, 0.4),
                 0 8px 40px rgba(236, 72, 153, 0.2);
}
.hero-title span {
    background: linear-gradient(135deg, var(--accent-warm), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: background 0.5s ease;
}
.hero-title:hover span {
    background: linear-gradient(135deg, #f97316, var(--accent-4), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero 描述 */
.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}
.hero-desc .highlight {
    color: var(--accent-2);
    font-weight: 600;
}

/* ============================================================
   Section 标题卡片 (.section-header)
   ============================================================ */
.section-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.section-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    pointer-events: none;
}
.section-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(31, 38, 135, 0.12);
}

/* ============================================================
   内容卡片 (.content-card)
   ============================================================ */
.content-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.content-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2), transparent 60%);
    pointer-events: none;
}
.content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 56px rgba(31, 38, 135, 0.14);
    border-color: rgba(255, 255, 255, 0.7);
    background: var(--glass-bg-hover);
}
.content-card img {
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    cursor: zoom-in;
}
.content-card:hover img {
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
.content-card h4 {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.3rem;
}
.content-card h6 {
    color: var(--text-secondary);
}
.content-card p {
    color: #334155;
}

/* ============================================================
   反馈卡片 (.feedback-card)
   ============================================================ */
.feedback-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s ease;
}
.feedback-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(31, 38, 135, 0.12);
}
.feedback-card .list-group-item {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
    border-radius: 12px !important;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}
.feedback-card .list-group-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(4px);
}

/* ============================================================
   底部 (.glass-footer)
   ============================================================ */
.glass-footer {
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary) !important;
}
.glass-footer .link {
    color: var(--accent-1) !important;
    transition: color 0.3s ease;
}
.glass-footer .link:hover {
    color: var(--accent-3) !important;
}

/* ============================================================
   按钮
   ============================================================ */

/* 玻璃按钮 (.btn-glass) — Hero CTA */
.btn-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    color: var(--accent-1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}
.btn-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    color: var(--accent-2);
}
.btn-glass:hover::before {
    left: 100%;
}

/* 现代渐变按钮 (.btn-modern) — 卡片内链接按钮 */
.btn-modern {
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}
.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.btn-modern:hover::before {
    left: 100%;
}
.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.btn-purple { background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #fff; }
.btn-pink   { background: linear-gradient(135deg, var(--accent-4), var(--accent-5)); color: #fff; }
.btn-amber  { background: linear-gradient(135deg, var(--accent-warm), #f97316); color: #fff; }
.btn-indigo { background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff; }

/* ============================================================
   彩色标签 (.accent-tag)
   ============================================================ */
.accent-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}
.tag-purple { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.tag-pink   { background: rgba(236, 72, 153, 0.15); color: #db2777; }
.tag-amber  { background: rgba(245, 158, 11, 0.15);  color: #d97706; }
.tag-blue   { background: rgba(99, 102, 241, 0.15);  color: #4f46e5; }
.tag-red    { background: rgba(244, 63, 94, 0.15);   color: #e11d48; }

/* ============================================================
   分割线 (.glass-divider)
   ============================================================ */
.glass-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
    border-radius: 2px;
}

/* ============================================================
   目录浮窗 (TOC)
   ============================================================ */
.toc-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.12);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--accent-1);
}
.toc-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}
.toc-panel {
    position: fixed;
    bottom: 84px;
    right: 24px;
    z-index: 998;
    background: rgba(255,255,255,0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
    padding: 16px 20px;
    min-width: 200px;
    max-height: 60vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.toc-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.toc-panel a {
    display: block;
    padding: 7px 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s ease;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.toc-panel a:last-child { border-bottom: none; }
.toc-panel a:hover {
    color: var(--accent-1);
    padding-left: 8px;
}

/* ============================================================
   音乐播放器浮窗 (Music Toggle + Panel)
   ============================================================ */

/* 左下角胶囊按钮 — 与右下角 toc-toggle 一致 */
.music-toggle {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(31, 38, 135, 0.12);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--accent-4);
    padding: 0;
}
.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(236, 72, 153, 0.2);
    color: var(--accent-5);
}

/* 左下角播放器面板 — 与右下角 toc-panel 一致 */
.music-panel {
    position: fixed;
    bottom: 84px;
    left: 24px;
    z-index: 998;
    background: rgba(255,255,255,0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.15);
    min-width: 300px;
    max-width: 360px;
    max-height: 60vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.music-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 面板内 APlayer 样式 */
.music-panel .aplayer {
    background: transparent !important;
    margin: 0;
}
.music-panel .aplayer .aplayer-body {
    background: transparent !important;
}
.music-panel .aplayer .aplayer-pic {
    border-radius: 12px 0 0 12px;
}
.music-panel .aplayer .aplayer-list {
    background: rgba(255, 255, 255, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.music-panel .aplayer .aplayer-list ol li {
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
}
.music-panel .aplayer .aplayer-list ol li:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}
.music-panel .aplayer .aplayer-list ol li.aplayer-list-light {
    background: rgba(139, 92, 246, 0.15) !important;
}
.music-panel .aplayer .aplayer-info {
    background: transparent !important;
}
.music-panel .aplayer .aplayer-info .aplayer-music {
    color: var(--text-primary) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon {
    color: var(--text-secondary) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover {
    color: var(--accent-1) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
    background: rgba(0, 0, 0, 0.1) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
    background: rgba(139, 92, 246, 0.3) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-3)) !important;
}
.music-panel .aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
    background: var(--accent-2) !important;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}
.music-panel .aplayer .aplayer-lrc {
    color: var(--text-secondary) !important;
}
.music-panel .aplayer .aplayer-lrc p.aplayer-lrc-current {
    color: var(--accent-1) !important;
}
@media (max-width: 768px) {
    .music-panel {
        left: 8px;
        min-width: 280px;
        max-width: calc(100vw - 16px);
    }
    .music-panel .aplayer .aplayer-pic {
        border-radius: 12px 12px 0 0;
    }
}

/* ============================================================
   灯箱 (Lightbox)
   ============================================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: lightboxFadeIn 0.3s ease;
    cursor: zoom-out;
}
.lightbox-overlay.active {
    display: flex;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.85);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    border: 3px solid rgba(255, 255, 255, 0.2);
}
.lightbox-overlay.active img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
}

/* ============================================================
   滚动入场动画 (.fade-in-up)
   ============================================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   响应式优化
   ============================================================ */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .content-card { margin-bottom: 12px; }
    .hero-section {
        padding-top: 100px !important;
        padding-bottom: 40px !important;
    }
}
