/* ========== 全局样式重置和基础设置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主要颜色变量 */
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    /* 背景颜色 */
    --bg-overlay: rgba(0, 0, 0, 0.3);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-panel: rgba(15, 23, 42, 0.9);
    
    /* 字体 */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Poppins', sans-serif;
    
    /* 阴影和边框 */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(255, 107, 107, 0.3);
    --border-radius: 16px;
    --border-radius-small: 8px;
    
    /* 动画时长 */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: var(--font-primary);
    background: #1a1a2e;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== 主容器和背景 ========== */
.app-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1542051841857-5f90071e7989?q=80&w=2340&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.6) contrast(1.2) saturate(1.1);
    transition: all 1s ease-in-out;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(15, 23, 42, 0.3) 30%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(0, 0, 0, 0.5) 100%
    );
    backdrop-filter: blur(1px);
}

.background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

/* ========== 主要内容区域 ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    justify-content: center;
}

/* ========== 顶部导航 ========== */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 70%,
        transparent 100%
    );
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.5px;
}

.nav-controls {
    display: flex;
    gap: 15px;
}

.nav-btn {
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 22px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ========== 计时器主体 ========== */
.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: 100px;
}

/* 模式选择器 */
.timer-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.mode-btn {
    padding: 16px 28px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 15px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #ff5252);
    color: white;
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.mode-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* 计时器显示 */
.timer-display {
    margin-bottom: 50px;
    position: relative;
}

.timer-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.timer-svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 30px rgba(255, 107, 107, 0.5));
    width: 320px;
    height: 320px;
}

.timer-bg-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 10;
}

.timer-progress-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 879.64; /* 2 * π * 140 */
    stroke-dashoffset: 879.64;
    transition: stroke-dashoffset var(--transition-fast);
    filter: drop-shadow(0 0 20px var(--primary-color));
}

.timer-text {
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.time-display {
    font-family: var(--font-display);
    font-size: 64px;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.timer-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 控制按钮 */
.timer-controls {
    display: flex;
    gap: 25px;
    margin-bottom: 60px;
}

.control-btn {
    padding: 20px 40px;
    border: none;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
    min-width: 140px;
    backdrop-filter: blur(15px);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.control-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #ff5252);
    color: white;
    box-shadow: 
        0 15px 35px rgba(255, 107, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.control-btn.primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(255, 107, 107, 0.5);
}

.control-btn.primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.control-btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.control-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== 任务部分 ========== */
.task-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 35px;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.task-section h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.task-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#taskInput {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-smooth);
}

#taskInput:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

#taskInput::placeholder {
    color: var(--text-muted);
}

#addTaskBtn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--primary-color);
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

#addTaskBtn:hover {
    background: #ff5252;
    transform: scale(1.05);
}

.task-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-smooth);
}

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

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.task-checkbox.completed {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.task-checkbox.completed::after {
    content: '✓';
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.task-text {
    flex: 1;
    color: var(--text-primary);
    transition: all var(--transition-smooth);
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-delete {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    font-size: 16px;
}

.task-delete:hover {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
}

/* ========== 统计信息 ========== */
.stats-container {
    display: flex;
    gap: 25px;
    width: 100%;
    max-width: 650px;
    justify-content: center;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 130px;
    transition: all var(--transition-smooth);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0.7;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(255, 107, 107, 0.3);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========== 面板样式 ========== */
.settings-panel,
.background-panel,
.music-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right var(--transition-smooth);
    z-index: 1000;
    overflow-y: auto;
}

.settings-panel.active,
.background-panel.active,
.music-panel.active {
    right: 0;
}

.panel-content {
    padding: 40px 30px;
}

.panel-content h3 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* 设置组 */
.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.setting-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.setting-group span {
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 10px;
}

/* 背景网格 */
.background-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.background-option {
    aspect-ratio: 16/9;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-smooth);
    position: relative;
}

.background-option.active {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.background-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.background-option:hover img {
    transform: scale(1.05);
}

.background-option span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 12px 8px 8px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* 音乐控制 */
.music-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.music-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 播放列表 */
.playlist {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
    overflow: hidden;
    margin-bottom: 30px;
}

.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

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

.playlist-item.active {
    background: var(--primary-color);
}

.playlist-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.duration {
    color: var(--text-muted);
    font-size: 14px;
}

/* 关闭按钮 */
.close-panel-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.close-panel-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* ========== 完成模态框 ========== */
.completion-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn var(--transition-smooth);
}

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

.modal-content {
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp var(--transition-smooth);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.modal-stat {
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

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

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.modal-btn.primary {
    background: var(--primary-color);
    color: white;
}

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

.modal-btn:hover {
    transform: translateY(-2px);
}

/* ========== 动画效果 ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes breathe {
    0%, 100% { 
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 0 35px 70px rgba(0, 0, 0, 0.35),
                    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.float {
    animation: float 6s ease-in-out infinite;
}

.timer-container {
    animation: breathe 4s ease-in-out infinite;
}

/* 背景粒子效果 */
.background-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.1), transparent);
    background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
    animation: float 20s linear infinite;
    pointer-events: none;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .top-nav {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 26px;
    }
    
    .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .timer-container {
        margin-top: 80px;
        padding: 30px 25px;
        max-width: 90%;
    }
    
    .timer-mode-selector {
        gap: 6px;
        padding: 6px;
    }
    
    .mode-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .time-display {
        font-size: 48px;
    }
    
    .timer-svg {
        width: 280px;
        height: 280px;
    }
    
    .control-btn {
        padding: 16px 28px;
        font-size: 16px;
        min-width: 120px;
    }
    
    .stats-container {
        gap: 15px;
        flex-wrap: wrap;
        max-width: 100%;
    }
    
    .stat-item {
        min-width: 110px;
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .settings-panel,
    .background-panel,
    .music-panel {
        width: 100%;
        right: -100%;
    }
    
    .panel-content {
        padding: 25px 20px;
    }
    
    .background-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }
    
    .timer-container {
        max-width: 100%;
    }
    
    .timer-controls {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .control-btn {
        width: 100%;
    }
    
    .task-section {
        padding: 20px;
    }
    
    .task-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    #addTaskBtn {
        width: 100%;
        height: 45px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff5252;
}

/* ========== 提示和焦点状态 ========== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
    z-index: 1001;
}

.tooltip:hover::after {
    opacity: 1;
}

/* 聚焦状态的可访问性 */
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========== 打印样式 ========== */
@media print {
    .nav-controls,
    .settings-panel,
    .background-panel,
    .music-panel,
    .completion-modal {
        display: none !important;
    }
    
    .background-container {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}