/* CSS变量定义 - 调整为用户需求的颜色方案 */
:root {
    --primary-color: #00b09b; /* 工作时间绿色 */
    --primary-light: #38d9be;
    --primary-dark: #00897b;
    --secondary-color: #4b6cb7; /* 长休时间蓝色 */
    --secondary-light: #6b8cce;
    --secondary-dark: #3a5795;
    --warning-color: #ff9966; /* 短休时间橙色 */
    --warning-light: #ffb793;
    --long-break-color: #4b6cb7;
    --long-break-light: #6b8cce;
    --long-break-dark: #3a5795;
    --background-color: #121829; /* 深色背景 */
    --background-light: #1a2235;
    --card-color: #1a2235; /* 面板颜色 */
    --card-light: #2d3748;
    --text-color: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #4a5568;
    --success-color: #00b09b;
    --error-color: #f56565;
    --empty-color: #4e5765;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-highlight: #e53e3e; /* 红色高亮边框 */
}

/* 基础样式重置与通用规则 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    padding: 20px;
}



/* 面板样式 */
.panel {
    background: var(--card-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.panel:hover {
    transform: translateY(0px); /* 保持面板不移动 */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.timer-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 面板标题 */
.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 12px;
}

.panel-header i {
    font-size: 24px;
    color: var(--primary-color);
}

.panel-header h2 {
    font-size: 22px;
    font-weight: 700;
}

/* 计时器显示 */
.timer-display {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 20px 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: rgba(255,255,255,0.1);
    stroke-width: 8;
    fill: transparent;
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
    stroke-width: 8;
    stroke-linecap: round;
    fill: transparent;
}

.time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 46px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 模式选择器 */
.mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 6px;
    margin: 20px 0;
    width: 100%;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    width: 100%;
}

.control-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.start-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #96c93d 100%);
    color: white;
}

.pause-btn {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ff5e62 100%);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #182848 100%);
    color: white;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn:disabled {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 设置面板 */
.settings-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    width: 100%;
}

.settings-title {
    font-size: 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--card-light);
    border-radius: 10px;
}

.setting-label {
    font-size: 15px;
    color: #a0aec0;
    min-width: 100px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 表单控件样式 */
input[type="number"] {
    width: 65px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    background: var(--background-light);
    color: var(--text-color);
    font-weight: 500;
}

input[type="range"] {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-light);
    color: var(--text-color);
    font-weight: 500;
    width: 130px;
    cursor: pointer;
    /* 确保下拉选项样式正常 */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 为提示音选项添加样式 */
select option {
    background-color: var(--background-light);
    color: var(--text-color);
    padding: 8px;
}

/* 为option元素添加悬停样式，确保与深色主题协调 */
select option:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 解决IE/Edge浏览器中select的箭头问题 */
select::-ms-expand {
    display: none;
}

/* 日期选择器 */
.date-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* 允许换行，适应小屏幕 */
}

.date-selector label {
    color: var(--text-muted);
    font-weight: 500;
}

input[type="date"] {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--background-light);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="date"]:hover,
select:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

/* 自定义日期选择器样式（部分浏览器支持） */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

