/* Stopwatch specific styles */
.stopwatch-container {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    min-height: 100vh;
    transition: background 0.3s ease;
}

.stopwatch-container.warning {
    background: linear-gradient(135deg, #e74c3c 0%, #232526 100%);
    animation: backgroundPulse 1s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { background: linear-gradient(135deg, #e74c3c 0%, #232526 100%); }
    100% { background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); }
}

.stopwatch-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.timer-setup {
    max-width: 500px;
    width: 100%;
}

.timer-display {
    max-width: 400px;
    width: 100%;
    text-align: center;
    color: #f1f1f1;
}

.time-input-section {
    margin-bottom: 30px;
}

.custom-time {
    margin-bottom: 25px;
}

.custom-time label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #a3a3ff;
    text-align: center;
}

.time-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

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

.time-group input {
    width: 80px;
    height: 60px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    border: 3px solid #a3a3ff;
    border-radius: 10px;
    background: #181818;
    color: #f1f1f1;
    transition: all 0.3s ease;
}

.time-group input:focus {
    outline: none;
    border-color: #a3a3ff;
    background: #232526;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-group label {
    font-size: 0.9rem;
    color: #a3a3ff;
    margin-top: 5px;
}

.time-separator {
    font-size: 2rem;
    font-weight: bold;
    color: #a3a3ff;
    margin: 0 10px;
}

.preset-times label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: #a3a3ff;
    text-align: center;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.preset-btn {
    padding: 12px 16px;
    border: 2px solid #a3a3ff;
    background: #232526;
    color: #a3a3ff;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover,
.preset-btn.active {
    background: #a3a3ff;
    color: #232526;
}

.btn {
    padding: 12px 16px;
    border: 2px solid #a3a3ff;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #232526;
    color: #a3a3ff;
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.2rem;
    font-weight: bold;
}

.btn-success {
    background: #a3a3ff;
    color: #232526;
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.1em;
    color: #a3a3ff;
}

.btn-mulai:hover {
    background: #a3a3ff;
    color: #232526;
}

/* Timer Circle Styles */
.timer-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    /* background: #232526; */
}

.timer-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(163, 163, 255, 0.2);
    stroke-width: 8;
}

.circle-progress {
    fill: none;
    stroke: #a3a3ff;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48; /* 2 * π * 90 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.circle-progress.warning {
    stroke: #ff9800;
}

.circle-progress.danger {
    stroke: #f44336;
    animation: circlePulse 0.5s ease-in-out infinite alternate;
}

@keyframes circlePulse {
    0% { stroke-width: 8; }
    100% { stroke-width: 12; }
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #f1f1f1;
}

.time-display {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #a3a3ff;
}

.timer-status {
    font-size: 1.2rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a3a3ff;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.timer-controls .btn {
    min-width: 100px;
    background: #232526;
    color: #a3a3ff;
    border: 2px solid #a3a3ff;
}

.controls-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* Flash overlay for final countdown */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(163, 163, 255, 0.8);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.flash-overlay.flash {
    opacity: 1;
    animation: flashEffect 0.2s ease-in-out;
}

@keyframes flashEffect {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Completion animation */
.completion-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    text-align: center;
    color: #a3a3ff;
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    animation: completionBounce 2s ease-in-out;
}

@keyframes completionBounce {
    0% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .stopwatch-content {
        padding: 20px;
    }
    
    .timer-circle-container {
        width: 250px;
        height: 250px;
        background: #232526;
    }
    
    .time-display {
        font-size: 2.5rem;
    }
    
    .time-group input {
        width: 60px;
        height: 50px;
        font-size: 1.5rem;
        background: #181818;
        color: #f1f1f1;
        border: 2px solid #a3a3ff;
    }
    
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timer-controls {
        gap: 10px;
    }
    
    .timer-controls .btn {
        min-width: 80px;
        padding: 10px 15px;
        font-size: 0.9rem;
        background: #232526;
        color: #a3a3ff;
        border: 2px solid #a3a3ff;
    }
    
    .btn-large {
        padding: 15px 30px;
        font-size: 1.1rem;
        background: #232526;
        color: #a3a3ff;
        border: 2px solid #a3a3ff;
    }
}

/* Animation for timer start */
.timer-start-animation {
    animation: timerStart 0.5s ease-out;
}

@keyframes timerStart {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pause state styling */
.timer-paused .circle-progress {
    animation: pausedPulse 1s ease-in-out infinite alternate;
}

@keyframes pausedPulse {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

