/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ========== 主容器 ========== */
.container {
    width: 100%;
    max-width: 600px;
}

/* ========== 计时器卡片 ========== */
.timer-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.timer-card:hover {
    transform: translateY(-5px);
}

/* ========== 标题样式 ========== */
.title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* ========== 时间显示区域 ========== */
.time-display {
    font-size: 4rem;
    font-weight: 300;
    color: #667eea;
    margin-bottom: 50px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-display span {
    display: inline-block;
}

.separator {
    margin: 0 5px;
    opacity: 0.6;
}

#milliseconds {
    font-size: 2.5rem;
    opacity: 0.7;
}

/* ========== 控制按钮区域 ========== */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 按钮基础样式 ========== */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
    min-width: 140px;
    justify-content: center;
}

.btn:active {
    transform: scale(0.95);
}

/* ========== 主要按钮（开始/暂停） ========== */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

/* ========== 暂停状态的按钮样式 ========== */
.btn-primary.paused {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-primary.paused:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

/* ========== 次要按钮（重置） ========== */
.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ========== 按钮图标 ========== */
.btn-icon {
    width: 20px;
    height: 20px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 600px) {
    .timer-card {
        padding: 40px 30px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .time-display {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }
    
    #milliseconds {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1rem;
        min-width: 120px;
    }
}

@media (max-width: 400px) {
    .time-display {
        font-size: 2rem;
    }
    
    #milliseconds {
        font-size: 1.2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
}

