/* 倒计时工具专用样式 */

/* 模式切换标签 */
.countdown-section {
    display: none;
    margin: 20px 0;
    animation: fadeIn 0.3s ease-in-out;
}

.countdown-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-tab {
    padding: 12px 24px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

.mode-tab:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.mode-tab.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* 时间输入网格 */
.time-input-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.time-input-item {
    text-align: center;
}

.time-input-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

/* 快速设置 */
.quick-set {
    margin: 25px 0;
}

.quick-set h4 {
    margin-bottom: 12px;
    color: #495057;
    font-size: 15px;
}

.quick-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #495057;
}

.quick-btn:hover {
    background: #e7f3ff;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.quick-btn:active {
    transform: translateY(0);
}

/* 倒计时显示区 */
.countdown-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.time-unit {
    text-align: center;
    min-width: 80px;
}

.time-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.time-label {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
    font-weight: 500;
}

.time-separator {
    font-size: 40px;
    font-weight: 700;
    color: #007bff;
    opacity: 0.6;
}

/* 环形进度条 */
.progress-ring {
    position: relative;
    width: 200px;
    height: 200px;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: #007bff;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* 控制按钮 */
.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* 日期倒计时 */
.date-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.input-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preset-events {
    margin: 20px 0;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 8px 16px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: #007bff;
    color: white;
}

.date-countdown-display {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}

.event-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.event-info p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.date-countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.countdown-item {
    text-align: center;
}

.countdown-number {
    display: block;
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.countdown-label {
    font-size: 14px;
    opacity: 0.8;
}

/* 番茄钟 */
.pomodoro-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pomodoro-display {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.pomodoro-status h3 {
    margin: 0 0 10px 0;
    color: #28a745;
}

.pomodoro-status p {
    margin: 0 0 20px 0;
    color: #6c757d;
}

.pomodoro-time {
    font-size: 72px;
    font-weight: bold;
    color: #28a745;
    margin: 20px 0;
}

.pomodoro-progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: #28a745;
    transition: width 0.5s;
}

.pomodoro-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
}

.pomodoro-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* 设置选项 */
.settings-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .time-number {
        font-size: 48px;
    }

    .time-separator {
        font-size: 36px;
    }

    .pomodoro-time {
        font-size: 60px;
    }
}

@media (max-width: 768px) {
    .mode-tabs {
        justify-content: center;
    }

    .mode-tab {
        padding: 10px 18px;
        font-size: 14px;
    }

    .time-input-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .countdown-display {
        flex-direction: column;
        gap: 25px;
        padding: 20px;
    }

    .timer-display {
        gap: 10px;
    }

    .time-unit {
        min-width: 60px;
    }

    .time-number {
        font-size: 40px;
    }

    .time-separator {
        font-size: 30px;
    }

    .progress-ring {
        width: 180px;
        height: 180px;
    }

    .progress-ring-svg {
        width: 180px;
        height: 180px;
    }

    .date-countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .countdown-number {
        font-size: 28px;
    }

    .pomodoro-time {
        font-size: 48px;
    }

    .timer-controls, .pomodoro-controls {
        flex-direction: column;
        width: 100%;
    }

    .timer-controls .btn,
    .pomodoro-controls .btn {
        width: 100%;
    }

    .quick-buttons, .preset-buttons {
        justify-content: center;
    }

    .pomodoro-stats {
        gap: 25px;
    }

    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .time-number {
        font-size: 32px;
    }

    .time-separator {
        font-size: 24px;
    }

    .progress-ring {
        width: 150px;
        height: 150px;
    }

    .progress-ring-svg {
        width: 150px;
        height: 150px;
    }

    .progress-percentage {
        font-size: 20px;
    }

    .countdown-number {
        font-size: 24px;
    }

    .pomodoro-time {
        font-size: 40px;
    }

    .quick-btn, .preset-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
}
