/* === 核心变量 === */
:root {
    --bg-primary: #F3F4F6;
    --bg-surface: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.8);
    --input-bg: #F9FAFB;
    --dock-bg: rgba(255, 255, 255, 0.95);
}

html.dark {
    --bg-primary: #050505;
    --bg-surface: #121212;
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.06);
    --input-bg: #0A0A0A;
    --dock-bg: rgba(18, 18, 18, 0.8);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    user-select: none;
    background-image: radial-gradient(rgba(120, 120, 120, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* === 慢动作礼花粒子 === */
.confetti-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    pointer-events: none;
    z-index: 9999;
    animation: confetti-fall var(--duration) cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes confetti-fall {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) rotate(720deg) scale(0.5); opacity: 0; }
}

/* 玻璃拟态 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-modal {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
}
html:not(.dark) .glass-modal {
    background: rgba(255, 255, 255, 0.9);
}

.glass-input {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.glass-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.glass-dock {
    background: var(--dock-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
}

.hide-scrollbar::-webkit-scrollbar { display: none; }
.btn-press { cursor: pointer; transition: transform 0.1s; }
.btn-press:active { transform: scale(0.95); }
.tap-highlight { -webkit-tap-highlight-color: transparent; }

.theme-icon-enter-active, .theme-icon-leave-active { transition: all 0.3s ease; }
.theme-icon-enter-from { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-icon-leave-to { opacity: 0; transform: rotate(90deg) scale(0.5); }

.lang-enter-active, .lang-leave-active { transition: all 0.2s ease; }
.lang-enter-from, .lang-leave-to { opacity: 0; transform: scale(0.8); }

/* Popup Animation */
.pop-enter-active, .pop-leave-active { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.pop-enter-from, .pop-leave-to { opacity: 0; transform: scale(0.9) translateY(10px); }

/* PC 端适配额外样式 */
@media (min-width: 1024px) {
    .pc-sidebar {
        width: 260px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        border-right: 1px solid var(--border-color);
        background: var(--bg-surface);
        z-index: 50;
    }
    .pc-content {
        margin-left: 260px;
        max-width: 1200px;
        margin-right: auto;
        padding: 2rem;
    }
}

/* Vue Transitions */
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.page-enter-active, .page-leave-active { transition: opacity 0.3s ease, transform 0.3s ease; }
.page-enter-from { opacity: 0; transform: translateY(10px); }
.page-leave-to { opacity: 0; transform: translateY(-10px); }

.list-enter-active, .list-leave-active { transition: all 0.5s ease; }
.list-enter-from, .list-leave-to { opacity: 0; transform: translateX(30px); }

[v-cloak] { display: none; }
