/* ===================================
   Countdown Timer - Styles
   =================================== */

/* Timer Container */
.timer-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Timer Display */
.timer-display {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.timer-digits {
    font-size: 5rem;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.timer-digits.running {
    color: var(--primary-color);
}

.timer-digits.finished {
    color: #10b981;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-labels {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Progress Ring */
.progress-ring-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-fill.finished {
    stroke: #10b981;
}

.progress-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-time .time-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--text-primary);
}

.progress-time .time-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Timer Input */
.timer-input-section {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.timer-input-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.timer-inputs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 80px;
    padding: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', monospace;
    transition: border-color var(--transition-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-group input:disabled {
    background-color: var(--background-color);
    cursor: not-allowed;
}

/* Quick Presets */
.quick-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.preset-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--background-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.preset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.preset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-buttons .btn {
    min-width: 120px;
}

/* Sound Toggle */
.sound-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.sound-toggle label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition-fast);
    border-radius: 13px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Timer History */
.timer-history {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.timer-history h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-item {
    padding: 0.5rem 1rem;
    background-color: var(--background-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.no-history {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
    font-size: 0.9rem;
}

/* Timer Complete Overlay */
.timer-complete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.timer-complete-overlay.active {
    opacity: 1;
    visibility: visible;
}

.complete-content {
    background-color: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.complete-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.complete-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.complete-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .timer-digits {
        font-size: 3.5rem;
    }
    
    .timer-labels {
        gap: 2rem;
        font-size: 0.8rem;
    }
    
    .progress-ring-container {
        width: 220px;
        height: 220px;
    }
    
    .progress-time .time-display {
        font-size: 2rem;
    }
    
    .timer-inputs {
        gap: 0.75rem;
    }
    
    .input-group input {
        width: 65px;
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .timer-display {
        padding: 2rem 1rem;
    }
    
    .timer-digits {
        font-size: 2.5rem;
    }
    
    .timer-labels {
        gap: 1.5rem;
        font-size: 0.7rem;
    }
    
    .progress-ring-container {
        width: 180px;
        height: 180px;
    }
    
    .progress-time .time-display {
        font-size: 1.5rem;
    }
    
    .input-group input {
        width: 55px;
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .control-buttons .btn {
        width: 100%;
    }
    
    .complete-content {
        padding: 2rem;
        margin: 1rem;
    }
}