#date-picker {
    padding: 8px;
    border-radius: 4px;
    background-color: var(--card-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

/* 时间刻度 */
.time-scale {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: 10px;
    color: var(--text-color);
    font-size: 12px;
    font-weight: 500;
    padding: 0 10px;
}


/* 时间网格容器 - 更新为更现代的设计 */
.time-grid, .history-grid {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 2px;
    background: var(--background-light);
    border-radius: 12px;
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

/* 时间网格单元格 - 更新样式和交互效果 */
.grid-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
    border: none;
}

.grid-cell:hover {
    transform: scale(1.2);
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* 当前时间块高亮 - 增强视觉效果 */
.grid-cell.current {
    border: 2px solid white;
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* 时间状态类 - 更新颜色方案 */
.work {
    background-color: var(--success-color);
}

.short-break {
    background-color: var(--warning-color);
}

.long-break {
    background-color: var(--long-break-color);
}

.empty {
    background-color: var(--empty-color, #4e5765);
}

/* 图例样式 */
.legend {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-color.work {
    background-color: var(--success-color, #6bcb77);
}

.legend-color.short-break {
    background-color: var(--warning-color, #ffd166);
}

.legend-color.long-break {
    background-color: var(--long-break-color, #4b6cb7);
}

.legend-color.empty {
    background-color: var(--empty-color);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 15px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.modal-header i {
    font-size: 24px;
    color: var(--warning-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.modal-body {
    margin-bottom: 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.modal-btn.confirm {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ff5e62 100%);
    color: white;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

/* 通用隐藏类 */
.hidden {
    display: none !important;
}

/* 统计信息容器样式 - 确保HTML和CSS类名匹配 */
.stat-container, .stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.03);
}

/* 统计卡片样式 */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-light));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
}

.stat-label {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 5px;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 20px;
    color: var(--primary-color);
}

#notification-text {
    color: var(--text-color);
    font-weight: 500;
}

/* 历史页面专用样式 */
.period-selector {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 周视图样式 */
.week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.week-day-header {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.week-time-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
    align-items: center;
}

.week-time-label {
    text-align: right;
    padding: 0 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.week-day-cell {
    height: 30px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.week-day-cell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.week-day-cell.has-work {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.week-day-cell.has-break {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
}

/* 月视图样式 */
.month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.month-day-header {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.month-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.month-day-cell {
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.month-day-cell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.month-day-cell.empty {
    background: transparent;
    cursor: default;
}

.month-day-cell.high-efficiency {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-color) 100%);
    color: white;
}

.month-day-cell.medium-efficiency {
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-color) 100%);
    color: white;
}

.month-day-cell.low-efficiency {
    background: linear-gradient(135deg, var(--error-color) 0%, var(--error-color) 100%);
    color: white;
}

/* 数据分析面板 */
.coming-soon {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.coming-soon i {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.coming-soon h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* 添加折线图容器 - 固定高度防止坐标轴持续变高 */
.chart-container {
    margin-top: 20px;
    height: 300px; /* 固定高度防止坐标轴持续变高 */
    position: relative;
}

/* 日视图样式 */
.time-scale {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 5px;
}

.time-scale span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#time-grid {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 1px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 8px;
    height: 300px;
}


#timeChart {
    max-height: 250px; /* 限制图表canvas的最大高度 */
    width: 100% !important;
}

/* 历史记录按钮容器 */
.history-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
}

/* 历史记录按钮样式 */
.history-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #6366f1 100%);
    color: white;
}

/* 图表控制按钮样式 */
.chart-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 6px;
    margin: 20px 0;
    width: 100%;
    justify-content: center;
    gap: 4px;
}

.chart-control-btn {
    padding: 10px 20px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 14px;
}

.chart-control-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chart-control-btn.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    .week-header, .week-time-row {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .week-time-label {
        font-size: 10px;
        padding: 0 5px;
    }
    
    .week-day-cell {
        height: 20px;
    }
    
    .month-day-cell {
        height: 40px;
    }
    
    /* 时间网格响应式调整 */
    .time-grid, .history-grid {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(24, 1fr);
        max-height: 300px;
    }
    
    .grid-cell {
        border-radius: 3px;
    }
    
    .time-scale {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .week-header, .week-time-row {
        grid-template-columns: 50px repeat(7, 1fr);
    }
    
    .week-day-header, .month-day-header {
        font-size: 12px;
        padding: 5px;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-selector label {
        margin-bottom: 5px;
    }
    
    .month-day-cell {
        height: 30px;
        font-size: 12px;
    }
    
    /* 小屏幕时间网格调整 */
    .time-grid, .history-grid {
        grid-template-columns: repeat(8, 1fr);
        grid-template-rows: repeat(36, 1fr);
        padding: 10px;
        gap: 1px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* 为完成的番茄钟添加脉动动画 */
.work.pulse {
    animation: pulse 1s ease-in-out 3;
}

/* 历史记录查看器样式 */

/* 历史记录容器 */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 历史记录头部 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.history-header h1 {
    font-size: 32px;
    color: var(--text-color);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 返回按钮样式增强 */
.history-header .btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 10px 20px;
}

.history-header .btn-secondary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 历史记录操作区 */
.history-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 日期选择器和周期选择器样式 */
#date-picker,
.period-selector {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

#date-picker:focus,
.period-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 176, 155, 0.2);
}

#date-picker:hover,
.period-selector:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 清空历史按钮样式增强 */
#clear-history-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#clear-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 101, 101, 0.3);
}

/* 月度统计样式 */
.monthly-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 历史记录列表容器 */
.history-list-container {
    background: var(--card-color);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

/* 历史记录列表头部 */
.history-list-header {
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.history-list-header h2 {
    font-size: 24px;
    color: var(--text-color);
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--warning-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 历史记录列表 */
.history-list {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* 历史记录表格 */
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 表格头部 */
.history-table thead {
    background: linear-gradient(135deg, rgba(0, 176, 155, 0.2) 0%, rgba(75, 108, 183, 0.2) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.history-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    border-bottom: 2px solid rgba(0, 176, 155, 0.3);
}

/* 表格行 */
.history-table-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* 斑马纹效果 */
.history-table-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.history-table-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.04);
}

/* 行悬停效果 */
.history-table-row:hover {
    background: rgba(0, 176, 155, 0.1);
    transform: scale(1.005);
}

/* 表格单元格 */
.history-table-cell {
    padding: 18px 20px;
    color: var(--text-color);
    vertical-align: middle;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* 首列样式增强 */
.history-table-cell:first-child {
    font-weight: 500;
    color: var(--primary-light);
    border-left: 3px solid transparent;
}

.history-table-row:hover .history-table-cell:first-child {
    border-left: 3px solid var(--primary-color);
}

/* 数字类单元格样式 */
.history-table-cell:nth-child(2),
.history-table-cell:nth-child(3),
.history-table-cell:nth-child(4) {
    text-align: center;
    font-weight: 500;
}

/* 番茄钟数量高亮 */
.history-table-cell:nth-child(2) {
    color: var(--warning-color);
    font-weight: 600;
}

/* 工作时间高亮 */
.history-table-cell:nth-child(3) {
    color: var(--success-color);
}

/* 休息时间高亮 */
.history-table-cell:nth-child(4) {
    color: var(--secondary-light);
}

/* 空数据状态样式优化 */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin: 20px 0;
}

/* 响应式表格设计 */
@media (max-width: 768px) {
    .history-table {
        font-size: 14px;
    }
    
    .history-table th,
    .history-table-cell {
        padding: 12px 15px;
    }
    
    .history-table th {
        font-size: 12px;
        letter-spacing: 0.3px;
    }
    
    .history-table-cell {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .history-list-container {
        padding: 15px;
    }
    
    .history-table th,
    .history-table-cell {
        padding: 10px 8px;
    }
    
    .history-table th {
        font-size: 11px;
    }
    
    .history-table-cell {
        font-size: 12px;
    }
    
    /* 移动端表格横向滚动 */
    .history-list {
        overflow-x: auto;
    }
    
    .history-table {
        min-width: 400px;
    }
}

/* 历史记录日项 */
.history-day-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.history-day-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* 历史记录日期标题 */
.history-day-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 历史记录统计摘要 */
.history-day-summary {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

/* 历史记录时段列表 */
.history-blocks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 历史记录时段项 */
.history-block-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.history-block-item:hover {
    transform: translateX(5px);
}

/* 工作时段样式 */
.history-block-item.block-work {
    background: rgba(0, 176, 155, 0.1);
    border-left: 4px solid var(--success-color);
}

/* 短休息时段样式 */
.history-block-item.block-short-break {
    background: rgba(255, 153, 102, 0.1);
    border-left: 4px solid var(--warning-color);
}

/* 长休息时段样式 */
.history-block-item.block-long-break {
    background: rgba(75, 108, 183, 0.1);
    border-left: 4px solid var(--long-break-color);
}

/* 时段时间显示 */
.block-time {
    color: var(--text-muted);
    font-weight: 500;
}

/* 时段类型显示 */
.block-type {
    color: var(--text-color);
    font-weight: 600;
}

/* 时段时长显示 */
.block-duration {
    color: var(--text-muted);
    font-weight: 500;
}

/* 无记录提示 */
.no-data, .no-blocks {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* 分页控制 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 分页信息 */
#page-info {
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 分页按钮增强样式 */
.pagination .btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination .btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: transparent;
}

.pagination .btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* 模态框样式覆盖 */
#confirm-modal {
    display: none;
}

/* 通知样式覆盖 */
#notification {
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

/* 按钮样式增强 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-color) 0%, #e53e3e 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .history-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .monthly-stats {
        grid-template-columns: 1fr;
    }
    
    .history-day-summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .history-block-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .history-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
}