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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 容器样式 */
.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* 表单样式 */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
}

/* 输入框样式 */
input[type="number"] {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    max-width: 200px;
}

/* 单选按钮组样式 */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* 按钮基础样式 */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex: 1;
}

.btn:active {
    transform: translateY(1px);
}

/* 主要按钮样式 */
.btn.primary {
    background-color: #3498db;
    color: white;
}

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

/* 次要按钮样式 */
.btn.secondary {
    background-color: #95a5a6;
    color: white;
}

.btn.secondary:hover {
    background-color: #7f8c8d;
}

/* 专注页面样式 */
.focus-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
}

.focus-container.fullscreen {
    padding: 0;
}

.time-display {
    font-size: 4rem;
    font-weight: bold;
    margin: 1rem 0;
}

.actual-time {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.current-time {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: #bdc3c7;
}

/* 控制按钮样式 */
.control-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn.pause {
    background-color: #3498db;
}

.btn.end {
    background-color: #e74c3c;
}

.btn.tool {
    background-color: #ffffff;
}

.btn.tool:hover {
    background-color: #c0c0c0;
}

.btn.pause:hover {
    background-color: #2980b9;
}

.btn.end:hover {
    background-color: #c0392b;
}

/* 通知弹窗样式 */
.focus-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    transform: translateY(-150%);
    transition: all 0.3s ease;
    z-index: 999;
}

.focus-notification.show {
    transform: translateY(0);
}

/* 全屏按钮样式 */
.fullscreen-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
}

.fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 历史记录页面样式 */
.history-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background-color: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.history-item:hover {
    background-color: #f8f9fa;
}

/* 进度条容器样式 */
.progress-container {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 进度轨道样式 */
.progress-track {
    position: relative;
    height: 24px;
    background-color: #eee;
    border-radius: 4px;
    margin: 4px 0;
}

/* 进度段样式 */
.progress-segment {
    position: absolute;
    height: 100%;
    border-radius: 4px;
}

.segment-focus {
    background-color: #2ecc71;
}

.segment-pause {
    background-color: #f1c40f;
}

.segment-screen {
    background-color: #eee;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
    }

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

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

    .actual-time {
        font-size: 1.5rem;
    }

    .current-time {
        font-size: 1.2rem;
    }
}

.tool-iframe-container {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  transition: left 0.3s ease-in-out;
  z-index: 1000;
}

.tool-iframe-container.show {
  left: 0;
}

.tool-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hide1 {
    display: none;
}

a {
    text-decoration: none;
    color: #3498db;
}
