/* ========================================
   2025专业播放器风格 - 参考Spotify/Calm设计
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* 深色主题配色 */
    --bg-primary: #0a0e27;
    --bg-secondary: #151932;
    --bg-card: #1a1f3a;
    --accent-blue: #4f46e5;
    --accent-purple: #7c3aed;
    --accent-cyan: #06b6d4;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   容器和布局
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 120px;
}

/* ========================================
   顶部导航栏（类似Spotify）
   ======================================== */
.header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 5px;
}

/* ========================================
   睡眠状态卡片（紧凑设计）
   ======================================== */
.sleep-timer-display {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.timer-info {
    flex: 1;
}

.timer-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.big-timer {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.sleep-controls {
    display: flex;
    gap: 12px;
}

.sleep-btn {
    padding: 14px 24px;
    border-radius: 50px;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sleep-btn.start-sleep {
    background: var(--accent-blue);
    color: white;
}

.sleep-btn.end-sleep {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sleep-btn.fullscreen-mode {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.sleep-btn:hover {
    transform: scale(1.05);
}

.sleep-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   声音网格（大卡片设计 - 类似Spotify专辑）
   ======================================== */
.sounds-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ========================================
   声音卡片（专业播放器风格）
   ======================================== */
.sound-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.sound-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* 声音封面图（顶部大图）*/
.sound-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 为每个声音定制渐变 */
.sound-card[data-sound="rain"] .sound-cover {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.sound-card[data-sound="ocean"] .sound-cover {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.sound-card[data-sound="forest"] .sound-cover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.sound-card[data-sound="wind"] .sound-cover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.sound-card[data-sound="fire"] .sound-cover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.sound-card[data-sound="thunder"] .sound-cover {
    background: linear-gradient(135deg, #6b7280 0%, #374151 100%);
}

.sound-card[data-sound="whitenoise"] .sound-cover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.sound-card[data-sound="pinknoise"] .sound-cover {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
}

.sound-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* 播放状态指示器 */
.sound-cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: white;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.sound-card.playing .sound-cover::after {
    transform: scaleX(1);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0%, 100% { transform: scaleX(0.3); }
    50% { transform: scaleX(0.7); }
}

/* 卡片内容区 */
.sound-content {
    padding: 20px;
}

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

.sound-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.sound-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 播放按钮（圆形大按钮）*/
.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.4);
}

.sound-card.playing .play-btn {
    background: white;
    color: var(--accent-blue);
}

/* 音量控制 */
.volume-control {
    margin-top: 16px;
}

.volume-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
}

/* ========================================
   记录面板（紧凑列表设计）
   ======================================== */
.sleep-records {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
}

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

.records-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.clear-records {
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-records:hover {
    background: rgba(255, 59, 48, 0.1);
    border-color: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.record-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.record-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.record-main {
    flex: 1;
}

.record-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.record-duration {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.delete-record {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-record:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

/* ========================================
   全局控制（底部固定栏）
   ======================================== */
.global-controls {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.timer-section {
    flex: 1;
}

.timer-section h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timer-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-btn {
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.timer-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.timer-btn.cancel-timer {
    border-color: rgba(255, 59, 48, 0.3);
    color: #ff3b30;
}

.timer-status {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.global-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

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

/* ========================================
   移动端底部导航栏（类似Spotify）
   ======================================== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
}

.mobile-action {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.mobile-action .icon {
    font-size: 1.4rem;
}

.mobile-action .label {
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-action.active {
    color: var(--accent-blue);
}

/* ========================================
   全屏播放模式
   ======================================== */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0a0e27 0%, #151932 100%);
    z-index: 2000;
}

.fullscreen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    text-align: center;
    padding: 40px;
    max-width: 600px;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 60px;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8), rgba(139, 92, 246, 0.4));
    box-shadow: 0 0 80px rgba(59, 130, 246, 0.6);
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.meditation-text {
    margin-bottom: 40px;
}

.breath-instruction {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.relax-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-timer {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 30px 0;
}

.quick-volume {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 20px;
}

.quick-volume span {
    font-size: 1rem;
    font-weight: 500;
}

.quick-volume input[type="range"] {
    width: 300px;
}

/* ========================================
   预设混音组件
   ======================================== */
.presets-section {
    margin-bottom: 40px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.preset-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.preset-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
}

.preset-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.preset-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.preset-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.preset-btn {
    width: 100%;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* ========================================
   分类过滤组件
   ======================================== */
.sound-categories {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.category-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .sounds-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机端适配（768px以下）- 重新优化版 */
@media (max-width: 768px) {
    /* 显示底部导航栏 */
    .mobile-bottom-bar {
        display: flex;
    }
    
    /* 容器适配 - 更紧凑 */
    .container {
        padding: 12px 12px 85px;
        max-width: 100%;
    }
    
    /* 标题适配 - 简化 */
    .header {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
    
    .subtitle {
        font-size: 0.85rem;
        opacity: 0.8;
    }
    
    /* 睡眠计时器适配 - 更紧凑 */
    .sleep-timer-display {
        flex-direction: row;
        align-items: center;
        padding: 16px;
        gap: 16px;
        border-radius: 20px;
    }
    
    .timer-info {
        flex: 1;
        min-width: 0;
    }
    
    .timer-info h3 {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .big-timer {
        font-size: 2rem;
    }
    
    .sleep-status {
        font-size: 0.75rem;
        margin-top: 4px;
    }
    
    .sleep-controls {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .sleep-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
        border-radius: 12px;
    }
    
    /* 睡眠记录适配 - 隐藏或折叠 */
    .sleep-records {
        padding: 16px;
        border-radius: 20px;
        margin-bottom: 20px;
    }
    
    .records-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .records-header h3 {
        font-size: 1.1rem;
    }
    
    .clear-records {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .record-item {
        padding: 12px;
        margin-bottom: 8px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .record-date {
        font-size: 0.8rem;
    }
    
    .record-duration {
        font-size: 1rem;
    }
    
    .delete-record {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* 分区标题适配 - 紧凑 */
    .section-header {
        margin-bottom: 16px;
    }
    
    .section-header h2 {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
    }
    
    /* 预设混音卡片 */
    .presets-section {
        margin-bottom: 24px;
    }
    
    .presets-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .preset-card {
        background: var(--bg-card);
        border-radius: 16px;
        padding: 16px;
        text-align: center;
        transition: all 0.2s;
    }
    
    .preset-card:active {
        transform: scale(0.95);
    }
    
    .preset-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .preset-card h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
        color: var(--text-primary);
    }
    
    .preset-card p {
        font-size: 0.7rem;
        color: var(--text-secondary);
        margin-bottom: 12px;
    }
    
    .preset-btn {
        width: 100%;
        padding: 8px;
        border-radius: 12px;
        border: none;
        background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
        color: white;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
    }
    
    /* 分类按钮 */
    .sound-categories {
        display: flex;
        gap: 6px;
        margin-bottom: 16px;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .sound-categories::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-btn {
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.05);
        color: var(--text-secondary);
        font-size: 0.85rem;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .category-btn.active {
        background: var(--accent-blue);
        color: white;
        border-color: var(--accent-blue);
    }
    
    /* 声音卡片适配 - 紧凑卡片 */
    .sounds-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .sound-cover {
        height: 120px;
    }
    
    .sound-icon {
        font-size: 2.5rem;
    }
    
    .sound-content {
        padding: 12px;
    }
    
    .sound-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .sound-info h3 {
        font-size: 1rem;
        text-align: center;
    }
    
    .sound-info p {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .play-btn {
        width: 100%;
        height: 44px;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .volume-control {
        margin-top: 12px;
    }
    
    .volume-label {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    /* 全局控制适配 */
    .global-controls {
        flex-direction: column;
        padding: 20px;
        gap: 24px;
    }
    
    .timer-buttons {
        gap: 6px;
    }
    
    .timer-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .global-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    /* 全屏模式适配 */
    .modal-content {
        padding: 24px 20px;
    }
    
    .modal-title {
        font-size: 2rem;
    }
    
    .modal-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .breathing-circle {
        width: 160px;
        height: 160px;
        margin-bottom: 40px;
    }
    
    .breath-instruction {
        font-size: 1.3rem;
    }
    
    .relax-message {
        font-size: 1rem;
    }
    
    .modal-timer {
        font-size: 2rem;
        margin: 24px 0;
    }
    
    .quick-volume {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .quick-volume input[type="range"] {
        width: 100%;
        max-width: 280px;
    }
    
    .close-modal {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
}

/* 小屏手机优化（480px以下）*/
@media (max-width: 480px) {
    .container {
        padding: 12px 12px 90px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .sleep-timer-display {
        padding: 20px;
    }
    
    .big-timer {
        font-size: 2.2rem;
    }
    
    .sleep-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .sound-cover {
        height: 160px;
    }
    
    .sound-icon {
        font-size: 3rem;
    }
    
    .sound-content {
        padding: 14px;
    }
    
    .play-btn {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }
    
    .timer-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .breathing-circle {
        width: 140px;
        height: 140px;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
    
    .breath-instruction {
        font-size: 1.2rem;
    }
    
    .modal-timer {
        font-size: 1.75rem;
    }
}

/* 横屏模式优化 */
@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding: 12px 20px 90px;
    }
    
    .sleep-timer-display {
        flex-direction: row;
        padding: 20px 24px;
    }
    
    .sleep-controls {
        flex-direction: row;
        width: auto;
    }
    
    .sleep-btn {
        width: auto;
        padding: 12px 20px;
    }
    
    .sounds-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .sound-cover {
        height: 140px;
    }
    
    .global-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .timer-section {
        flex: 1;
        min-width: 300px;
    }
    
    .breathing-circle {
        width: 120px;
        height: 120px;
    }
    
    .modal-timer {
        font-size: 1.75rem;
        margin: 20px 0;
    }
}

/* 触控友好增强 */
@media (hover: none) and (pointer: coarse) {
    /* 增加所有可点击元素的最小点击区域 */
    .play-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .sleep-btn {
        min-height: 50px;
    }
    
    .timer-btn {
        min-height: 44px;
    }
    
    .action-btn {
        min-height: 48px;
    }
    
    .mobile-action {
        min-height: 56px;
    }
    
    /* 触控时防止文字选中 */
    .sound-card,
    .sleep-btn,
    .play-btn,
    .timer-btn,
    .action-btn {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   其他元素
   ======================================== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer .author {
    margin-top: 8px;
    font-size: 0.8rem;
}

.no-records {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 1.1rem;
}

.sleep-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

.timer-card h3 {
    color: var(--text-primary);
}
