/* 基础样式重置和变量定义 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

/* 呼吸圆圈容器 */
.breathing-circle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.breathing-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 0 50px rgba(102, 126, 234, 0.3);
}

.breathing-circle.inhale {
    transform: scale(1.2);
    box-shadow: 0 0 80px rgba(102, 126, 234, 0.5);
}

.breathing-circle.exhale {
    transform: scale(0.8);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.2);
}

.inner-circle {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
}

.instruction-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.timer-text {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-color);
}

/* 控制按钮 */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    min-width: 120px;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 进度条 */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.cycle-counter {
    text-align: center;
    font-weight: 500;
    color: var(--text-light);
}

/* 设置区域 */
.settings {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.setting-item label {
    font-weight: 500;
    color: var(--text-color);
}

.slider {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

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

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* 信息卡片 */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-color);
}

/* 步骤样式 */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: var(--primary-color);
}

/* 呼吸动画状态 */
@keyframes breatheInOut {
    0%, 25% {
        transform: scale(1);
    }
    12.5% {
        transform: scale(1.2);
    }
    37.5%, 62.5% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
    75%, 100% {
        transform: scale(0.8);
    }
    87.5% {
        transform: scale(0.8);
    }
}

.breathing-circle.animate {
    animation: breatheInOut var(--cycle-duration, 16s) infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 2rem;
    }
    
    .breathing-circle {
        width: 250px;
        height: 250px;
    }
    
    .inner-circle {
        width: 210px;
        height: 210px;
    }
    
    .instruction-text {
        font-size: 1.2rem;
    }
    
    .timer-text {
        font-size: 2.5rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .breathing-circle {
        width: 200px;
        height: 200px;
    }
    
    .inner-circle {
        width: 170px;
        height: 170px;
    }
    
    .timer-text {
        font-size: 2rem;
    }
    
    .instruction-text {
        font-size: 1rem;
    }
}

/* 无障碍和用户体验优化 */
@media (prefers-reduced-motion: reduce) {
    .breathing-circle,
    .btn,
    .progress-fill {
        transition: none;
    }
    
    .breathing-circle.animate {
        animation: none;
    }
} 