/* 重置样式和性能优化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 性能优化：启用硬件加速和优化渲染 */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 优化滚动性能 */
body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 优化动画性能：启用GPU加速 */
.performance-optimized {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 优化图片加载 */
img {
    content-visibility: auto;
    will-change: transform;
}

/* 剩余课程框架样式 */
.remaining-days-frame {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: relative;
    /* 移除overflow: hidden，确保所有内容都能显示 */
}

/* 在小屏幕上调整内边距 */
@media (max-width: 600px) {
    .remaining-days-frame {
        padding: 20px;
        border-radius: 20px;
    }
    
    .frame-header h3 {
        font-size: 24px;
    }
    
    .frame-header p {
        font-size: 16px;
    }
}

.remaining-days-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ff6b6b);
}

.frame-header {
    text-align: center;
    margin-bottom: 30px;
}

.frame-header h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.frame-header p {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.courses-preview {
    display: block;
    margin-bottom: 30px;
}


.course-preview-item {
    display: block;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.2s ease;
}

.course-preview-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.frame-footer {
    text-align: center;
}

.btn-purchase-all {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    color: white;
    border: none;
    padding: 18px 48px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.btn-purchase-all:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.4);
}

.btn-purchase-all:active {
    transform: translateY(-2px) scale(1.01);
}

.frame-note {
    font-size: 14px;
    color: var(--text-tertiary);
    font-style: italic;
    max-width: 400px;
    margin: 0 auto;
}

:root {
    --primary-color: #4a90e2;
    --primary-dark: #2c5aa0;
    --primary-light: #6bb6ff;
    --accent-color: #018EBA;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    
    --background-dark: #ffffff;
    --background-light: #fafbfc;
    --background-gradient: linear-gradient(135deg, #f8fbff 0%, #e8f4fd 30%, #ffffff 100%);
    
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --text-tertiary: #7f8c8d;
    --text-on-primary: #ffffff;
    
    --card-background: #ffffff;
    --card-background-hover: rgba(255, 255, 255, 0.95);
    --border-color: #e8f4fd;
    --border-light: rgba(74, 144, 226, 0.1);
    --border-medium: rgba(74, 144, 226, 0.2);
    
    --nav-height: 74px;
    --header-height: 64px;
    --blur-strength: 20px;
    
    --shadow-light: 0 2px 8px rgba(74, 144, 226, 0.06);
    --shadow-medium: 0 4px 16px rgba(74, 144, 226, 0.12);
    --shadow-heavy: 0 8px 32px rgba(74, 144, 226, 0.15);
    --shadow-float: 0 12px 40px rgba(74, 144, 226, 0.2);
    
    /* 性能优化：减少动画时长和优化过渡效果 */
    --transition-smooth: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    --transition-spring: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-bounce: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-2xl: 24px;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
}

/* 响应式布局调整 */
@media (max-width: 1200px) {
    .app {
        max-width: 800px;
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
        --spacing-3xl: 28px;
        --spacing-2xl: 20px;
        --border-radius-2xl: 20px;
    }
    
    .app {
        max-width: 100%;
        padding: var(--spacing-md);
    }
    
    .header {
        padding: var(--spacing-md) var(--spacing-lg);
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .app-title {
        font-size: 1.6rem;
    }
    
    .module {
        padding: var(--spacing-2xl);
        border-radius: var(--border-radius-xl);
    }
    
    .meditation-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .video-container {
        height: 200px;
    }
    
    .time-buttons, .sound-buttons {
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .time-btn, .sound-btn {
        min-width: auto;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.85rem;
    }
    
    .sound-btn {
        min-width: 100px;
    }
    
    .breathing-content {
        max-width: 100%;
    }
    
    .breathing-circle {
        width: 180px;
        height: 180px;
    }
    
    .breathing-stats {
        grid-template-columns: repeat(2, 1fr);
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    :root {
        --nav-height: 66px;
        --spacing-3xl: 24px;
        --spacing-2xl: 18px;
        --border-radius-xl: 16px;
    }
    
    .app {
        padding: var(--spacing-sm);
    }
    
    .header {
        padding: var(--spacing-sm) var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .app-title {
        font-size: 1.4rem;
    }
    
    .module {
        padding: var(--spacing-xl);
        border-radius: var(--border-radius-lg);
    }
    
    .module-header h2 {
        font-size: 1.4rem;
    }
    
    .video-container {
        height: 160px;
    }
    
    .time-buttons, .sound-buttons {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .time-btn, .sound-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }
    
    .sound-btn {
        min-width: 80px;
        padding: var(--spacing-md);
    }
    
    .sound-btn img {
        width: 40px;
        height: 40px;
    }
    
    .breathing-circle {
        width: 150px;
        height: 150px;
    }
    
    .breathing-stats {
        grid-template-columns: 1fr;
        max-width: 200px;
        gap: var(--spacing-sm);
    }
    
    .breathing-stat {
        min-width: auto;
        height: 50px;
    }
    
    .breathing-stat .stat-label {
        font-size: 0.8rem;
    }
    
    .breathing-stat .stat-value {
        font-size: 1rem;
    }
}

@media (max-width: 390px) {
    :root {
        --nav-height: 62px;
        --spacing-3xl: 20px;
        --spacing-2xl: 16px;
    }
    
    .app {
        padding: var(--spacing-xs);
    }
    
    .header {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .app-title {
        font-size: 1.3rem;
    }
    
    .module {
        padding: var(--spacing-lg);
        border-radius: var(--border-radius-md);
    }
    
    .module-header h2 {
        font-size: 1.3rem;
    }
    
    .module-header p {
        font-size: 0.85rem;
    }
    
    .video-container {
        height: 140px;
    }
    
    .time-selection h3, .sound-selection h3 {
        font-size: 1rem;
    }
    
    .time-btn, .sound-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .sound-btn {
        min-width: 70px;
        padding: var(--spacing-sm);
    }
    
    .sound-btn img {
        width: 35px;
        height: 35px;
    }
    
    .breathing-circle {
        width: 130px;
        height: 130px;
    }
    
    .breathing-text {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-gradient);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(74, 144, 226, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(74, 144, 226, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
}

/* 添加页面入场动画 */
.app {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    animation: pageEnter 0.8s ease-out;
}

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

/* 添加滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(74, 144, 226, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.3), rgba(74, 144, 226, 0.5));
    border-radius: 3px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.5), rgba(74, 144, 226, 0.7));
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-lg) var(--spacing-2xl);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(var(--blur-strength));
    border-radius: var(--border-radius-xl);
    box-shadow: 
        0 4px 32px rgba(74, 144, 226, 0.08),
        0 2px 12px rgba(74, 144, 226, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    position: relative;
    animation: headerFloat 6s ease-in-out infinite;
    transition: var(--transition-smooth);
}

.header:hover {
    box-shadow: 
        0 8px 40px rgba(74, 144, 226, 0.12),
        0 4px 16px rgba(74, 144, 226, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-1px);
}

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

.app-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c5aa0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.app-title::before {
    content: '🧘‍♂️';
    font-size: 1.5rem;
    opacity: 0.8;
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        opacity: 0.8;
        filter: none;
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.3));
    }
}

/* 睡眠BGM专用动画 */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
    }
}

/* 暂停倒计时提示样式 */
.pause-tooltip {
    animation: fadeInOut 2s ease-in-out;
}

/* 播放指示器样式 */
.playing-indicator {
    animation: pulseGlow 2s infinite;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #5a6c7d;
    font-size: 0.85rem;
    font-weight: 500;
}

.streak-count strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: calc(var(--nav-height) + 20px); /* 增加底部内边距避免被导航栏遮挡 */
}

.module {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius-2xl);
    padding: var(--spacing-3xl);
    box-shadow: 
        0 8px 40px rgba(74, 144, 226, 0.08),
        0 4px 16px rgba(74, 144, 226, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(var(--blur-strength));
    display: none;
    position: relative;
    overflow: hidden;
    animation: moduleFloat 8s ease-in-out infinite;
    transition: var(--transition-smooth);
}

.module:hover {
    box-shadow: 
        0 12px 48px rgba(74, 144, 226, 0.12),
        0 6px 20px rgba(74, 144, 226, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.98);
    transform: translateY(-2px);
}

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

.module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(74, 144, 226, 0.3), 
        rgba(74, 144, 226, 0.6), 
        rgba(74, 144, 226, 0.3), 
        transparent);
    border-radius: var(--border-radius-2xl) var(--border-radius-2xl) 0 0;
    opacity: 0.8;
}

.module.active {
    display: block;
}

.module-header {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}

.module-header::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.3), transparent);
    border-radius: 1px;
}

