/* 计时器页面样式 */

/* 计时器英雄区域 */
.timer-hero {
    min-height: 50vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.timer-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timer-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    font-weight: 300;
}

.timer-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* 计时器类型选择 */
.timer-types {
    padding: 60px 0;
    background: #f8f9fa;
}

.timer-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.timer-tab {
    background: white;
    border: 2px solid #e9ecef;
    padding: 2rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.timer-tab:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timer-tab.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: transparent;
    color: white;
}

.timer-tab i {
    font-size: 2.5rem;
    color: #667eea;
}

.timer-tab.active i {
    color: white;
}

.timer-tab span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* 计时器界面 */
.timer-interface {
    padding: 80px 0;
    background: white;
    min-height: 60vh;
}

.timer-display {
    text-align: center;
    margin-bottom: 3rem;
}

.time-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.time-number {
    font-family: 'Courier New', monospace;
    font-size: 4rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.time-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.time-separator {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-top: -1rem;
}

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

.control-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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

.start-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.pause-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.reset-btn {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
}

.lap-btn {
    background: linear-gradient(45deg, #f39c12, #e67e22);
}

.skip-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
}

/* 计圈记录 */
.lap-times {
    max-width: 600px;
    margin: 0 auto;
}

.lap-times h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.lap-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
}

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

.lap-number {
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
}

.lap-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
}

.lap-difference {
    font-size: 0.9rem;
    color: #666;
    min-width: 80px;
    text-align: right;
}

/* 计时器设置 */
.timer-setup {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.time-inputs {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.time-input-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.time-input-group input {
    width: 80px;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.time-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.preset-times {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.preset-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.preset-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

/* 番茄钟和间隔计时设置 */
.pomodoro-settings,
.interval-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.setting-group input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
}

.setting-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* 阶段显示 */
.pomodoro-phase,
.interval-phase {
    text-align: center;
    margin-top: 1rem;
}

.pomodoro-phase span,
.interval-phase span {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* 进度条 */
.pomodoro-progress,
.interval-progress {
    max-width: 600px;
    margin: 0 auto;
}

.progress-info {
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    width: 0%;
    transition: width 0.3s ease;
}

/* 历史记录 */
.timer-history {
    padding: 80px 0;
    background: #f8f9fa;
}

.history-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.history-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.history-list {
    max-width: 800px;
    margin: 0 auto;
}

.history-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.history-info {
    flex: 1;
}

.history-type {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.history-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
    font-size: 1.2rem;
}

.history-date {
    font-size: 0.9rem;
    color: #666;
}

/* 通知设置 */
.notification-settings {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 250px;
}

.notification-settings h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.setting-item {
    margin-bottom: 0.8rem;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* 动画效果 */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-running .time-number {
    animation: pulse 2s infinite;
}

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

.timer-interface {
    animation: fadeInUp 0.5s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timer-title {
        font-size: 2.5rem;
    }
    
    .timer-subtitle {
        font-size: 1.1rem;
    }
    
    .timer-stats {
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 1.5rem;
    }
    
    .timer-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-display {
        gap: 0.5rem;
    }
    
    .time-number {
        font-size: 2.5rem;
    }
    
    .time-separator {
        font-size: 2rem;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
    
    .time-inputs {
        gap: 1rem;
    }
    
    .preset-times {
        gap: 0.5rem;
    }
    
    .preset-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .pomodoro-settings,
    .interval-settings {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
    }
    
    .notification-settings {
        position: static;
        margin: 2rem auto;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .timer-hero {
        padding: 100px 0 60px;
    }
    
    .timer-title {
        font-size: 2rem;
    }
    
    .timer-subtitle {
        font-size: 1rem;
    }
    
    .timer-tabs {
        grid-template-columns: 1fr;
    }
    
    .time-number {
        font-size: 2rem;
    }
    
    .time-separator {
        font-size: 1.5rem;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .time-input-group input {
        width: 60px;
        font-size: 1rem;
    }
    
    .preset-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .history-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .history-btn {
        width: 200px;
    }
}
