:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --error-color: #e74c3c;
    --success-color: #27ae60;
    --background-color: #f5f6fa;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 15px 15px 80px;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.form-group {
    margin-bottom: 20px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 1em;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52,152,219,0.1);
}

.stats {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.timer {
    font-size: 2.5rem;
    text-align: center;
    font-family: monospace;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    z-index: 1000;
}

.nav-item {
    text-decoration: none;
    color: var(--primary-color);
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.nav-item.active {
    color: var(--secondary-color);
    background: rgba(52,152,219,0.1);
}

.nav-icon {
    font-size: 1.6rem;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 14px 28px;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastSlide 0.3s ease-out;
    max-width: 90%;
    text-align: center;
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--error-color);
}

@keyframes toastSlide {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@media (max-width: 768px) {
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .button {
        width: 100%;
    }
    
    .timer {
        font-size: 2rem;
    }
    
    .nav-item {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .nav-icon {
        font-size: 1.4rem;
    }
}

.chart-container {
    width: 100%;
    height: 180px;
    margin: 20px 0;
}

/* 训练按钮组容器 */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px; /* 增加按钮间距 */
    margin: 20px 0;
}

/* 计时器按钮样式 */
#startBtn, #pauseBtn, #resetBtn {
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#startBtn {
    background: #27ae60;
    color: white;
}

#pauseBtn {
    background: #f1c40f;
    color: white;
}

#resetBtn {
    background: #e74c3c;
    color: white;
}

/* 悬停效果 */
#startBtn:hover, #pauseBtn:hover, #resetBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

/* 点击效果 */
#startBtn:active, #pauseBtn:active, #resetBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 移动端适配 */
@media (max-width: 480px) {
    .button-group {
        gap: 12px;
    }
    
    #startBtn, #pauseBtn, #resetBtn {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* 卡片样式 */
.card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    border: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='12' cy='12' r='1'%3e%3c/circle%3e%3ccircle cx='12' cy='5' r='1'%3e%3c/circle%3e%3ccircle cx='12' cy='19' r='1'%3e%3c/circle%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .card {
        width: 100%;
    }
}