/* ===== Pomodoro 타이머 스타일 ===== */

#pomodoro-timer {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    color: #4E73DF;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding: 2rem 0;
}

/* 원형 프로그레스 링 */
.timer-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem;
}

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

.progress-ring-circle {
    stroke: #e9ecef;
    fill: transparent;
    stroke-width: 8;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-ring-active {
    stroke: #4E73DF;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

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

#pomodoro-timer {
    font-size: 4rem;
    margin: 0;
    line-height: 1;
    transition: all 0.2s ease;
}

.timer-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 버튼 그룹 */
.btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

#start-pomodoro,
#pause-pomodoro,
#reset-pomodoro {
    flex: 1;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    max-width: 140px;
}

#start-pomodoro {
    background: linear-gradient(135deg, #1cc88a 0%, #17a673 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(28, 200, 138, 0.3);
}

#start-pomodoro:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 200, 138, 0.4);
}

#start-pomodoro:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pause-pomodoro {
    background: linear-gradient(135deg, #F6C23E 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(246, 194, 62, 0.3);
}

#pause-pomodoro:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 194, 62, 0.4);
}

#pause-pomodoro:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#reset-pomodoro {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

#reset-pomodoro:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* 모달 헤더 개선 */
#pomodoroModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

#pomodoroModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#pomodoroModal .modal-body {
    padding: 2rem 1.5rem;
    background: #fafafa;
}

/* 단축키 힌트 (데스크톱) */
.keyboard-hint {
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.keyboard-hint kbd {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* ===== 모바일 최적화 ===== */
@media (max-width: 767px) {
    .timer-container {
        width: 240px;
        height: 240px;
        margin-bottom: 1.5rem;
    }

    #pomodoro-timer {
        font-size: 3rem;
    }

    .timer-label {
        font-size: 0.8rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    #start-pomodoro,
    #pause-pomodoro,
    #reset-pomodoro {
        max-width: 100%;
        width: 100%;
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    #pomodoroModal .modal-header {
        padding: 1.25rem;
    }

    #pomodoroModal .modal-title {
        font-size: 1.1rem;
    }

    #pomodoroModal .modal-body {
        padding: 1.5rem 1rem;
    }

    .keyboard-hint {
        display: none;
    }

    /* 하단 시트 스타일 */
    #pomodoroModal.mobile-sheet .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    #pomodoroModal.mobile-sheet .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
    }

    #pomodoroModal.mobile-sheet .modal-header {
        border-radius: 20px 20px 0 0;
        position: relative;
    }

    #pomodoroModal.mobile-sheet .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255,255,255,0.5);
        border-radius: 2px;
    }
}

@media (max-width: 480px) {
    .timer-container {
        width: 200px;
        height: 200px;
    }

    #pomodoro-timer {
        font-size: 2.5rem;
    }

    .timer-label {
        font-size: 0.75rem;
    }

    #start-pomodoro,
    #pause-pomodoro,
    #reset-pomodoro {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===== 애니메이션 ===== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.timer-running #pomodoro-timer {
    animation: pulse 2s ease-in-out infinite;
}

/* ===== 다크 모드 지원 (선택사항) ===== */
@media (prefers-color-scheme: dark) {
    #pomodoroModal .modal-body {
        background: #2c3e50;
    }

    #pomodoro-timer {
        color: #667eea;
    }

    .timer-label {
        color: #adb5bd;
    }

    .progress-ring-circle {
        stroke: #495057;
    }
}