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

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

.container {
    width: 100%;
    max-width: none;
    padding: 0 20px;
    margin: 0;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

h1 {
    text-align: left;
    color: white;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
}

.top-quick-tasks {
    max-width: 100%;
    margin: 0 auto 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.top-quick-task-item {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-quick-task-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.35);
}

/* 布局调整 */
.main-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.main-content {
    flex: 1;
    min-width: 0; /* 防止子元素溢出 */
}

/* 卡片样式（统一背景和阴影） */
.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* 顶部功能区并排容器 */
.top-row-container {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: stretch;
}

.top-row-container > div {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

/* 针对只有一个模块显示时的适配 */
.top-row-container > div:only-child,
.top-row-container > div[style*="display: none"] + div,
.top-row-container > div:first-child:has(+ div[style*="display: none"]) {
    flex: 1;
    max-width: 100%;
}

/* 计时器区域（适配新布局） */
.timer-section {
    background: white; /* 覆盖旧样式 */
    box-shadow: none; /* 移除旧样式阴影，由 .card 接管 */
    padding: 30px; /* 调整内边距 */
    margin-bottom: 0; /* 由容器控制间距 */
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 正在进行的任务区域 */
.running-tasks-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* 降低阴影强度以匹配 .card */
    margin-bottom: 0; /* 由容器控制间距 */
    height: 100%;
}

.running-tasks-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.running-tasks-section h2::before {
    content: '🔄';
    font-size: 1.8rem;
}

.running-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.running-task-card {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.running-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.running-task-info {
    flex: 1;
}

.running-task-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.running-task-time {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.running-task-start-time {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.running-task-note {
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 12px;
    border: 2px solid #e8e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-top: 12px;
    background: #ffffff;
    transition: all 0.3s;
    color: #333;
}

.running-task-note:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.running-task-note::placeholder {
    color: #aaa;
}

.running-task-actions {
    display: flex;
    gap: 10px;
}

.btn-stop-small {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-stop-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}
.goal-section {
    text-align: center;
    padding: 25px;
}

.goal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
}

.goal-label {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
}

.btn-edit-goal {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-goal:hover {
    background: rgba(0, 0, 0, 0.05);
}

.goal-display {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    font-size: 1.1rem;
    color: #444;
    text-align: left;
    background: #f8f9ff;
    border-radius: 12px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-break: break-all;
    border-left: 4px solid #667eea;
    line-height: 1.6;
}

.goal-input {
    width: 100%;
    min-height: 150px; /* 增加高度 */
    padding: 15px;
    font-size: 1.1rem; /* 字体稍微调小 */
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    background: #fcfcfc;
}

.goal-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.goal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-save-goal {
    flex: 1;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(67, 233, 123, 0.3);
}

.btn-history-goal {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #667eea;
    border-radius: 10px;
    margin-left: 0; /* 移除旧样式 */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

/* 响应式适配 */
@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
    
    .goal-input {
        min-height: 100px;
    }

    .top-row-container {
        flex-direction: column;
    }
}

.task-input {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

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

/* 最近任务列表 */
.recent-tasks-list {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.recent-task-item {
    padding: 10px 15px;
    margin: 5px 0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 14px;
    color: #333;
    border: 1px solid transparent;
}

.recent-task-item:hover {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-color: #667eea;
    transform: translateX(5px);
}

.recent-task-item.empty {
    text-align: center;
    color: #999;
    cursor: default;
    transform: none;
}

.recent-task-item.empty:hover {
    background: white;
    border-color: transparent;
    transform: none;
}

.timer-display {
    font-size: 4rem;
    font-weight: bold;
    color: #333;
    margin: 30px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-start {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-end {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-end:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

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

/* 记录区域 */
.records-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.records-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.summary {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.records-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.records-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-toolbar-tip {
    font-size: 0.85rem;
    color: #777;
}

.btn-secondary {
    background: #ffffff;
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.4);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #667eea0f 0%, #764ba20f 100%);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #555;
    border: 1px dashed #bbb;
    padding-right: 16px;
    padding-left: 16px;
}

.btn-outline:hover {
    background: #f8f9ff;
    border-color: #667eea;
}

.btn-subtext {
    margin-left: 6px;
    font-size: 0.78rem;
    opacity: 0.8;
}

.record-highlight {
    display: inline-block;
    padding: 4px 8px;
    margin-bottom: 4px;
    margin-right: 4px;
    border-radius: 6px;
    background-color: #fff8c6;
    color: #7a5a00;
    font-size: 0.85rem;
}

.record-highlight:empty {
    display: none;
}

.record-note {
    display: inline-block;
    font-size: 0.9rem;
    color: #555;
}

.record-note-duplicated {
    display: none;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-label {
    font-weight: bold;
    color: #666;
}

.summary-item span:last-child {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.2rem;
}

/* 操作按钮 */
.btn-edit {
    background: #4CAF50;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    margin-right: 5px;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-edit:hover {
    background: #45a049;
}

.btn-delete:hover {
    background: #da190b;
}

/* Toast 提示 */
.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    color: #666;
    margin-bottom: 15px;
}

#taskNote, #editNote, #editNoteText {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 20px;
}

#taskNote:focus, #editNote:focus, #editNoteText:focus {
    outline: none;
    border-color: #667eea;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
}

.btn-cancel {
    background: #999;
    color: white;
    padding: 12px 30px;
}

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

.highlight-input {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 2px dashed #ffe082;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fffdf3;
}

.highlight-input:focus {
    outline: none;
    border-color: #ffca28;
    background-color: #fff8e1;
}

.highlight-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    margin-bottom: 6px;
}

.btn-highlight-quick {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background-color: #fff3cd;
    color: #8a6d3b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-highlight-quick:hover {
    background-color: #ffe08a;
}

/* 编辑表单样式 */
#editForm label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

#editForm input[type="text"],
#editForm input[type="datetime-local"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    font-family: inherit;
}

#editForm input:focus {
    outline: none;
    border-color: #667eea;
}

/* 任务名称可点击样式 */
.task-name-link {
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.task-name-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 详情弹窗样式 */
.detail-modal {
    align-items: flex-start;
    padding-top: 40px;
    overflow-y: auto;
}

.detail-content {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.detail-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 10px;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: bold;
}

.chart-section {
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-section h3 {
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-left: 15px;
}

.chart-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.chart-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
}

.legend-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.chart-container {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 50%, #f0f2ff 100%);
    border-radius: 20px;
    padding: 30px;
    min-height: 350px;
    box-shadow: 
        0 10px 40px rgba(102, 126, 234, 0.1),
        0 2px 10px rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.chart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.chart-empty.show {
    display: flex;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.chart-empty p {
    font-size: 1.2rem;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 8px;
}

.chart-empty span {
    font-size: 0.9rem;
    color: #999;
}

#dailyChart {
    width: 100%;
    height: 300px;
    display: block;
}

    .chart-summary {
        flex-direction: column;
    }

    .summary-stat {
        width: 100%;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.summary-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.stat-icon {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: #888;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.records-list-section {
    margin-bottom: 20px;
}

.records-list-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.detail-records-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

#detailRecordsTable {
    margin-top: 0;
}

#detailRecordsTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .timer-display {
        font-size: 3rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .summary {
        flex-direction: column;
        gap: 10px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 10px 5px;
    }

    .modal-content {
        padding: 20px;
    }

    .detail-stats {
        flex-direction: column;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .detail-content {
        width: 95%;
        max-height: 95vh;
    }

    .running-task-card {
        flex-direction: column;
        align-items: stretch;
    }

    .running-task-time {
        font-size: 2rem;
    }

    .running-task-note {
        min-height: 80px;
        font-size: 14px;
    }

    .running-task-actions {
        justify-content: stretch;
    }

    .btn-stop-small {
        width: 100%;
    }
}