.module-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.module-header p {
    font-size: 0.95rem;
    color: #5a6c7d;
    margin: 0;
    opacity: 0.8;
}

/* 冥想模块 */
.meditation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
    max-width: 100%;
    margin: 0 auto;
}

.video-container {
    grid-column: 1 / -1;
    width: 100%;
    height: 240px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.time-selection, .sound-selection {
    background: var(--card-background);
    border-radius: 10px;
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.time-selection h3, .sound-selection h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.time-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.time-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid var(--border-light);
    background: var(--card-background);
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    transition: var(--transition-spring);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.time-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(74, 144, 226, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.time-btn:hover {
    border-color: var(--primary-color);
    background: var(--card-background-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-float);
    color: var(--primary-dark);
}

.time-btn:hover::before {
    opacity: 1;
}

.time-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-on-primary);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.time-btn.active::before {
    opacity: 0;
}

.sound-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sound-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-2xl);
    border: 2px solid var(--border-light);
    background: var(--card-background);
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    transition: var(--transition-spring);
    min-width: 120px;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.sound-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(74, 144, 226, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sound-btn:hover::before {
    opacity: 1;
}

.sound-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-float);
}

.sound-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(74, 144, 226, 0.25));
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 
        0 16px 40px rgba(74, 144, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.sound-btn.active::before {
    opacity: 0;
}

.sound-btn img {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(74, 144, 226, 0.1));
    position: relative;
    z-index: 1;
}

.sound-btn:hover img {
    transform: scale(1.15) rotateY(5deg);
    filter: drop-shadow(0 4px 16px rgba(74, 144, 226, 0.3));
}

.sound-btn.active img {
    transform: scale(1.1);
    filter: 
        drop-shadow(0 4px 12px rgba(74, 144, 226, 0.4))
        brightness(1.1);
}

.sound-btn span {
    position: relative;
    z-index: 1;
    font-weight: 500;
    color: #5a6c7d;
    transition: color 0.3s ease;
}

.sound-btn:hover span {
    color: #2c5aa0;
}

.sound-btn.active span {
    color: #2c5aa0;
    font-weight: 600;
}

.player-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

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

.control-btn {
    padding: 12px;
    border: none;
    background: #018EBA;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* 防止按钮被压缩 */
    min-width: 50px; /* 确保最小尺寸 */
    min-height: 50px; /* 确保最小高度 */
}

.control-btn:hover {
    background: #0078a0;
    transform: scale(1.05);
}

.control-btn img {
    width: 20px;
    height: 20px;
}

.progress-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke: #e9ecef;
    stroke-width: 6;
}

.progress-ring__progress {
    stroke: #018EBA;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.time-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

/* 呼吸练习模块 */
.breathing-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.breathing-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
}

/* breathing-visual内的按钮容器 */
.breathing-visual .breathing-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.95); /* 统一白色背景，避免透明背景 */
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.breathing-circle {
    width: 180px;
    height: 180px;
    border: 2px solid #4a90e2;
    border-radius: 50%;
    margin: 0 auto 24px;
    position: relative;
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateZ(0); /* 启用硬件加速 */
    flex-shrink: 0; /* 防止圆形被压缩 */
}

.breathing-circle::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid #e8f4fd;
    opacity: 0.5;
    transition: all 4s ease;
}

.breathing-circle::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 1px dashed #4a90e2;
    opacity: 0.5;
}

@keyframes breathingGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.breathing-circle.inhale {
    transform: scale(1.4);
    background: radial-gradient(circle at 30% 30%, rgba(46, 204, 113, 0.2), rgba(46, 204, 113, 0.1));
    box-shadow: 
        0 0 0 2px rgba(46, 204, 113, 0.3),
        inset 0 0 50px rgba(46, 204, 113, 0.15),
        0 0 100px rgba(46, 204, 113, 0.25),
        0 0 200px rgba(46, 204, 113, 0.1);
    animation: inhalePulse 4s ease-in-out;
}

@keyframes inhalePulse {
    0% {
        box-shadow: 
            0 0 0 1px rgba(52, 152, 219, 0.2),
            inset 0 0 30px rgba(52, 152, 219, 0.1),
            0 0 60px rgba(52, 152, 219, 0.15);
    }
    100% {
        box-shadow: 
            0 0 0 2px rgba(46, 204, 113, 0.3),
            inset 0 0 50px rgba(46, 204, 113, 0.15),
            0 0 100px rgba(46, 204, 113, 0.25),
            0 0 200px rgba(46, 204, 113, 0.1);
    }
}

.breathing-circle.hold {
    transform: scale(1.2);
    background: radial-gradient(circle at 50% 50%, rgba(155, 89, 182, 0.2), rgba(155, 89, 182, 0.1));
    box-shadow: 
        0 0 0 3px rgba(155, 89, 182, 0.4),
        inset 0 0 60px rgba(155, 89, 182, 0.2),
        0 0 120px rgba(155, 89, 182, 0.3),
        0 0 240px rgba(155, 89, 182, 0.15);
    animation: holdShimmer 4s ease-in-out;
}

@keyframes holdShimmer {
    0%, 100% {
        box-shadow: 
            0 0 0 3px rgba(155, 89, 182, 0.4),
            inset 0 0 60px rgba(155, 89, 182, 0.2),
            0 0 120px rgba(155, 89, 182, 0.3),
            0 0 240px rgba(155, 89, 182, 0.15);
    }
    50% {
        box-shadow: 
            0 0 0 4px rgba(155, 89, 182, 0.6),
            inset 0 0 80px rgba(155, 89, 182, 0.3),
            0 0 160px rgba(155, 89, 182, 0.4),
            0 0 320px rgba(155, 89, 182, 0.2);
    }
}

.breathing-circle.exhale {
    transform: scale(0.7);
    background: radial-gradient(circle at 70% 70%, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.08));
    box-shadow: 
        0 0 0 1px rgba(231, 76, 60, 0.3),
        inset 0 0 40px rgba(231, 76, 60, 0.12),
        0 0 80px rgba(231, 76, 60, 0.2),
        0 0 160px rgba(231, 76, 60, 0.08);
    animation: exhaleWave 4s ease-in-out;
}

@keyframes exhaleWave {
    0% {
        box-shadow: 
            0 0 0 2px rgba(46, 204, 113, 0.3),
            inset 0 0 50px rgba(46, 204, 113, 0.15),
            0 0 100px rgba(46, 204, 113, 0.25),
            0 0 200px rgba(46, 204, 113, 0.1);
    }
    100% {
        box-shadow: 
            0 0 0 1px rgba(231, 76, 60, 0.3),
            inset 0 0 40px rgba(231, 76, 60, 0.12),
            0 0 80px rgba(231, 76, 60, 0.2),
            0 0 160px rgba(231, 76, 60, 0.08);
    }
}

