/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 8px;
}

.timezone-info {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.header-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

/* 主要内容区域 */
main {
    display: grid;
    gap: 30px;
}

section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.time-hint {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.time-hint span {
    font-weight: 600;
    color: #667eea;
}

/* 今日记录区域 */
.input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#todayInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

#todayInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.today-display {
    background: #f7fafc;
    border-radius: 12px;
    padding: 16px;
    min-height: 50px;
}

.today-content {
    font-size: 1.1rem;
    color: #2d3748;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.today-empty {
    color: #a0aec0;
    font-style: italic;
}

/* 热力图区域 */
.heatmap-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.heatmap-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#currentYear {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.heatmap {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
}

/* 新的热力图布局样式 */
.heatmap-container {
    width: 100%;
    min-width: 900px; /* 增加最小宽度，让布局更宽松 */
    max-width: 1400px; /* 限制最大宽度，避免过度拉伸 */
    margin: 0 auto; /* 居中显示 */
    overflow-x: auto; /* 允许横向滚动 */
}

.heatmap-months {
    display: flex;
    position: relative;
    height: 20px;
    margin-bottom: 5px;
    margin-left: 25px;
}

.month-label {
    position: absolute;
    font-size: 12px;
    color: #586069;
    font-weight: 500;
}

.heatmap-main {
    display: flex;
    align-items: flex-start;
}

.heatmap-weekdays {
    display: flex;
    flex-direction: column;
    margin-right: 8px;
    gap: 2px;
}

.weekday-label {
    width: 15px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #586069;
    font-weight: 500;
}

.heatmap-grid {
    display: flex;
    gap: 3px; /* 增加间距 */
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 15px 8px 0; /* 左右留出空间，底部留出滚动条空间 */
}

.heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.heatmap-day {
    width: 14px; /* 稍微增大方块 */
    height: 14px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.heatmap-day:hover {
    transform: scale(1.15);
    border: 1px solid rgba(27, 31, 35, 0.8);
    z-index: 10;
}

.heatmap-day.today {
    border: 2px solid #0366d6;
    border-radius: 3px;
    animation: todayPulse 3s infinite;
    position: relative;
    z-index: 5;
}

.heatmap-day.today::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid #0366d6;
    border-radius: 4px;
    opacity: 0.5;
    animation: todayGlow 3s infinite;
}

.heatmap-day.other-year {
    opacity: 0.3;
}

/* 活跃度等级颜色 - 使用更柔和的渐变 */
.heatmap-day[data-level="0"] {
    background-color: #ebedf0;
}

.heatmap-day[data-level="1"] {
    background: linear-gradient(135deg, #c6e48b 0%, #a4d665 100%);
}

.heatmap-day[data-level="2"] {
    background: linear-gradient(135deg, #7bc96f 0%, #68b858 100%);
}

.heatmap-day[data-level="3"] {
    background: linear-gradient(135deg, #239a3b 0%, #1e7e34 100%);
}

.heatmap-day[data-level="4"] {
    background: linear-gradient(135deg, #196127 0%, #155724 100%);
}

/* 今天的增强动画效果 */
@keyframes todayPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(3, 102, 214, 0.7);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.3);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(3, 102, 214, 0);
        transform: scale(1);
    }
}

@keyframes todayGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #718096;
}

.legend-colors {
    display: flex;
    gap: 3px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color[data-level="0"] {
    background-color: #ebedf0;
}

.legend-color[data-level="1"] {
    background-color: #c6e48b;
}

.legend-color[data-level="2"] {
    background-color: #7bc96f;
}

.legend-color[data-level="3"] {
    background-color: #239a3b;
}

.legend-color[data-level="4"] {
    background-color: #196127;
}

/* 历史记录区域 */
.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

#searchInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

#searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#dateFilter {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

#dateFilter:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f7fafc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.history-date {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 4px;
}

