/* 计时器容器 */
.timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* 计时器圆环 */
.timer-circle {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: visible;
}

.timer-circle:hover {
    transform: scale(1.02);
}

.timer-progress {
    position: absolute;
    top: -15px;
    left: -15px;
    width: calc(100% + 30px);
    height: calc(100% + 30px);
    transform: rotate(-90deg);
}

.timer-progress svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.timer-path-elapsed {
    stroke: var(--timer-elapsed-color);
    stroke-width: 6px;
    fill: none;
}

.timer-path-remaining {
    stroke: var(--primary-color);
    stroke-width: 8px;
    stroke-linecap: round;
    fill: none;
    transform-origin: center;
    transition: stroke 0.3s ease, stroke-dashoffset 0.3s ease;
    stroke-dasharray: 301.59;
    stroke-dashoffset: 0;
}

.timer-display {
    font-size: 5.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 2;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Rounded', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.1;
    width: 100%;
    border-radius: 10px;
}

.timer-label {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-top: 12px;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 2;
}

/* 计时器控制按钮 */
.timer-controls {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.btn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 14px;
    padding: 12px 28px;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover {
    background-color: var(--btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    background-color: var(--btn-active-bg);
    transform: translateY(0);
}

#startBtn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 32px;
    font-weight: 600;
}

#startBtn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#pauseBtn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 32px;
    font-weight: 600;
    opacity: 0.9;
}

#pauseBtn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

#resetBtn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
}

/* 模式选择按钮 */
.mode-selection {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.mode-btn {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border: none;
    border-radius: 14px;
    padding: 10px 20px;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.mode-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mode-btn:hover {
    background-color: var(--btn-hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.mode-btn:hover::after {
    opacity: 1;
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 90, 90, 0.2);
}

#shortBreakModeBtn.active, 
#longBreakModeBtn.active {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(61, 213, 152, 0.2);
}

/* 简洁模式下的计时器 */
body.minimized .timer-container {
    margin: 0;
    padding: 0;
}

body.minimized .timer-circle {
    width: 480px;
    height: 480px;
    margin-bottom: 0;
}

body.minimized .timer-display {
    font-size: 6rem;
}

body.minimized .timer-controls,
body.minimized .mode-selection {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

@media (max-width: 480px) {
    .timer-circle {
        width: 300px;
        height: 300px;
        margin-bottom: 20px;
    }
    
    .timer-display {
        font-size: 4rem;
        font-weight: 600;
    }
    
    body.minimized .timer-circle {
        width: 350px;
        height: 350px;
    }
    
    body.minimized .timer-display {
        font-size: 4.5rem;
    }
    
    .timer-controls {
        flex-direction: row;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .mode-selection {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .mode-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* 更小屏幕的设备 */
@media (max-width: 360px) {
    .timer-circle {
        width: 260px;
        height: 260px;
    }
    
    .timer-display {
        font-size: 3.5rem;
    }
    
    body.minimized .timer-circle {
        width: 280px;
        height: 280px;
    }
    
    body.minimized .timer-display {
        font-size: 3.8rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