.breathing-circle.countdown {
    transform: scale(1.1);
    background: radial-gradient(circle at 50% 50%, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.1));
    box-shadow: 
        0 0 0 3px rgba(52, 152, 219, 0.5),
        inset 0 0 60px rgba(52, 152, 219, 0.2),
        0 0 120px rgba(52, 152, 219, 0.3),
        0 0 240px rgba(52, 152, 219, 0.15);
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1.1);
        box-shadow: 
            0 0 0 3px rgba(52, 152, 219, 0.5),
            inset 0 0 60px rgba(52, 152, 219, 0.2),
            0 0 120px rgba(52, 152, 219, 0.3),
            0 0 240px rgba(52, 152, 219, 0.15);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 
            0 0 0 5px rgba(52, 152, 219, 0.7),
            inset 0 0 80px rgba(52, 152, 219, 0.3),
            0 0 160px rgba(52, 152, 219, 0.4),
            0 0 320px rgba(52, 152, 219, 0.2);
    }
}

.breathing-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    overflow: hidden;
}

.breathing-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    box-sizing: border-box;
}

.breathing-progress-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    border: 3px solid transparent;
    border-top: 3px solid var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
    box-sizing: border-box;
}

.breathing-circle.inhale .breathing-progress-circle {
    border-top-color: rgba(46, 204, 113, 0.8);
}

.breathing-circle.hold .breathing-progress-circle {
    border-top-color: rgba(155, 89, 182, 0.8);
}

.breathing-circle.exhale .breathing-progress-circle {
    border-top-color: rgba(231, 76, 60, 0.8);
}

.breathing-circle.countdown .breathing-progress-circle {
    border-top-color: rgba(52, 152, 219, 0.8);
}

.breathing-text {
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    padding: 0 10px;
    word-wrap: break-word;
}

@media (max-width: 480px) {
    .breathing-text {
        font-size: 16px;
        padding: 0 5px;
    }
}

.breathing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 响应式三列 */
    gap: 10px;
    margin: 20px auto;
    max-width: 320px; /* 减小最大宽度 */
    padding: 0 10px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .breathing-stats {
        grid-template-columns: 1fr; /* 小屏幕单列显示 */
        gap: 8px;
        max-width: 180px;
    }
    
    .breathing-stat {
        height: 50px;
    }
    
    .breathing-stat .stat-label {
        font-size: 0.8rem;
        height: 18px;
        line-height: 18px;
    }
    
    .breathing-stat .stat-value {
        font-size: 1rem;
        width: 80px;
        height: 25px;
        line-height: 25px;
    }
}

.breathing-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 60px; /* 固定高度 */
}

.breathing-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    white-space: nowrap;
    height: 20px; /* 固定标签高度 */
    line-height: 20px;
}

.breathing-stat .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.02em;
    width: 80px; /* 减小宽度适应简洁格式 */
    height: 30px; /* 固定值高度 */
    line-height: 30px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden; /* 防止溢出 */
}

.breathing-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* breathing-visual内的按钮容器特殊样式 */
.breathing-visual .breathing-buttons {
    margin-bottom: 0;
}

/* 练习记录列表样式 */
.practice-records {
    margin: 20px 0;
    padding: 0 15px;
}

.practice-records h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 500;
}

.records-container {
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.1);
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
    /* 降低容器z-index，确保表头可以显示在最顶层 */
    z-index: 0;
    /* 关键修复：确保容器的布局隔离 */
    contain: layout style paint;
    /* 防止内部元素溢出 */
    overflow-x: hidden;
    /* 增强视觉效果 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* 创建独立的堆叠上下文 */
    isolation: isolate;
}

/* 表格容器使用正确的布局模式 */
.records-table {
    width: 100%;
    /* 关键修复：使用table布局而不是block */
    display: table;
    border-collapse: collapse;
    table-layout: fixed;
    /* 防止表格溢出容器 */
    overflow: visible;
    /* 降低表格z-index，确保表头可以显示在最顶层 */
    position: relative;
    z-index: 0;
    /* 创建独立的堆叠上下文 */
    isolation: isolate;
}

/* 确保表格结构正确 */
.records-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    display: table;
}

/* 表头样式 - 关键修复：增强表头稳定性和覆盖效果 */
.records-table thead {
    position: sticky;
    top: 0;
    /* 大幅提高z-index确保表头绝对在最顶层 */
    z-index: 1000;
    /* 使用完全不透明背景确保完全覆盖 */
    background: rgba(255, 255, 255, 1) !important;
    backdrop-filter: blur(8px);
    /* 增强阴影效果，确保视觉分离 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* 创建独立的堆叠上下文 */
    isolation: isolate;
}

/* 表头和单元格基础样式 */
.records-table th,
.records-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
    height: 40px;
    vertical-align: middle;
    /* 关键修复：使用明确的背景色 */
    background: rgba(255, 255, 255, 1);
    /* 确保边框不影响定位 */
    box-sizing: border-box;
    /* 增强内容覆盖 */
    position: relative;
    /* 防止内容溢出和穿透 */
    z-index: 1;
}

/* 序号列 - 固定宽度和居中 */
.records-table th:first-child,
.records-table td:first-child {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    text-align: center;
    /* 确保序号列始终可见且完全覆盖 */
    position: sticky;
    left: 0;
    top: 0;
    /* 增加不透明度确保完全覆盖 */
    background: rgba(255, 255, 255, 1);
    z-index: 100;
    /* 确保内容不会溢出 */
    overflow: visible;
    /* 增强视觉分离 */
    box-shadow: 1px 0 0 rgba(74, 144, 226, 0.1);
}

/* 类型列 */
.records-table th:nth-child(2),
.records-table td:nth-child(2) {
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    /* 类型列也固定，防止与序号列重叠 */
    position: sticky;
    left: 60px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 4;
}

/* 时长列 */
.records-table th:nth-child(3),
.records-table td:nth-child(3) {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    position: sticky;
    left: 190px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 3;
}

/* 时间列 - 使用剩余空间 */
.records-table th:last-child,
.records-table td:last-child {
    width: calc(100% - 290px);
    min-width: 150px;
    position: sticky;
    left: 290px;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2;
}

