/* ==================== 主题配置 ==================== */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --accent: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --card-opacity: 1;
}

[data-theme="warm"] {
    --primary: #f97316;
    --primary-light: #fb923c;
    --primary-dark: #ea580c;
    --accent: #10b981;
}

[data-theme="forest"] {
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-dark: #059669;
    --accent: #f59e0b;
}

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* 噪点背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* 背景图片 */
.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.6;
    transition: opacity 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.bg-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e1b4b 100%);
    z-index: -2;
}

/* ==================== 主布局 ==================== */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.app-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ICP备案 */
.icp-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 12px 32px;
    text-align: center;
    z-index: 1;
}

.icp-text {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.icp-text a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.icp-text a:hover {
    color: var(--primary);
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    padding: 24px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    color: var(--text-secondary);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.nav-item .iconify {
    font-size: 22px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.sort-section {
    margin-bottom: 20px;
}

.sort-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.sort-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.sort-select:focus {
    border-color: var(--primary);
}

.sort-select option {
    background: #1e293b;
    color: white;
}

/* 分组筛选 */
.group-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.group-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    color: var(--text-secondary);
    font-size: 14px;
}

.group-filter:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(4px);
}

.group-filter.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.group-filter .iconify {
    font-size: 18px;
}

/* 搜索框 */
.search-container {
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 20px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box .iconify {
    font-size: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* 表单行 */
.form-row {
    display: flex;
    gap: 16px;
}

.form-group-half {
    flex: 1;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn .form-input {
    flex: 1;
}

.input-with-btn .btn {
    flex-shrink: 0;
    padding: 12px 16px;
}

/* 倒计时标签 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 11px;
    color: var(--primary-light);
}

/* 锁定图标 */
.lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    font-size: 11px;
    color: #fbbf24;
}

/* 分组徽章 */
.group-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    margin-bottom: 8px;
}

.group-badge.work {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.group-badge.life {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

.group-badge.holiday {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.group-badge.study {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* 重复徽章 */
.repeat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 100px;
    font-size: 11px;
    color: #a78bfa;
    margin-left: 8px;
}

/* 模板选择器 */
.template-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200000;
    padding: 20px;
}

.template-selector.active {
    display: flex;
}

.template-container {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 520px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.template-selector.active .template-container {
    transform: scale(1);
    opacity: 1;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.template-header h3 {
    font-size: 22px;
    font-weight: 700;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.template-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.template-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.template-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.template-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.credits {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

/* 视图切换 */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* 选择框样式 */
.select-input,
select.form-input {
    padding: 12px 40px 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    min-width: 150px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

.select-input:hover,
select.form-input:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.select-input:focus,
select.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.select-input option,
select.form-input option {
    background: #1e293b;
    color: white;
    padding: 12px;
    border-radius: 8px;
}

.select-input option:hover,
select.form-input option:hover {
    background: var(--primary);
}

/* ==================== 设置面板 ==================== */
.settings-container {
    max-width: 750px;
    position: relative;
    z-index: 1;
}

.settings-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--glass-border);
    margin-bottom: 24px;
    animation: slideInUp 0.5s ease;
    position: relative;
    z-index: 1;
}

/* 简单的 select 样式 */
select.form-input,
select.select-input {
    padding: 12px 40px 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(30, 41, 59, 0.85);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    position: relative;
    z-index: 2147483647;
}

select.form-input:hover,
select.select-input:hover {
    background: rgba(30, 41, 59, 0.95);
}

select.form-input:focus,
select.select-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

select.form-input option,
select.select-input option {
    background: #1e293b;
    color: white;
    padding: 12px;
}

/* 瀑布流网格 */
.countdown-grid {
    column-count: 3;
    column-gap: 24px;
}

/* 默认卡片样式 */
.countdown-card {
    break-inside: avoid;
    margin-bottom: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    opacity: var(--card-opacity);
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.countdown-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 现代简约样式 */
.countdown-card.style-modern {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: none;
}

.countdown-card.style-modern::before {
    display: none;
}

.countdown-card.style-modern .time-unit {
    background: transparent;
    border: none;
    padding: 8px;
}

.countdown-card.style-modern .time-number {
    font-size: 36px;
    font-weight: 300;
}

.countdown-card.style-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 霓虹效果样式 */
.countdown-card.style-neon {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.1);
}

.countdown-card.style-neon::before {
    display: none;
}

.countdown-card.style-neon .time-unit {
    box-shadow: 0 0 15px var(--primary);
    border: 1px solid var(--primary);
}

.countdown-card.style-neon:hover {
    box-shadow: 0 0 40px var(--primary), inset 0 0 30px rgba(59, 130, 246, 0.2);
    transform: translateY(-6px);
}

/* 复古风格样式 */
.countdown-card.style-retro {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 3px solid var(--primary);
    border-radius: 0;
}

.countdown-card.style-retro::before {
    display: none;
}

.countdown-card.style-retro .time-unit {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary);
    border-radius: 0;
    font-family: 'Courier New', monospace;
}

.countdown-card.style-retro .time-number {
    font-family: 'Courier New', monospace;
    font-weight: 400;
}

.countdown-card.style-retro:hover {
    transform: translateY(-6px);
    box-shadow: 8px 8px 0 var(--primary);
}

/* 数字动画 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes flip {
    0% { transform: perspective(400px) rotateY(0deg); }
    50% { transform: perspective(400px) rotateY(90deg); }
    100% { transform: perspective(400px) rotateY(0deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.anim-bounce {
    animation: bounce 0.4s ease;
}

.anim-flip {
    animation: flip 0.4s ease;
}

.anim-fade {
    animation: fadeIn 0.3s ease;
}

.anim-scale {
    animation: scale 0.3s ease;
}

/* 悬停动画 */
.countdown-card.hover-float:hover {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(-6px); }
    50% { transform: translateY(-12px); }
}

.countdown-card.hover-glow:hover {
    box-shadow: 0 0 30px var(--primary), 0 20px 40px rgba(0, 0, 0, 0.3);
}

.countdown-card.hover-rotate:hover {
    transform: translateY(-6px) rotate(1deg);
}

.countdown-card.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: scale(1.1);
}

.action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.action-btn.pip:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.action-btn.fullscreen:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.card-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.time-unit {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 16px 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.time-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.time-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-container {
    margin-top: 16px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: right;
}

/* 纪念模式 */
.countdown-card.past {
    border-color: rgba(239, 68, 68, 0.3);
}

.countdown-card.past::before {
    background: linear-gradient(90deg, #ef4444, #f59e0b);
}

.past-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 100px;
    font-size: 12px;
    color: #fca5a5;
    margin-bottom: 16px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon .iconify {
    font-size: 56px;
    color: var(--primary-light);
}

.empty-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 浮动添加按钮 */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.5);
}

.fab .iconify {
    font-size: 28px;
}

/* ==================== 设置面板 - 选项卡 ==================== */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 16px;
    flex-wrap: wrap;
}

.settings-tab {
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.settings-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.settings-tab:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.settings-tab.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.settings-tab.active::before {
    opacity: 0;
}

.settings-tab .iconify {
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.settings-tab span {
    position: relative;
    z-index: 1;
}

/* 设置内容区域 */
.settings-content {
    animation: fadeInContent 0.4s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-section:nth-child(2) {
    animation-delay: 0.1s;
}

.settings-section:nth-child(3) {
    animation-delay: 0.2s;
}

.settings-section:nth-child(4) {
    animation-delay: 0.3s;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .iconify {
    color: var(--primary);
    animation: bounceIcon 2s ease infinite;
}

@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 二级分组标题 */
.sub-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-section-title:first-child {
    margin-top: 0;
}

/* 可折叠区域 */
.collapsible-section {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
    user-select: none;
}

.collapsible-header:hover .sub-section-title {
    color: var(--primary-light);
}

.collapsible-icon {
    transition: transform 0.3s ease;
}

.collapsible-section.collapsed .collapsible-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0 !important;
    opacity: 0;
}

/* 设置项悬停效果 */
.setting-item {
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 8px 4px;
    margin: 4px -4px;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

/* 主题选择 */
.theme-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.theme-option {
    flex: 1;
    min-width: 140px;
    padding: 18px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.theme-preview {
    height: 36px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.theme-preview.blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.theme-preview.warm {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.theme-preview.forest {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.theme-name {
    font-size: 14px;
    font-weight: 500;
}

/* 设置项 */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 14px;
}

.setting-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 开关 */
.toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toggle.active::after {
    left: 27px;
}

/* 滑块 */
.slider-container {
    flex: 1;
    margin-left: 20px;
    max-width: 180px;
}

.slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.slider-value {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 12px;
    min-width: 40px;
    text-align: right;
}

/* 按钮 */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 480px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* 颜色选择 */
.color-options {
    display: flex;
    gap: 12px;
}

.color-option {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: white;
}

.color-option.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.modal-footer .btn {
    flex: 1;
    justify-content: center;
}

/* ==================== 画中画窗口样式 ==================== */
.pip-container {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.pip-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    color: white;
}

.pip-time {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.pip-unit {
    background: rgba(255, 255, 255, 0.12);
    padding: 14px 10px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
}

.pip-number {
    font-size: 24px;
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
}

.pip-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.pip-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    overflow: hidden;
}

.pip-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #f59e0b);
    border-radius: 100px;
    transition: width 0.5s ease;
}

/* ==================== 全屏模式 ==================== */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500000;
}

.fullscreen-mode.active {
    display: flex;
}

.fullscreen-content {
    text-align: center;
    padding: 40px;
}

.fullscreen-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

.fullscreen-time {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.fullscreen-unit {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 24px;
    border-radius: 20px;
    min-width: 120px;
}

.fullscreen-number {
    font-size: 56px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.fullscreen-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
}

.fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .countdown-grid {
        column-count: 2;
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .app-main {
        flex-direction: column;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        padding: 12px 16px;
        gap: 16px;
        overflow-y: visible;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }

    .logo {
        padding: 4px 0;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        gap: 6px;
    }

    .nav-item {
        padding: 10px 12px;
    }

    .nav-item span {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .mobile-filters {
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
        padding: 12px;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        border: 1px solid var(--glass-border);
    }

    .mobile-filters .group-filter {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 100px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        color: var(--text-secondary);
        background: rgba(255, 255, 255, 0.05);
    }

    .mobile-filters .group-filter:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--text-primary);
    }

    .mobile-filters .group-filter.active {
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: white;
    }

    .mobile-filters .sort-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
        border-radius: 100px;
        margin-left: auto;
    }

    .countdown-grid {
        column-count: 2;
    }

    .main-content {
        padding: 20px 16px;
        flex: 1;
        overflow-y: auto;
    }

    .page-title {
        font-size: 24px;
    }

    .countdown-card {
        padding: 20px;
    }

    .time-number {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .app-main {
        flex-direction: column;
    }

    .sidebar {
        padding: 10px 12px;
        gap: 10px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .logo-icon .iconify {
        font-size: 20px;
    }

    .nav-item {
        padding: 8px 10px;
        border-radius: 10px;
    }

    .nav-item .iconify {
        font-size: 18px;
    }

    .main-content {
        padding: 16px 12px;
    }

    .countdown-grid {
        column-count: 1;
        column-gap: 16px;
    }

    .fab {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .page-title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .page-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .search-box {
        padding: 12px 16px;
    }

    .countdown-card {
        padding: 18px;
        margin-bottom: 16px;
    }

    .card-title {
        font-size: 16px;
    }

    .time-display {
        gap: 8px;
    }

    .time-unit {
        padding: 12px 6px;
        border-radius: 12px;
    }

    .time-number {
        font-size: 22px;
    }

    .time-label {
        font-size: 10px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
    }

    .settings-container {
        max-width: 100%;
    }

    .settings-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 16px;
    }

    .settings-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding: 4px;
        margin-bottom: 16px;
    }

    .settings-tab {
        padding: 8px 12px;
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 13px;
        border-radius: 10px;
    }

    .settings-tab .iconify {
        font-size: 16px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .setting-label {
        font-size: 14px;
    }

    .setting-desc {
        font-size: 12px;
    }

    .toggle {
        width: 48px;
        height: 26px;
    }

    .toggle::after {
        width: 20px;
        height: 20px;
    }

    .toggle.active::after {
        left: 26px;
    }

    .modal {
        padding: 20px;
        max-width: 95%;
    }

    .modal-title {
        font-size: 20px;
    }

    .form-input,
    select.form-input,
    select.select-input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .form-group-half {
        flex: 1;
        width: 100%;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .btn-group {
        flex-direction: column;
        gap: 8px;
    }

    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }

    .icp-footer {
        padding: 12px 16px;
    }

    .icp-text {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .countdown-card {
        padding: 16px;
    }

    .time-number {
        font-size: 20px;
    }

    .time-label {
        font-size: 9px;
    }
}

/* ==================== 滚动文字效果 ==================== */
.scroll-container {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.scroll-text {
    display: inline-block;
    white-space: nowrap;
    animation: scrollText 15s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.quote-container {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.quote-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-align: center;
}

.quote-author {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-align: right;
}

/* ==================== 粒子效果 ==================== */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}
.flatpickr-calendar {
    z-index: 100001 !important;
}