* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fb;
    padding: 16px;
    color: #1e293b;
    min-height: 100vh;
}
.container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}
.card {
    background: white;
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.02);
}
.header {
    text-align: center;
    margin-bottom: 8px;
}
.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.header p {
    color: #5b6e8c;
    font-size: 0.75rem;
    margin-top: 4px;
}
.hr-monitor {
    text-align: center;
    padding: 8px 0;
}
.hr-value {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: #e53e3e;
    letter-spacing: -2px;
}
@media (min-width: 480px) {
    .hr-value { font-size: 5rem; }
}
.hr-label {
    font-size: 0.8rem;
    color: #64748b;
}
.status-badge {
    display: inline-block;
    background: #e2e8f0;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 8px;
}
.btn {
    border: none;
    padding: 12px 20px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    background: #f1f5f9;
    color: #1e293b;
    transition: all 0.2s ease;
    font-family: inherit;
}
.btn-primary {
    background: #2c3e66;
    color: white;
}
.btn-primary:active { background: #1e2a4a; transform: scale(0.98);}
.btn-success {
    background: #2b6e4c;
    color: white;
}
.btn-success:active { background: #1e553a; transform: scale(0.98);}
.btn-warning {
    background: #e67e22;
    color: white;
}
.btn-warning:active { background: #d35400; transform: scale(0.98);}
.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
}
.btn-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.btn-guide {
    background: #e8edf5;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #2c3e66;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}
.btn-guide:active { background: #d0d9e8; transform: scale(0.98);}
.flex-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
.flex-row .btn {
    margin-top: 0;
}
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.checkbox-item {
    flex: 0 0 calc(33.33% - 7px);
    min-width: 90px;
}
.checkbox-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    margin-bottom: 0;
}
.checkbox-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2c3e66;
}
.checkbox-item label:has(input:checked) {
    background: #e8edf5;
    border-color: #2c3e66;
}
@media (max-width: 500px) {
    .checkbox-item { flex: 0 0 calc(50% - 5px); }
}
.selected-projects {
    background: #f1f5f9;
    padding: 10px 12px;
    border-radius: 20px;
    margin: 12px 0;
    font-size: 0.8rem;
    color: #2c3e66;
}
.current-project {
    background: #e8edf5;
    padding: 12px;
    border-radius: 24px;
    margin: 12px 0;
    text-align: center;
}
.current-project-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e66;
}
.project-timer {
    font-size: 2rem;
    font-weight: 700;
    font-feature-settings: "tnum";
    margin: 8px 0;
}
.project-list-status {
    background: #f8fafc;
    padding: 12px;
    border-radius: 20px;
    margin: 12px 0;
    font-size: 0.75rem;
}
.project-item-completed {
    display: inline-block;
    background: #2b6e4c;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.7rem;
}
.project-item-pending {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.7rem;
}
.project-item-current {
    display: inline-block;
    background: #e67e22;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.7rem;
}
.pause-status {
    text-align: center;
    font-size: 0.8rem;
    color: #e67e22;
    margin-top: 8px;
}
.preview-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px;
    border: 1px solid #eef2ff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.chart-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 180px;
    margin: 12px 0;
}
.mini-chart {
    margin: 16px 0;
    padding: 12px;
    background: #fafcff;
    border-radius: 20px;
    border: 1px solid #eef2ff;
}
.mini-chart-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #2c3e66;
    display: flex;
    justify-content: space-between;
}
canvas {
    max-width: 100%;
    height: auto !important;
}
.zone-stats {
    background: #f8fafc;
    border-radius: 20px;
    padding: 14px;
    margin: 12px 0;
}
.zone-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #334155;
    text-align: center;
}
.zone-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.zone-item {
    flex: 1;
    min-width: 65px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
@media (max-width: 480px) {
    .zone-item { min-width: 55px; font-size: 0.65rem; padding: 6px 2px; }
}
.stats-row {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 24px;
    margin: 12px 0;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 8px;
}
.project-summary {
    background: #f8fafc;
    padding: 12px;
    border-radius: 20px;
    margin: 12px 0;
}
.project-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
}
.project-summary-item:last-child {
    border-bottom: none;
}
.note {
    font-size: 0.65rem;
    color: #6c7a91;
    text-align: center;
    margin-top: 16px;
    line-height: 1.4;
}
.footer-btns {
    display: flex;
    gap: 12px;
    margin: 12px 0 8px;
}
.workout-meta {
    font-size: 0.85rem;
    margin: 4px 0;
    text-align: center;
}
.time-range {
    font-size: 0.7rem;
    text-align: center;
    color: #4a6a8a;
    margin: 4px 0;
}
hr {
    margin: 16px 0;
    border: none;
    border-top: 1px solid #eef2ff;
}
.section-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 16px 0 8px 0;
    color: #334155;
}
.pause-annotation {
    font-size: 0.7rem;
    color: #e67e22;
    text-align: center;
    margin-top: 4px;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    border-radius: 32px;
    max-width: 90%;
    width: 320px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2ff;
}
.modal-header h3 {
    font-size: 1.1rem;
    color: #2c3e66;
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    line-height: 1;
}
.modal-close:hover {
    color: #475569;
}
.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #334155;
}
.modal-body p {
    margin-bottom: 12px;
}
.modal-body ul {
    padding-left: 20px;
    margin: 8px 0;
}
.modal-body li {
    margin: 4px 0;
}
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #eef2ff;
}