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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5;
    color: #2c3e50;
    padding: 20px;
}

#pre-focus, #focus-content, #history-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

/* 设置区域样式 */
.settings-container {
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.settings-section {
    flex: 1 1 280px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.setting-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-item input[type="number"], 
.setting-item select {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.setting-item select {
    width: 120px;
}

.setting-item label {
    font-size: 16px;
    color: #34495e;
}

/* 按钮样式 */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
}

.primary-button {
    background-color: #3498db;
    color: white;
}

.primary-button:hover {
    background-color: #2980b9;
}

#viewHistory, #backToMain, #downloadImage {
    background-color: #95a5a6;
    color: white;
}

#viewHistory:hover, #backToMain:hover, #downloadImage:hover {
    background-color: #7f8c8d;
}

#endFocus {
    background-color: #e74c3c;
    color: white;
}

#endFocus:hover {
    background-color: #c0392b;
}

/* 专注模式样式 */
.focus-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.time-display .current-time {
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
}

.time-display .focus-duration {
    font-size: 24px;
    color: #7f8c8d;
    margin-top: 10px;
}

.pomodoro-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pomodoro-timer {
    font-size: 48px;
    font-weight: bold;
    color: #2c3e50;
}

.pomodoro-status {
    font-size: 24px;
    color: #7f8c8d;
}

.pomodoro-rounds {
    font-size: 18px;
    color: #95a5a6;
}

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

.target-countdown {
    font-size: 24px;
    color: #7f8c8d;
}

.focus-main {
    margin: 30px 0;
    text-align: center;
}

.switch-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.switch-count {
    font-size: 20px;
    color: #34495e;
}

.current-switch {
    font-size: 20px;
    color: #34495e;
}

.warning-message {
    background-color: #f39c12;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.warning-message h2 {
    color: white;
    margin-bottom: 10px;
}

.focus-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 番茄钟重设面板 */
.pomodoro-reset-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* 历史记录样式 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.history-actions {
    display: flex;
    gap: 15px;
}

.history-list {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 15px;
}

.history-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.history-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: left;
}

.history-item p {
    margin: 8px 0;
    color: #34495e;
}

.pomodoro-records, .switch-records {
    margin-top: 15px;
}

.pomodoro-records h4, .switch-records h4 {
    color: #2c3e50;
    margin: 10px 0;
    text-align: left;
}

.pomodoro-record, .switch-record {
    font-size: 14px;
    color: #7f8c8d;
    margin: 5px 0;
    padding: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

.switch-record.break {
    background-color: #e8f6f3;
}

/* 通用样式 */
.hidden {
    display: none !important;
}

/* 强制轮数显示隐藏 */
.pomodoro-rounds-setting, #pomodoroRounds {
    display: none !important;
}

/* 全屏模式样式 */
body.fullscreen-active {
    padding: 0;
    background-color: white;
}

body.fullscreen-active #focus-content {
    max-width: none;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}