/* 表头特殊样式 */
.records-table th {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 单元格样式 */
.records-table td {
    color: var(--text-secondary);
    font-size: 0.85rem;
    /* 关键修复：确保单元格内容不会穿透 */
    background-clip: padding-box;
}

/* 表格行样式 - 关键修复：确保行渲染稳定 */
.records-table tr {
    display: table-row;
    position: relative;
    box-sizing: border-box;
    /* 修复：添加背景色确保行之间不重叠 */
    background: rgba(255, 255, 255, 1);
    /* 防止行内容溢出 */
}

/* 分页控件样式 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.1);
    backdrop-filter: blur(10px);
    gap: 15px;
}

/* 分页按钮样式 */
.pagination-button {
    padding: 8px 16px;
    background: linear-gradient(145deg, #4a90e2, #3a7bd5);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination-button:hover:not(:disabled) {
    background: linear-gradient(145deg, #5aa0f2, #4a8be5);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.pagination-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination-button:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 页码信息样式 */
.pagination-info {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0 10px;
    min-width: 60px;
    text-align: center;
}

/* 最后一行没有底边框 */
.records-table tr:last-child td {
    border-bottom: none;
}

/* 悬停效果 */
.records-table tr:hover {
    background: rgba(74, 144, 226, 0.05);
}

/* 增强表格主体稳定性 */
.records-table tbody {
    display: table-row-group;
    position: relative;
    z-index: 1;
    /* 关键修复：确保表格行组有自己的堆叠上下文 */
    isolation: isolate;
}

.practice-type-meditation {
    color: #667eea;
}

.practice-type-breathing {
    color: #4CAF50;
}

/* 响应式表格样式 */
@media (max-width: 768px) {
    .records-container {
        padding: 10px;
        max-height: 500px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .records-table th,
    .records-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
        white-space: normal;
        min-height: 50px;
        height: auto;
    }
    
    /* 移动端表格布局优化 */
    .records-table {
        min-width: 600px; /* 确保表格有足够宽度，通过容器滚动查看 */
    }
    
    .records-table th:first-child,
    .records-table td:first-child {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
        left: 0;
    }
    
    .records-table th:nth-child(2),
    .records-table td:nth-child(2) {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
        left: 50px;
    }
    
    .records-table th:nth-child(3),
    .records-table td:nth-child(3) {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
        left: 130px;
    }
    
    .records-table th:last-child,
    .records-table td:last-child {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
        left: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 超小屏幕优化（手机竖屏） */
@media (max-width: 480px) {
    .practice-records h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .records-container {
        padding: 8px;
        border-radius: 8px;
        max-height: 400px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .records-table th,
    .records-table td {
        padding: 6px 4px;
        font-size: 0.75rem;
        min-height: 45px;
    }
    
    .records-table th:first-child,
    .records-table td:first-child {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        left: 0;
    }
    
    .records-table th:nth-child(2),
    .records-table td:nth-child(2) {
        width: 70px;
        min-width: 70px;
        max-width: 70px;
        left: 40px;
    }
    
    .records-table th:nth-child(3),
    .records-table td:nth-child(3) {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        left: 110px;
    }
    
    .records-table th:last-child,
    .records-table td:last-child {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
        left: 170px;
    }
    
    /* 移动端表格列标题优化 */
    .records-table th {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
    
    /* 移动端卡片式布局替代方案 */
    .records-table {
        display: none; /* 在超小屏幕上隐藏表格 */
    }
    
    .mobile-records-list {
        display: block;
    }
    
    .record-card {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 10px;
        border: 1px solid rgba(74, 144, 226, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .record-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .record-index {
        background: linear-gradient(145deg, #4a90e2, #3a7bd5);
        color: white;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .record-type {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .record-details {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.8rem;
        color: var(--text-secondary);
    }
    
    .record-duration {
        background: rgba(74, 144, 226, 0.1);
        padding: 4px 8px;
        border-radius: 12px;
        font-weight: 500;
    }
    
    .record-time {
        font-size: 0.75rem;
    }
}

/* 移动端卡片式布局容器 */
.mobile-records-list {
    display: none; /* 默认隐藏，在超小屏幕上显示 */
}

/* 确保在超小屏幕上显示卡片布局 */
@media (max-width: 480px) {
    .records-table {
        display: none;
    }
    
    .mobile-records-list {
        display: block;
    }
}

/* 滚动条样式 */
.records-container::-webkit-scrollbar {
    width: 6px;
}

.records-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.records-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

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

.breathing-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 8px;
    transform: scale(1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.1);
    position: relative;
    overflow: hidden;
}

.breathing-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

.breathing-btn:hover::before {
    opacity: 1;
}

.breathing-btn span {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.breathing-btn small {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.breathing-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.breathing-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.breathing-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(189, 189, 189, 0.2);
    opacity: 0.7;
}

.breathing-btn:disabled::before {
    display: none;
}

.breathing-btn.start-btn {
    background: linear-gradient(135deg, #4a90e2 0%, #2c5aa0 100%);
    color: white;
    min-width: 160px;
    box-shadow: 
        0 4px 16px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.breathing-btn.start-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #1e3a8a 100%);
    box-shadow: 
        0 8px 24px rgba(74, 144, 226, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.breathing-btn.pause-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-color: #ff9800;
    min-width: 120px;
    box-shadow: 
        0 4px 16px rgba(255, 152, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.breathing-btn.pause-btn:hover {
    background: linear-gradient(135deg, #e68900 0%, #ef6c00 100%);
    box-shadow: 
        0 8px 24px rgba(255, 152, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.breathing-btn.stop-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border-color: #f44336;
    min-width: 120px;
    box-shadow: 
        0 4px 16px rgba(244, 67, 54, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.breathing-btn.stop-btn:hover {
    background: linear-gradient(135deg, #da190b 0%, #c62828 100%);
    box-shadow: 
        0 8px 24px rgba(244, 67, 54, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 设置组 */
.breathing-settings {
    width: 100%;
    max-width: 380px;
    margin-bottom: 24px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e8f4fd;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
    min-width: 160px;
    margin-bottom: 16px;
}

.setting-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c5aa0;
    text-align: center;
    margin-bottom: 6px;
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    transition: border-color 0.3s ease;
    text-align: center;
}

.setting-group select:focus,
.setting-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

/* 呼吸按钮响应式设计 */
@media (max-width: 768px) {
    .breathing-btn {
        padding: 14px 28px;
        min-height: 60px;
        min-width: 140px;
        font-size: 15px;
        margin: 0 6px;
    }
    
    .breathing-btn span {
        font-size: 15px;
    }
    
    .breathing-btn small {
        font-size: 11px;
    }
    
    .breathing-btn.start-btn {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .breathing-buttons {
        gap: 8px;
        margin-bottom: 20px;
        flex-direction: column;
        align-items: center;
    }
    
    /* breathing-visual内的按钮容器响应式 */
    .breathing-visual .breathing-buttons {
        margin-bottom: 0;
        margin-top: 12px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.98); /* 增强不透明度 */
        flex-direction: column;
        gap: 12px;
    }
    
    .breathing-btn {
        padding: 12px 24px;
        min-height: 56px;
        min-width: 200px;
        font-size: 14px;
        margin: 0;
        width: 100%;
        max-width: 280px;
    }
    
    .breathing-btn span {
        font-size: 14px;
    }
    
    .breathing-btn small {
        font-size: 10px;
    }
    
    .breathing-btn.start-btn {
        min-width: 200px;
    }
    
    .breathing-btn.pause-btn,
    .breathing-btn.stop-btn {
        min-width: 160px;
    }
}

@media (max-width: 390px) {
    .breathing-btn {
        padding: 10px 20px;
        min-height: 52px;
        min-width: 180px;
        font-size: 13px;
        gap: 2px;
    }
    
    /* 超小屏幕下的breathing-visual按钮容器 */
    .breathing-visual .breathing-buttons {
        padding: 10px;
        border-radius: 12px;
    }
    
    .breathing-btn span {
        font-size: 13px;
    }
    
    .breathing-btn small {
        font-size: 9px;
    }
    
    .breathing-btn.start-btn {
        min-width: 180px;
    }
    
    .breathing-btn.pause-btn,
    .breathing-btn.stop-btn {
        min-width: 140px;
    }
}

/* 结果区域 */
.breathing-results {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid #e8f4fd;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
    text-align: center;
    display: none;
}

.result-stat {
    text-align: center;
    padding: 8px;
    background: rgba(74, 144, 226, 0.05);
    border-radius: 6px;
    flex: 1;
}

.result-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.result-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.breathing-benefits {
    margin-top: 25px;
    text-align: left;
}

.breathing-benefits h4 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 18px;
}

.breathing-benefits ul {
    list-style: none;
    padding: 0;
}

.breathing-benefits li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.5;
}

.breathing-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--success-color);
    font-weight: bold;
    font-size: 16px;
}

.pattern-category {
    margin-bottom: 25px;
}

.pattern-category h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.pattern-category h3::before {
    margin-right: 8px;
}

.pattern-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 12px;
    margin: 8px 0;
    border: 2px solid #e8f4fd;
    background: white;
    border-radius: 12px;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
    width: 100%;
    max-width: 280px;
    height: 130px;
    margin: 8px auto;
    align-items: center;
}

@media (max-width: 768px) {
    .breathing-content {
        grid-template-columns: 1fr;
        max-width: 480px;
        gap: 24px;
    }
    
    .pattern-btn {
        width: calc(100vw - 60px);
        max-width: 280px;
        height: 120px;
        padding: 14px 10px;
    }
    
    .pattern-name {
        font-size: 14px;
    }
    
    .pattern-desc {
        font-size: 12px;
    }
    
    .pattern-detail {
        font-size: 10px;
    }
}

.pattern-btn:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    transform: translateY(-1px);
    background: #f8fbff;
}

.pattern-btn.active {
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.pattern-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c5aa0;
    line-height: 1.2;
    word-break: break-word;
}

.pattern-desc {
    font-size: 13px;
    color: #5a6c7d;
    margin-bottom: 6px;
    line-height: 1.3;
    word-break: break-word;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pattern-detail {
    font-size: 11px;
    color: #4a90e2;
    font-weight: 500;
    background: rgba(74, 144, 226, 0.1);
    padding: 3px 6px;
    border-radius: 10px;
    margin-top: auto;
    display: inline-block;
    line-height: 1.2;
    word-break: break-word;
}

/* 音效模块 */
.sounds-content {
    max-width: 600px;
    margin: 0 auto;
}

.sound-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sound-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e8f4fd;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.05);
    transition: all 0.3s ease;
}

.sound-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.1);
}

.sound-card img {
    width: 80px;
    height: 80px;
    margin: 10px 0 15px 0;
    opacity: 0.9;
    transition: all 0.3s ease;
    filter: none;
}

.sound-card:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.sound-card.active img {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px rgba(74, 144, 226, 0.3));
}

.sound-card h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.sound-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.play-sound-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #6bb6ff);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
    flex-shrink: 0; /* 防止被压缩 */
    min-width: 40px; /* 确保最小宽度 */
    min-height: 40px; /* 确保最小高度 */
}

.play-sound-btn:hover {
    background: linear-gradient(135deg, #2c5aa0, #4a90e2);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.play-sound-btn img {
    width: 20px;
    height: 20px;
    margin: 0;
}

.volume-slider {
    flex: 1;
    max-width: 100px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(10px) scaleX(0);
    transform-origin: right center;
    width: 3px !important;
    height: 16px !important;
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.sound-card:hover .volume-slider,
.sound-controls:hover .volume-slider {
    opacity: 1;
    transform: translateX(0) scaleX(1);
    width: 100px !important;
    height: 4px !important;
}

/* 智能收缩滑动条设计 */
input[type="range"].volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 2px;
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    border-radius: 1px;
    outline: none;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    cursor: pointer;
    opacity: 0.6;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 2px rgba(1, 142, 186, 0.3);
    margin: 0 2px;
}

.sound-card:hover input[type="range"].volume-slider,
.sound-controls:hover input[type="range"].volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    width: 90px;
    background: rgba(1, 142, 186, 0.15);
    border-radius: 2px;
    opacity: 1;
    transform: scaleX(1);
    box-shadow: 0 1px 4px rgba(1, 142, 186, 0.2);
    margin: 0 8px;
}

/* 收缩状态 - 细线指示器 */
input[type="range"].volume-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    bottom: 3px;
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    border-radius: 1px;
    opacity: 1;
    transition: all 0.4s ease;
}

.sound-card:hover input[type="range"].volume-slider::after,
.sound-controls:hover input[type="range"].volume-slider::after {
    opacity: 0;
    transform: scaleY(0);
}

/* 展开状态的滑动条样式 */
input[type="range"].volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sound-card:hover input[type="range"].volume-slider::-webkit-slider-thumb,
.sound-controls:hover input[type="range"].volume-slider::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 2px 6px rgba(1, 142, 186, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="range"].volume-slider::-moz-range-thumb {
    width: 0;
    height: 0;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sound-card:hover input[type="range"].volume-slider::-moz-range-thumb,
.sound-controls:hover input[type="range"].volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    opacity: 1;
    box-shadow: 0 2px 6px rgba(1, 142, 186, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 打卡系统模块 */
.checkin-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.checkin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 26px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e8f4fd;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.1);
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

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

.calendar-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e8f4fd;
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.05);
}

.calendar-container h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.checked {
    background: linear-gradient(135deg, #4a90e2, #6bb6ff);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.calendar-day.today {
    border: 2px solid #4a90e2;
    background: rgba(74, 144, 226, 0.1);
}

.calendar-day:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: #4a90e2;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.empty:hover {
    background: transparent;
}

.checkin-button-container {
    text-align: center;
}

.checkin-btn {
    padding: 20px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.checkin-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkin-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.checkin-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.checkin-btn:disabled {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    cursor: not-allowed;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

.checkin-btn.checked {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.checkin-btn.success-animation {
    animation: checkinSuccess 0.6s ease-out;
}

@keyframes checkinSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.checkin-btn small {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

.checkin-info {
    text-align: center;
    margin-top: 15px;
}

.checkin-status {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.streak-info {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.streak-info span {
    color: var(--success-color);
    font-size: 24px;
    font-weight: 700;
}

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

.achievements {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e8f4fd;
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.05);
}

.achievements h3 {
    margin-bottom: 15px;
    font-size: 18px;
}/* 训练营样式 - 统一主体风格 */
.training-camp-module {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 20px;
}

.training-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: 40px 20px;
}

.training-preview {
    max-width: 500px;
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 32px;
    padding: 50px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.training-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--success-color));
}

.training-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
}

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

.training-preview h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.training-preview > p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.training-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 30px;
}

.training-features li {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.training-features li:last-child {
    border-bottom: none;
}

.training-features li::before {
    content: '✅';
    font-size: 18px;
    flex-shrink: 0;
}

.training-price {
    margin: 40px 0;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 20px;
    padding: 30px;
}

.price-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    margin-bottom: 8px;
}

.price-note {
    display: block;
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-training {
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-training::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-training:hover::before {
    left: 100%;
}

.btn-training:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(74, 144, 226, 0.4);
}

.btn-training:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .training-preview {
        padding: 40px 30px;
    }
    
    .training-icon {
        font-size: 64px;
    }
    
    .training-preview h3 {
        font-size: 24px;
    }
    
    .btn-training {
        padding: 16px 32px;
        font-size: 16px;
        min-height: 56px;
    }
}

@media (max-width: 480px) {
    .training-preview {
        padding: 30px 20px;
        border-radius: 24px;
    }
    
    .training-features {
        padding: 20px;
    }
    
    .btn-training {
        width: 100%;
        justify-content: center;
    }
}

/* 训练营解锁后样式 - 统一主体风格 */
.training-unlocked {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 购买后课程布局 - 改为单列显示，避免出现滚动条 */
.training-unlocked .day-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 0 auto 40px;
    max-width: 100%;
    padding: 0 10px;
    max-height: none;
    overflow-y: visible;
}

/* 优化卡片样式 */
.training-unlocked .day-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

/* 优化卡片标题样式 */
.training-unlocked .day-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
    display: box;
    box-orient: vertical;
}

/* 优化卡片描述列表 */
.training-unlocked .day-objectives {
    margin: 15px 0 20px;
    padding-left: 5px;
    flex-grow: 1;
}

.training-unlocked .day-objectives li {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
    padding-left: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 1;
    display: box;
    box-orient: vertical;
}

.training-unlocked .day-objectives li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: bold;
}

/* 优化下载状态标签 */
.training-unlocked .download-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.training-unlocked .download-badge.online {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.training-unlocked .download-badge.downloaded {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

/* 优化免费标签 */
.training-unlocked .free-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background-color: rgba(255, 193, 7, 0.1);
    color: #FFC107;
    margin-bottom: 15px;
}

/* 优化按钮样式 */
.training-unlocked .btn-training-small {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-top: auto;
}

.training-unlocked .btn-training-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 优化时长显示 */
.training-unlocked .day-duration {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.training-unlocked .day-duration::before {
    content: "⏱️ ";
    margin-right: 5px;
}

.training-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.training-progress {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-radius: 32px;
    padding: 50px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.training-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover), var(--success-color));
}

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

.progress-header h3 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-header h3::before {
    content: '🎯';
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.progress-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 15px 30px;
    border-radius: 50px;
    background-color: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2, #ff6b6b);
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 2s infinite;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { 
        opacity: 1; 
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
    50% { 
        opacity: 0.7; 
        transform: translateY(-50%) scale(1.3);
        box-shadow: 0 0 20px rgba(255, 255, 255, 1);
    }
}

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

.day-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.day-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #ff6b6b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s ease;
}

.day-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.day-card:hover::before {
    opacity: 1;
}

.day-card:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.day-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5) saturate(0.5);
    transform: none;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.day-card.locked:hover {
    transform: none;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.day-card.locked::before {
    background: linear-gradient(90deg, #9ca3af, #6b7280);
}

.day-card.completed {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.1), 
        rgba(34, 197, 94, 0.05)
    );
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 
        0 8px 32px rgba(34, 197, 94, 0.15),
        0 2px 8px rgba(34, 197, 94, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.day-card.completed::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    opacity: 1;
}

.day-card.completed::after {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 16px rgba(34, 197, 94, 0.3),
        0 0 0 4px rgba(34, 197, 94, 0.1);
    animation: celebration 0.8s ease;
}

@keyframes celebration {
    0% { 
        transform: scale(0) rotate(-180deg); 
        opacity: 0;
    }
    50% { 
        transform: scale(1.3) rotate(10deg); 
        opacity: 1;
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1;
    }
}

.day-card.current {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1), 
        rgba(118, 75, 162, 0.05)
    );
    border-color: rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.15),
        0 2px 8px rgba(102, 126, 234, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.day-card.current::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 1;
    animation: glow 2s ease-in-out infinite alternate;
}

.day-card.current::after {
    content: '🎯';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.3),
        0 0 0 4px rgba(102, 126, 234, 0.1);
    animation: target-pulse 2s infinite;
}

@keyframes target-pulse {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3), 0 0 0 4px rgba(102, 126, 234, 0.1);
    }
    50% { 
        transform: scale(1.1) rotate(5deg); 
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5), 0 0 0 8px rgba(102, 126, 234, 0.2);
    }
}

@keyframes glow {
    from { 
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    to { 
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

.day-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-number::before {
    content: 'Day';
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(74, 144, 226, 0.1);
    padding: 6px 16px;
    border-radius: 25px;
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.day-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.day-duration {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.day-duration::before {
    content: '⏱️';
    font-size: 20px;
}

.day-objectives {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.day-objectives li {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.day-objectives li:last-child {
    border-bottom: none;
}

.day-objectives li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 16px;
    background: rgba(74, 144, 226, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.day-card.completed .day-objectives li::before {
    content: '✓';
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.completion-celebration {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(74, 144, 226, 0.1));
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.completion-celebration::before {
    content: '🎉';
    font-size: 72px;
    display: block;
    margin-bottom: 25px;
    animation: celebration 1.5s ease-in-out infinite;
}

@keyframes celebration {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.completion-celebration h3 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.completion-celebration p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 500;
}

.completion-rewards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.reward-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.reward-item:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.12);
}

.reward-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--accent-color));
}

.reward-icon {
    font-size: 64px;
    margin-bottom: 25px;
    display: block;
}

.reward-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.reward-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 500;
}

/* 训练营按钮样式 - 增强版 */
.btn-training-small {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.4),
        0 4px 16px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-training-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-training-small::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-training-small:hover::before {
    left: 100%;
}

.btn-training-small:hover::after {
    width: 300px;
    height: 300px;
}

.btn-training-small:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 48px rgba(102, 126, 234, 0.5),
        0 6px 24px rgba(118, 75, 162, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-training-small:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 
        0 6px 24px rgba(102, 126, 234, 0.3),
        0 3px 12px rgba(118, 75, 162, 0.2);
}

/* 开始按钮特殊样式 */
.btn-start-day {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    box-shadow: 
        0 8px 32px rgba(255, 107, 107, 0.4),
        0 4px 16px rgba(255, 135, 135, 0.3);
    animation: pulse-glow 2s infinite;
}

.btn-start-day:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff6b6b 100%);
    box-shadow: 
        0 12px 48px rgba(255, 107, 107, 0.5),
        0 6px 24px rgba(255, 135, 135, 0.4);
    animation: none;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 
            0 8px 32px rgba(255, 107, 107, 0.4),
            0 4px 16px rgba(255, 135, 135, 0.3);
    }
    50% {
        box-shadow: 
            0 8px 32px rgba(255, 107, 107, 0.6),
            0 4px 16px rgba(255, 135, 135, 0.5),
            0 0 20px rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 
            0 8px 32px rgba(255, 107, 107, 0.4),
            0 4px 16px rgba(255, 135, 135, 0.3);
    }
}

/* 复习按钮样式 */
.btn-review-day {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    box-shadow: 
        0 8px 32px rgba(76, 175, 80, 0.4),
        0 4px 16px rgba(69, 160, 73, 0.3);
}

.btn-review-day:hover {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    box-shadow: 
        0 12px 48px rgba(76, 175, 80, 0.5),
        0 6px 24px rgba(69, 160, 73, 0.4);
}

/* 锁定状态按钮 */
.btn-training-small:disabled,
.day-card.locked .btn-training-small {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(189, 189, 189, 0.3);
    opacity: 0.7;
}

.btn-training-small:disabled::before,
.day-card.locked .btn-training-small::before,
.btn-training-small:disabled::after,
.day-card.locked .btn-training-small::after {
    display: none;
}

/* 按钮图标样式 */
.btn-training-small .btn-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-training-small:hover .btn-icon {
    transform: translateX(4px);
}

/* 响应式训练营布局 - 保留一行两个课程的核心布局 */
@media (max-width: 1200px) {
    .training-progress {
        padding: 40px;
    }
    
    .completion-rewards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .reward-item {
        padding: 35px;
    }
}

@media (max-width: 768px) {
    .training-progress {
        padding: 30px;
        border-radius: 24px;
    }
    
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .progress-header h3 {
        font-size: 28px;
    }
    
    .progress-text {
        font-size: 20px;
        padding: 12px 24px;
    }
    
    .day-grid {
        gap: 20px;
    }
    
    .day-card {
        padding: 30px;
        border-radius: 20px;
    }
    
    .completion-celebration {
        padding: 50px 30px;
        border-radius: 24px;
    }
    
    .completion-celebration h3 {
        font-size: 32px;
    }
    
    .completion-celebration p {
        font-size: 18px;
    }
    
    .completion-rewards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .reward-item {
        padding: 30px;
    }
    
    .reward-icon {
        font-size: 56px;
    }
    
    .reward-title {
        font-size: 22px;
    }
}

/* 确保在所有屏幕尺寸下保持一行两个课程的核心布局 */
@media (max-width: 768px) {
    .training-unlocked {
        padding: 0 15px;
    }
    
    .training-progress {
        padding: 25px;
        border-radius: 20px;
    }
    
    .progress-header h3 {
        font-size: 24px;
    }
    
    .progress-text {
        font-size: 18px;
        padding: 10px 20px;
    }
    
    .day-card {
        padding: 22px;
        border-radius: 16px;
        min-height: 360px;
    }
    
    .day-title {
        font-size: 20px;
    }
    
    /* 优化小屏幕上的列表项显示 */
    .training-unlocked .day-objectives li {
        font-size: 14px;
        padding-left: 20px;
    }
    
    /* 优化小屏幕上的按钮 */
    .training-unlocked .btn-training-small {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    /* 修改为单列布局，避免出现滚动条 */
    .training-unlocked .day-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-height: none;
        overflow-y: visible;
    }
}

/* 超小屏幕上的特殊优化 */
@media (max-width: 576px) {
    .training-unlocked .day-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .training-unlocked .day-card {
        min-height: 340px;
    }
    
    .completion-celebration {
        padding: 40px 25px;
        border-radius: 20px;
    }
    
    .completion-celebration h3 {
        font-size: 28px;
    }
    
    .completion-celebration p {
        font-size: 16px;
    }
    
    .completion-celebration::before {
        font-size: 56px;
    }
    
    .reward-item {
        padding: 25px;
    }
    
    .reward-icon {
        font-size: 48px;
    }
    
    .reward-title {
        font-size: 20px;
    }
    
    .reward-description {
        font-size: 16px;
    }
}

.day-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.day-card:hover::before {
    opacity: 1;
}

.day-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(248, 249, 250, 0.6);
    transform: none;
}

.day-card.locked:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.day-card.locked::before {
    display: none;
}

.day-card.completed {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px var(--success-color), 0 4px 16px rgba(76, 175, 80, 0.2);
}

.day-card.completed::before {
    background: linear-gradient(90deg, var(--success-color), #66bb6a);
    opacity: 1;
}

.day-card.current {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color), 0 8px 32px rgba(74, 144, 226, 0.2);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
}

.day-card.current::before {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    opacity: 1;
}

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

.day-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-color);
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.day-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.day-duration {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-duration::before {
    content: '⏱️';
    font-size: 14px;
}

.day-objectives {
    list-style: none;
    padding: 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.day-objectives li {
    padding: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.day-objectives li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}

.day-card.completed .day-objectives li::before {
    color: var(--success-color);
}

.day-card.current .day-objectives li::before {
    color: var(--accent-color);
}

.day-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-day {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.btn-day-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.btn-day-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(74, 144, 226, 0.4);
}

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

.btn-day-secondary:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-day:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.training-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.completion-celebration {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.completion-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.completion-celebration h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.completion-celebration p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.completion-rewards {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    text-align: left;
    border: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.1);
}

.completion-rewards h4 {
    color: var(--success-color);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.completion-rewards ul {
    list-style: none;
    padding: 0;
}

.completion-rewards li {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.completion-rewards li:last-child {
    border-bottom: none;
}

.completion-rewards li::before {
    content: '✨';
    font-size: 16px;
    flex-shrink: 0;
}

/* 响应式训练营布局 */
@media (max-width: 1024px) {
    .training-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .training-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .training-progress {
        padding: 30px;
    }
    
    .day-card {
        padding: 25px;
    }
    
    .day-number {
        font-size: 20px;
    }
    
    .day-title {
        font-size: 18px;
    }
    
    .btn-day {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .training-progress {
        padding: 20px;
    }
    
    .day-card {
        padding: 20px;
    }
    
    .day-actions {
        flex-direction: column;
    }
    
    .btn-day {
        width: 100%;
        justify-content: center;
    }
}

/* 成就系统 */
.achievement-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.achievement-item {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.achievement-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.achievement-item.earned {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.achievement-item.locked:hover {
    opacity: 0.8;
}

.achievement-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.achievement-name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    display: block;
}

.achievement-item[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.achievement-item[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    margin-bottom: -5px;
}

.practice-breakdown {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.practice-breakdown h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    text-align: center;
}

.practice-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

@media (max-width: 480px) {
    .practice-stats {
        grid-template-columns: 1fr;
    }
}

.practice-type {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.practice-type:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.practice-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.practice-data {
    flex: 1;
}

.practice-count {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 2px;
}

.practice-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.practice-minutes {
    font-size: 11px;
    color: #888;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(74, 144, 226, 0.12);
    padding: 12px 0;
    box-shadow: 
        0 -4px 32px rgba(74, 144, 226, 0.08),
        0 -2px 8px rgba(74, 144, 226, 0.06),
        0 -1px 0 rgba(255, 255, 255, 0.9);
    z-index: 1000;
    height: var(--nav-height);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: navFloat 10s ease-in-out infinite;
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0 16px;
    gap: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 14px;
    color: #5a6c7d;
    flex: 1;
    max-width: 75px;
    min-width: 55px;
    gap: 3px;
    position: relative;
    overflow: hidden;
    /* 统一白色背景 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 144, 226, 0.08);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.06);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05), rgba(74, 144, 226, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    color: #4a90e2;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.15);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(74, 144, 226, 0.15);
}

.nav-item.active {
    background: rgba(255, 255, 255, 1);
    color: #2c5aa0;
    box-shadow: 
        0 4px 16px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.nav-item.active::before {
    opacity: 0;
}

.nav-item img {
    width: 26px;
    height: 26px;
    margin-bottom: 4px;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(74, 144, 226, 0.1));
    position: relative;
    z-index: 1;
}

.nav-item:hover img {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 2px 8px rgba(74, 144, 226, 0.3));
}

.nav-item.active img {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 2px 6px rgba(74, 144, 226, 0.4));
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
    max-width: 100%;
}

/* 响应式调整 - 统一底部导航栏与按钮变化 */
@media (max-width: 768px) {
    .nav-container {
        max-width: 420px;
        padding: 0 16px;
        gap: 6px;
    }
    
    .nav-item {
        min-width: 65px;
        max-width: 75px;
        padding: 10px 6px;
        border-radius: 12px;
    }
    
    .nav-item span {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-item img {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        max-width: 360px;
        padding: 0 12px;
        gap: 4px;
    }
    
    .nav-item {
        min-width: 60px;
        max-width: 70px;
        padding: 8px 4px;
        border-radius: 10px;
    }
    
    .nav-item span {
        font-size: 9px;
    }
    
    .nav-item img {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 390px) {
    .nav-container {
        max-width: 320px;
        padding: 0 8px;
        gap: 2px;
    }
    
    .nav-item {
        min-width: 55px;
        max-width: 65px;
        padding: 6px 2px;
        border-radius: 8px;
    }
    
    .nav-item span {
        font-size: 8px;
    }
    
    .nav-item img {
        width: 20px;
        height: 20px;
    }
}

/* 用户账户系统样式 */
.user-profile {
    position: relative;
    margin-left: 20px;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(74, 144, 226, 0.08);
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    color: #2c5aa0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.15);
}

.user-menu-btn:hover {
    background: rgba(74, 144, 226, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    border-color: rgba(74, 144, 226, 0.25);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2, #2c5aa0);
    padding: 6px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.user-modal-content {
    max-width: 400px;
    width: 90%;
}

.user-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-right: 10px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.profile-info {
    padding: 20px 0;
}

.profile-info .form-group input {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app {
        font-size: 14px;
    }
    
    .module {
        padding: 15px;
    }
    
    .main-content {
        padding-bottom: calc(var(--nav-height) + 30px); /* 移动端增加更多底部间距 */
    }
    
    .meditation-content,
    .breathing-content,
    .sounds-content,
    .checkin-content {
        gap: 20px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card .stat-number {
        font-size: 24px;
    }
    
    .stat-card .stat-label {
        font-size: 12px;
    }
    
    .time-buttons {
        flex-direction: column;
    }
    
    .sound-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* 打卡记录响应式优化 */
    .calendar {
        gap: 3px;
    }
    
    .calendar-day {
        font-size: 11px;
        min-height: 32px;
        aspect-ratio: auto;
    }
    
    .calendar-container {
        padding: 15px;
        margin: 0 -5px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card .stat-number {
        font-size: 24px;
    }
    
    .stat-card .stat-label {
        font-size: 12px;
    }
    
    .achievement-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .achievement-item {
        padding: 12px 8px;
    }
    
    .achievement-icon {
        font-size: 24px;
    }
    
    .achievement-name {
        font-size: 10px;
    }
    
    /* 圆形元素响应式优化 */
    .breathing-circle {
        width: 160px;
        height: 160px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        min-width: 45px;
        min-height: 45px;
    }
    
    .progress-container {
        transform: scale(0.9);
        transform-origin: center;
    }
    
    /* 播放图标响应式缩放 */
    .play-sound-btn {
        width: 35px;
        height: 35px;
        min-width: 35px; /* 确保最小宽度 */
        min-height: 35px; /* 确保最小高度 */
    }
    
    .play-sound-btn img {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    /* 更小屏幕的进一步优化 */
    .calendar {
        gap: 2px;
    }
    
    .calendar-day {
        font-size: 10px;
        min-height: 28px;
        padding: 2px;
    }
    
    .calendar-container {
        padding: 10px 8px;
    }
    
    .stat-card {
        padding: 12px 6px;
    }
    
    .stat-card .stat-number {
        font-size: 18px;
    }
    
    .stat-card .stat-label {
        font-size: 10px;
    }
    
    .checkin-btn {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .practice-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .achievement-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .practice-type {
        padding: 10px;
        gap: 10px;
    }
    
    .practice-icon {
        font-size: 24px;
    }
    
    .practice-count {
        font-size: 16px;
    }
    
    .practice-label {
        font-size: 11px;
    }
    
    /* 圆形元素480px以下优化 */
    .breathing-circle {
        width: 140px;
        height: 140px;
    }
    
    .control-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
    
    .control-btn img {
        width: 18px;
        height: 18px;
    }
    
    .progress-container {
        transform: scale(0.8);
    }
    
    .time-display {
        font-size: 1.2rem;
    }
    
    /* 播放图标480px以下缩放 */
    .play-sound-btn {
        width: 32px;
        height: 32px;
        min-width: 32px; /* 确保最小宽度 */
        min-height: 32px; /* 确保最小高度 */
    }
    
    .play-sound-btn img {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 390px) {
    /* 超小屏幕优化 */
    .calendar {
        gap: 1px;
    }
    
    .calendar-day {
        font-size: 9px;
        min-height: 24px;
    }
    
    .calendar-container h3 {
        font-size: 16px;
    }
    
    .achievement-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .sound-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 6px;
    }
    
    .practice-stats {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .stat-card {
        padding: 10px 4px;
    }
    
    .stat-card .stat-number {
        font-size: 16px;
    }
    
    .stat-card .stat-label {
        font-size: 9px;
    }
    
    /* 超小屏幕圆形优化 */
    .breathing-circle {
        width: 120px;
        height: 120px;
    }
    
    .control-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }
    
    .control-btn img {
        width: 16px;
        height: 16px;
    }
    
    .progress-container {
        transform: scale(0.7);
    }
    
    .time-display {
        font-size: 1rem;
    }
    
    /* 播放图标390px以下缩放 */
    .play-sound-btn {
        width: 28px;
        height: 28px;
        min-width: 28px; /* 确保最小宽度 */
        min-height: 28px; /* 确保最小高度 */
    }
    
    .play-sound-btn img {
        width: 12px;
        height: 12px;
    }
}

/* 滚动条样式 */
.module::-webkit-scrollbar {
    width: 6px;
}

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

.module::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.module::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 输入范围滑块样式 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

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

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 视频播放器样式 */
.training-video-container {
    width: 100%;
    margin: 0 auto 30px;
    text-align: center;
}

.video-player {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background: #000;
    position: relative;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 50vh;
    border-radius: 16px;
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.video-controls .control-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    min-height: 44px;
}

.video-controls .control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
}

.video-controls .control-btn:active {
    transform: translateY(0);
}

.video-controls .control-btn.play-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.video-controls .control-btn.play-btn:hover {
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.4);
}

.video-controls .control-btn.pause-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.video-controls .control-btn.pause-btn:hover {
    box-shadow: 0 6px 24px rgba(255, 152, 0, 0.4);
}

.video-controls .control-btn:disabled {
    background: linear-gradient(135deg, #bdbdbd, #9e9e9e);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(189, 189, 189, 0.3);
    opacity: 0.7;
}

/* 响应式视频播放器 */
@media (max-width: 768px) {
    .video-player video {
        max-height: 40vh;
        border-radius: 12px;
    }
    
    .video-controls {
        gap: 10px;
    }
    
    .video-controls .control-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .video-player {
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .video-player video {
        max-height: 35vh;
        border-radius: 12px;
    }
    
    .video-controls .control-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-height: 36px;
    }
}

/* Headspace系列样式 */
.training-title-section {
    flex: 1;
}

.training-series-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    }
}

/* Headspace主题介绍样式 */
.headspace-intro {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.headspace-intro h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.headspace-intro p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* 冥想引导样式增强 */
.meditation-script {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05), rgba(76, 175, 80, 0.02));
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #4CAF50;
    margin: 20px 0;
}

.meditation-script .script-content {
    font-style: italic;
    color: #2c5aa0;
    line-height: 1.8;
    font-size: 16px;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
    /* 改善触摸目标大小 */
    .nav-btn, .time-btn, .sound-btn, .pattern-btn {
        min-height: 44px; /* 苹果推荐的最小触摸目标尺寸 */
        min-width: 44px;
        touch-action: manipulation; /* 防止双击缩放 */
    }
    
    /* 改善滚动体验 */
    .module-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    /* 防止文本选择 */
    .nav-btn, .time-btn, .sound-btn, .pattern-btn {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* 改善按钮反馈 */
    .nav-btn:active, .time-btn:active, .sound-btn:active, .pattern-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* 改善输入框体验 */
    input, textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 改善模态框触摸 */
    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 防止移动端100vh问题 */
.app {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* 改善iOS Safari的滚动性能 */
.module-content {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* 防止长按弹出菜单 */
.nav-btn, .time-btn, .sound-btn, .pattern-btn {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* 触摸状态样式 */
.nav-btn.touch-active,
.time-btn.touch-active,
.sound-btn.touch-active,
.pattern-btn.touch-active {
    transform: scale(0.95);
    opacity: 0.8;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

/* 呼吸圆圈触摸反馈 */
.breathing-circle.touch-active {
    transform: scale(0.98);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 改善移动端视频控制 */
@media (max-width: 768px) {
    .video-controls .control-btn.touch-active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: #4CAF50;
}

.notification-warning {
    background: #FF9800;
}

.notification-info {
    background: #2196F3;
}

.notification-error {
    background: #F44336;
}

.notification button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.notification button:hover {
    background: rgba(255,255,255,0.2);
}

/* 通知动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* PWA安装提示样式 */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideUp 0.3s ease;
}

.pwa-install-prompt img {
    width: 40px;
    height: 40px;
}

/* 下载管理器样式 */
.download-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.download-manager-modal.active {
    opacity: 1;
    visibility: visible;
}

.download-manager-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.download-manager-modal.active .download-manager-content {
    transform: scale(1);
}

.download-manager-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.download-manager-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.download-manager-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.download-manager-header .close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.download-manager-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.download-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.download-list {
    min-height: 200px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.empty-state p {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.empty-state small {
    font-size: 14px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.download-item:hover {
    background: #e9ecef;
}

.download-info {
    flex: 1;
}

.download-title {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.download-size {
    font-size: 12px;
    color: #666;
}

.download-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-action.play:hover {
    background: #d4edda;
}

.btn-action.delete:hover {
    background: #f8d7da;
}

.download-manager-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 下载状态徽章 */
.download-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin: 4px 0;
    display: inline-block;
}

.download-badge.downloaded {
    background: #d4edda;
    color: #155724;
}

.download-badge.online {
    background: #d1ecf1;
    color: #0c5460;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .download-manager-content {
        width: 95%;
        margin: 20px;
    }
    
    .download-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .download-manager-footer {
        flex-direction: column;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .download-actions {
        align-self: flex-end;
    }
}

.pwa-install-prompt .content {
    flex: 1;
}

.pwa-install-prompt h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #333;
}

.pwa-install-prompt p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.pwa-install-prompt .buttons {
    display: flex;
    gap: 8px;
}

.pwa-install-prompt button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-prompt .install-btn {
    background: #4a90e2;
    color: white;
}

.pwa-install-prompt .install-btn:hover {
    background: #3a80d2;
}

.pwa-install-prompt .cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.pwa-install-prompt .cancel-btn:hover {
    background: #e5e5e5;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 视频错误处理样式 */
.video-error {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
}

.video-error .error-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.video-error p {
    margin: 0 0 15px 0;
    color: #e74c3c;
    font-weight: 500;
}

.video-error .btn {
    margin: 5px;
    min-width: 120px;
}

/* 视频加载状态指示器 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 50;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
