/* ===== 래퍼 ===== */
.real-time-clock-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ===== 모드 탭 ===== */
.mode-tabs {
    display: flex;
    gap: 8px;
    background: #F5F5F5;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-tab svg {
    width: 20px;
    height: 20px;
}

.mode-tab:hover {
    color: #319C80;
    background: rgba(49, 156, 128, 0.1);
}

.mode-tab.active {
    background: #319C80;
    color: #fff;
}

/* ===== 모드 콘텐츠 ===== */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* ===== 시계 섹션 ===== */
.clock-section {
    background: #fff;
    border: 1px solid #E0E0E0;
    border-radius: 16px;
    padding: 32px;
}

/* ===== 메인 시계 카드 ===== */
.main-clock-card {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #319C80 0%, #26856c 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.clock-timezone-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.clock-time {
    font-size: 64px;
    font-weight: 700;
    color: #fff;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 12px;
}

.clock-date {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 시계 설정 ===== */
.clock-settings {
    background: #F9F9F9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.setting-row {
    margin-bottom: 16px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.setting-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: #319C80;
}

.inline-settings {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.setting-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.setting-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: #319C80;
    cursor: pointer;
}

/* ===== 세계 시간 ===== */
.section-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.world-clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.world-clock-item {
    background: #F9F9F9;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.world-clock-item:hover {
    border-color: #319C80;
    background: #F0FAF7;
}

.world-clock-city {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.world-clock-time {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto Mono', 'Consolas', monospace;
}

.world-clock-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.world-clock-diff {
    font-size: 11px;
    color: #319C80;
    margin-top: 4px;
}

/* ===== 타이머 섹션 ===== */
.timer-display-card {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.timer-display {
    font-size: 72px;
    font-weight: 700;
    color: #fff;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    letter-spacing: 2px;
    line-height: 1;
}

.timer-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-top: 20px;
    overflow: hidden;
}

.timer-progress {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    width: 100%;
    transition: width 0.1s linear;
}

/* ===== 타이머 설정 ===== */
.timer-setup {
    background: #F9F9F9;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.timer-inputs {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.timer-input-group {
    text-align: center;
}

.timer-input-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.timer-input-group input {
    width: 80px;
    padding: 12px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    font-family: 'Roboto Mono', 'Consolas', monospace;
}

.timer-input-group input:focus {
    outline: none;
    border-color: #319C80;
}

.timer-separator {
    font-size: 32px;
    font-weight: 600;
    color: #666;
    padding-bottom: 8px;
}

.timer-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.timer-preset-btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #fff;
    border: 1px solid #D0D0D0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-preset-btn:hover {
    color: #319C80;
    border-color: #319C80;
    background: #F0FAF7;
}

/* ===== 타이머/스톱워치 컨트롤 ===== */
.timer-controls,
.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.timer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn svg {
    width: 20px;
    height: 20px;
}

.timer-btn.start-btn {
    background: #319C80;
    color: #fff;
}

.timer-btn.start-btn:hover {
    background: #28816c;
}

.timer-btn.pause-btn {
    background: #FF9800;
    color: #fff;
}

.timer-btn.pause-btn:hover {
    background: #F57C00;
}

.timer-btn.lap-btn {
    background: #2196F3;
    color: #fff;
}

.timer-btn.lap-btn:hover:not(:disabled) {
    background: #1976D2;
}

.timer-btn.lap-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.timer-btn.reset-btn {
    background: #F5F5F5;
    color: #666;
}

.timer-btn.reset-btn:hover {
    background: #E0E0E0;
}

/* ===== 스톱워치 섹션 ===== */
.stopwatch-display-card {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    border-radius: 16px;
    margin-bottom: 24px;
}

.stopwatch-display {
    font-size: 72px;
    font-weight: 700;
    color: #fff;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    letter-spacing: 2px;
    line-height: 1;
    display: inline;
}

.stopwatch-ms {
    font-size: 36px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Roboto Mono', 'Consolas', monospace;
    display: inline;
}

/* ===== 랩 기록 ===== */
.lap-records {
    margin-top: 24px;
    background: #F9F9F9;
    border-radius: 12px;
    padding: 20px;
}

.lap-list {
    max-height: 300px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
}

.lap-item:last-child {
    margin-bottom: 0;
}

.lap-number {
    font-size: 14px;
    font-weight: 600;
    color: #319C80;
}

.lap-time {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto Mono', 'Consolas', monospace;
}

.lap-diff {
    font-size: 13px;
    color: #666;
    font-family: 'Roboto Mono', 'Consolas', monospace;
}

/* ===== 타이머 완료 알림 ===== */
.timer-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.timer-alert-overlay.show {
    display: flex;
}

.timer-alert {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    animation: alertBounce 0.3s ease;
}

@keyframes alertBounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.timer-alert-icon {
    width: 80px;
    height: 80px;
    background: #FFF3E0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.timer-alert-icon svg {
    width: 40px;
    height: 40px;
    color: #FF9800;
}

.timer-alert-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.timer-alert-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.timer-alert-btn {
    padding: 14px 48px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #319C80;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.timer-alert-btn:hover {
    background: #28816c;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .real-time-clock-wrapper {
        padding: 0 16px 30px;
    }

    .clock-section {
        padding: 24px 16px;
    }

    .main-clock-card {
        padding: 30px 16px;
    }

    .clock-time {
        font-size: 48px;
    }

    .clock-date {
        font-size: 14px;
    }

    .timer-display,
    .stopwatch-display {
        font-size: 48px;
    }

    .stopwatch-ms {
        font-size: 24px;
    }

    .timer-input-group input {
        width: 60px;
        font-size: 20px;
        padding: 10px;
    }

    .timer-separator {
        font-size: 24px;
    }

    .timer-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .inline-settings {
        gap: 16px;
    }

    .world-clocks-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .world-clock-time {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .mode-tab {
        padding: 12px 14px;
        font-size: 13px;
    }

    .mode-tab svg {
        width: 18px;
        height: 18px;
    }

    .clock-time {
        font-size: 40px;
    }

    .timer-display,
    .stopwatch-display {
        font-size: 40px;
    }

    .stopwatch-ms {
        font-size: 20px;
    }

    .timer-inputs {
        gap: 4px;
    }

    .timer-input-group input {
        width: 50px;
        font-size: 18px;
        padding: 8px;
    }

    .timer-separator {
        font-size: 20px;
    }

    .timer-presets {
        gap: 6px;
    }

    .timer-preset-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .timer-controls,
    .stopwatch-controls {
        gap: 8px;
    }

    .timer-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .world-clocks-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .world-clock-item {
        padding: 12px;
    }

    .world-clock-time {
        font-size: 18px;
    }

    .inline-settings {
        flex-direction: column;
        gap: 12px;
    }
}