.history-content {
    font-size: 1rem;
    color: #2d3748;
    font-weight: 500;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.close, .close-edit {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
}

.close:hover, .close-edit:hover {
    color: #000;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.3rem;
}

#modalContent {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 版本历史样式 */
.record-content {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.version-history {
    margin-top: 20px;
}

.version-history h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.versions-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.version-item {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.version-item:last-child {
    border-bottom: none;
}

.version-item:hover {
    background: #f8fafc;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.version-number {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.version-time {
    font-size: 0.8rem;
    color: #718096;
    flex-shrink: 0;
}

.version-action {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.version-action:contains("被覆盖"),
.version-item:has(.version-action:contains("被覆盖")) .version-action {
    background: #fed7d7;
    color: #c53030;
}

.version-item .version-action {
    background: #e6fffa;
    color: #38a169;
}

.version-content {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.4;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 6px;
    border-left: 3px solid #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 响应式版本历史 */
@media (max-width: 768px) {
    .version-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .versions-list {
        max-height: 200px;
    }
    
    .version-content {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
}

/* 多条记录样式 - 优化版 */
.today-records-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.08);
    position: relative;
    overflow: hidden;
}

.today-records-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 0 16px;
}

.records-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-count {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.records-count::before {
    content: '📋';
    font-size: 1.2rem;
}

.today-record {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.today-record:last-child {
    margin-bottom: 0;
}

.today-record:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}


.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.record-number {
    font-weight: 700;
    color: #667eea;
    font-size: 0.9rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.record-number::before {
    content: '✨';
    font-size: 0.8rem;
}

.record-time {
    font-size: 0.85rem;
    color: #6b7280;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.record-time::before {
    content: '🕐';
    font-size: 0.8rem;
}

.delete-record-btn {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #dc2626;
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.delete-record-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.delete-record-btn:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
    transform: scale(1.1);
    border-color: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.delete-record-btn:hover::before {
    width: 40px;
    height: 40px;
}

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

.record-content {
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.05);
    font-weight: 400;
    position: relative;
}

.record-content::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 8px;
    font-size: 2rem;
    color: rgba(102, 126, 234, 0.3);
    font-family: serif;
    line-height: 1;
}

.record-content::after {
    content: '"';
    position: absolute;
    bottom: -16px;
    right: 8px;
    font-size: 2rem;
    color: rgba(102, 126, 234, 0.3);
    font-family: serif;
    line-height: 1;
}

/* 弹窗中的多条记录样式 - 简洁版 */
.modal-records-container {
    max-height: 450px;
    overflow-y: auto;
}

.modal-records-container::-webkit-scrollbar {
    width: 6px;
}

.modal-records-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.modal-records-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.modal-records-header {
    display: none;
}

.modal-records-count {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-records-count::before {
    content: '📝';
    font-size: 1.2rem;
}

.modal-record-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-record-item:last-child {
    margin-bottom: 0;
}

.modal-record-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.modal-record-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-record-item:hover::before {
    opacity: 1;
}

.modal-record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.modal-record-number {
    font-weight: 700;
    color: #667eea;
    font-size: 0.9rem;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.modal-record-number::before {
    content: '💎';
    font-size: 0.8rem;
}

.modal-record-time {
    font-size: 0.85rem;
    color: #6b7280;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.modal-record-time::before {
    content: '⏰';
    font-size: 0.8rem;
}

.modal-record-content {
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.05);
    font-weight: 400;
    position: relative;
}

.modal-record-content::before {
    content: '💭';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 1rem;
    opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .record-header,
    .modal-record-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .today-record,
    .modal-record-item {
        padding: 10px;
    }
    
    .modal-records-container {
        max-height: 300px;
    }
}

#editInput {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

#editInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 20px;
    flex-shrink: 0;
}

.edit-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.delete-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

#cancelEditBtn, #cancelHistoryBtn {
    background: #e2e8f0;
    color: #2d3748;
}

/* 表单样式 */
.modal-form-content {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.form-group input[type="date"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.5;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-note {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .heatmap {
        padding: 15px;
    }
    
    .heatmap-container {
        min-width: 350px;
    }
    
    .heatmap-day {
        width: 10px;
        height: 10px;
    }
    
    .heatmap-grid {
        gap: 1px;
    }
    
    .heatmap-week {
        gap: 1px;
    }
    
    .month-label {
        font-size: 10px;
    }
    
    .weekday-label {
        font-size: 8px;
        width: 12px;
        height: 10px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.history-item {
    animation: fadeIn 0.3s ease;
}

/* 滚动条样式 */
.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* 工具提示 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.92);
    color: white;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
    max-width: 280px;
    white-space: normal;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.today-badge {
    background: linear-gradient(135deg, #0366d6, #0256cc);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(3, 102, 214, 0.3);
}

.tooltip-content {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #e1e4e8;
}

.tooltip-stats {
    font-size: 11px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-empty {
    color: #8b949e;
    font-style: italic;
    text-align: center;
    padding: 4px 0;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.92) transparent transparent transparent;
}

/* 导航样式 */
.header-nav {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 法律页面样式 */
.legal-page, .about-page, .contact-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    background: white;
    padding: 40px;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.content-section h1 {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.content h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.content h3 {
    color: #4a5568;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
}

.content p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #2d3748;
}

.content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.content a {
    color: #667eea;
    text-decoration: none;
}

.content a:hover {
    text-decoration: underline;
}

/* 关于页面样式 */
.hero-section {
    text-align: center;
    padding: 60px 40px;
    background: white;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.hero-section h1 {
    color: #2d3748;
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-subtitle {
    color: #718096;
    font-size: 1.3rem;
    font-weight: 300;
}

.about-grid {
    display: grid;
    gap: 30px;
}

.about-item {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.about-item h2 {
    color: #2d3748;
    margin-bottom: 15px;
    border: none;
    padding-bottom: 0;
}

.timeline {
    margin-top: 20px;
}

.timeline-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.timeline-date {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 20px;
    white-space: nowrap;
    align-self: flex-start;
}

.timeline-content h4 {
    color: #2d3748;
    margin-bottom: 5px;
}

.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.principle {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.principle h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.cta-section {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 20px 0;
    border-radius: 16px;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-button {
    background: white;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 联系页面样式 */
.contact-content {
    background: white;
    padding: 40px;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-methods {
    margin: 30px 0;
}

.contact-method {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.contact-method h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

.contact-method a {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.form-result {
    margin-top: 20px;
}

.success-message {
    background: #f0fff4;
    border: 2px solid #48bb78;
    color: #2d3748;
    padding: 20px;
    border-radius: 8px;
}

.success-message h3 {
    color: #38a169;
    margin-bottom: 10px;
}

.faq-section {
    background: white;
    padding: 40px;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.faq-section h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 30px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.faq-item h3 {
    color: #2d3748;
    margin-bottom: 10px;
}

/* 页脚样式 */
.legal-footer {
    background: #2d3748;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 5px 10px;
}

.footer-links a:hover {
    color: white;
}

/* 备份设置弹窗样式 */
.backup-settings-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.backup-info, .backup-status, .backup-actions, .backup-guide {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
}

.backup-info h4, .backup-status h4, .backup-actions h4, .backup-guide h4 {
    margin-bottom: 12px;
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
}

.backup-info ul {
    margin-left: 20px;
    margin-top: 10px;
}

.backup-info li {
    margin-bottom: 5px;
    color: #4a5568;
}

.backup-status {
    border-left-color: #48bb78;
}

.backup-actions {
    border-left-color: #ed8936;
}

.backup-guide {
    border-left-color: #9f7aea;
}

.backup-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.action-btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.backup-guide ol {
    margin-left: 20px;
    margin-top: 10px;
}

.backup-guide li {
    margin-bottom: 8px;
    color: #4a5568;
}

.backup-note {
    background: #fef5e7;
    border: 1px solid #f6ad55;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #744210;
}

#backupStatusInfo {
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
}

#backupStatusInfo.loading {
    color: #4299e1;
}

#backupStatusInfo.success {
    color: #48bb78;
    background: #f0fff4;
    border-color: #9ae6b4;
}

#backupStatusInfo.error {
    color: #e53e3e;
    background: #fed7d7;
    border-color: #feb2b2;
}

/* 创作者信息样式 */
.creator-info {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.creator-info h3 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.creator-info > p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.creator-contact {
    margin: 15px 0;
}

.creator-contact p {
    margin: 8px 0;
    font-size: 0.9rem;
}

.creator-contact a {
    color: #667eea;
    text-decoration: none;
}

.creator-contact a:hover {
    text-decoration: underline;
}

.creator-bio {
    font-style: italic;
    color: #4a5568;
    line-height: 1.6;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .backup-settings-modal {
        max-width: 95vw;
        margin: 20px auto;
    }
    
    .backup-buttons {
        grid-template-columns: 1fr;
    }
    
    .backup-info, .backup-status, .backup-actions, .backup-guide {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .creator-info {
        padding: 15px;
    }
}

/* 导出下拉菜单 */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 4px;
}

.export-dropdown:hover .export-options {
    display: block;
}

.export-option {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #4a5568;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.export-option:hover {
    background-color: #f7fafc;
    color: #667eea;
}
