/* ===== 모달 관련 스타일들 ===== */

/* 목표 설정 모달 스타일 */
.goal-modal-content {
    max-width: 500px;
    width: 90%;
}

.goal-presets {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.preset-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    color: #d97706;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.preset-btn:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.form-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(103, 126, 234, 0.1);
    backdrop-filter: blur(15px);
}

/* ===== 상세보기 모달 스타일 ===== */
.detail-records {
    padding: 20px 0;
}

.record-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(103, 126, 234, 0.1);
    transition: all 0.2s ease;
    align-items: center;
}

.record-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(103, 126, 234, 0.2);
    transform: translateX(3px);
}

.delete-record-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.delete-record-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.05);
}

.record-index {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    background: rgba(103, 126, 234, 0.1);
    padding: 4px 10px;
    border-radius: 8px;
    height: fit-content;
}

.record-details {
    flex: 1;
}

.record-verse {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.record-chapters {
    font-size: 13px;
    color: #718096;
    background: rgba(236, 72, 153, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.no-records-msg {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* 팝오버 스타일 */
.modal.popover-style {
    position: absolute;
    background: transparent;
    backdrop-filter: none;
    width: auto;
    height: auto;
    overflow: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    height: auto;
    max-height: 70vh;
    box-shadow:
        0 20px 40px rgba(103, 126, 234, 0.15),
        0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* 팝오버 스타일의 모달 콘텐츠 */
.modal.popover-style .modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    margin: 0;
    width: 480px;
    max-width: 90vw;
    min-height: auto !important;
    max-height: 70vh !important;
    border-radius: 12px;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.18),
        0 6px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.9);
    animation: popoverSlideIn 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease;
}

/* 팝오버에서도 footer 스타일 적용 */
.modal.popover-style .modal-footer {
    border-radius: 0 0 12px 12px;
    padding: 16px 20px;
}

.modal.popover-style .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
}

/* 말풍선 화살표 */
.modal.popover-style .modal-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 255, 255, 0.98);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
    transition: left 0.3s ease;
}

/* 화살표가 아래쪽에 위치할 때 (모달이 셀 위에 있을 때) */
.modal.popover-style .modal-content.arrow-bottom::before {
    top: auto;
    bottom: -8px;
    border-bottom: none;
    border-top: 8px solid rgba(255, 255, 255, 0.98);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes popoverSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    cursor: move;
    user-select: none;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 모달 컨트롤 영역 */
.modal-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modal-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 크기 조절 핸들 */
.resize-handle {
    position: absolute;
    background: rgba(103, 126, 234, 0.4);
    border: 1px solid rgba(103, 126, 234, 0.6);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.resize-handle-se {
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
    border-radius: 0 0 24px 0;
    background-image:
        linear-gradient(135deg, transparent 30%, rgba(103, 126, 234, 0.7) 30%, rgba(103, 126, 234, 0.7) 35%, transparent 35%),
        linear-gradient(135deg, transparent 60%, rgba(103, 126, 234, 0.7) 60%, rgba(103, 126, 234, 0.7) 65%, transparent 65%);
}

.resize-handle:hover,
.resize-handle:active {
    background-color: rgba(103, 126, 234, 0.6);
    border-color: rgba(103, 126, 234, 0.8);
    transform: scale(1.1);
}

/* 모달이 리사이징 중일 때 */
.modal-content.resizing {
    transition: none !important;
}

/* 모달이 드래그 중일 때 */
.modal-content.dragging {
    transition: none !important;
    opacity: 0.6;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 10px 24px 12px;
    border-top: 1px solid rgba(103, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

/* 데스크톱에서 폼을 가로 레이아웃으로 */
@media (min-width: 768px) {
    .modal-body {
        padding: 16px 24px;
        max-height: 50vh;
        min-height: auto;
    }

    .form-container {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 20px;
        align-items: start;
        flex: 1;
    }

    /* 데스크톱에서 폼 그룹 여백 더 줄이기 */
    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        margin-bottom: 6px;
    }

    /* 데스크톱에서 버튼 영역 여백 제거 */
    .modal-actions {
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group.input-mode-group {
        grid-column: 1 / -1;
        margin-bottom: 16px;
    }

    /* 데스크톱에서 일반 모달(팝오버가 아닌)일 때만 flexbox 적용 */
    .modal:not(.popover-style) .modal-content {
        display: flex;
        flex-direction: column;
        height: auto;
        max-height: 85vh;
    }

    /* 데스크톱에서 modal-body 스크롤 설정 */
    .modal:not(.popover-style) .modal-body {
        max-height: calc(85vh - 120px); /* 헤더와 footer 높이 제외 */
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    /* 모달 푸터 스타일 개선 */
    .modal-footer {
        padding: 20px 32px 24px;
        border-top: 1px solid rgba(103, 126, 234, 0.15);
    }
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(103, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
    background: white;
}

.help-text {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.example {
    margin-top: 4px;
    padding: 6px 10px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.submit-btn, .add-btn{
    flex: 2;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.submit-btn::before {
    content: "📅 ";
}

.add-btn::before {
    content: "➕ ";
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-btn {
    flex: 1;
    padding: 14px 20px;
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 2px solid rgba(107, 114, 128, 0.2);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
    border-color: rgba(107, 114, 128, 0.3);
    transform: translateY(-1px);
}

/* 장수 입력 그룹 스타일 */
.chapter-count-input-group {
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
}

.chapter-count-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chapter-count-row input[type="number"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.chapter-count-row input[type="number"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    background: white;
}

.help-icon {
    font-size: 16px;
    color: #f59e0b;
    cursor: help;
    flex-shrink: 0;
}

.toggle-btn.chapter-mode {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.toggle-btn.chapter-mode.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.toggle-btn.chapter-mode:hover:not(.active) {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.05);
}

/* 입력 방식 범례 스타일 */
.input-mode-legend {
    margin-bottom: 20px;
}

.mode-legend {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: rgba(103, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(103, 126, 234, 0.1);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.legend-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.legend-icon.text-mode {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.legend-icon.dropdown-mode {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* 입력 헤더 및 토글 버튼 스타일 */
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.mode-toggle {
    display: flex;
    gap: 4px;
}

.toggle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.toggle-btn.text-mode {
    border-color: #10b981;
}

.toggle-btn.dropdown-mode {
    border-color: #3b82f6;
}

.toggle-btn.active.text-mode {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.toggle-btn.active.dropdown-mode {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.toggle-btn:hover:not(.active) {
    background: rgba(107, 114, 128, 0.2);
    transform: scale(1.05);
}

.input-content {
    transition: all 0.3s ease;
}

/* 드롭다운 스타일 */
.dropdown-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dropdown-row select {
    padding: 12px 16px;
    border: 2px solid rgba(103, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    min-width: 120px;
    cursor: pointer;
}

.dropdown-row select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
    background: white;
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        max-width: 320px;
        min-width: 280px;
        margin: 5% auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        max-height: 70vh;
        min-height: auto;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* 모바일에서 크기 조절 버튼 숨기기 */
    #toggleSizeBtn {
        display: none !important;
    }

    /* 모바일에서 크기 조절 핸들 숨기기 */
    .resize-handle {
        display: none !important;
    }

    /* 모바일에서 팝오버 스타일도 적절한 크기로 조정 */
    .modal.popover-style .modal-content {
        position: fixed !important;
        margin: 0 !important;
        width: 90% !important;
        max-width: 320px !important;
        min-width: 280px !important;
        max-height: 70vh !important;
        min-height: auto !important;
    }

    .modal-body {
        padding: 16px 18px 8px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
        max-height: calc(70vh - 100px); /* 헤더와 footer 높이 제외 */
    }

    .modal-footer {
        padding: 8px 18px 12px !important;
        flex-shrink: 0;
    }

    .mode-legend {
        gap: 12px !important;
        padding: 8px 10px !important;
        flex-direction: row !important;
        justify-content: center !important;
    }

    .legend-item {
        font-size: 12px !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .legend-icon {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
    }

    .toggle-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }

    .dropdown-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
    }

    .dropdown-row select {
        min-width: 80px !important;
        font-size: 13px !important;
    }

    .form-group {
        margin-bottom: 10px !important;
    }

    .form-group label {
        font-size: 13px !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }

    .form-group input[type="text"],
    .form-group input[type="date"] {
        font-size: 13px !important;
        padding: 9px 10px !important;
        line-height: 1.4 !important;
    }

    .form-control {
        font-size: 13px !important;
        padding: 9px 10px !important;
    }

    .help-text {
        font-size: 11px !important;
        line-height: 1.3 !important;
        margin-top: 2px !important;
        padding: 0 !important;
    }

    .example {
        font-size: 10px !important;
        padding: 3px 4px !important;
        margin-top: 1px !important;
        line-height: 1.2 !important;
    }

    /* 이모지가 포함된 텍스트 줄 간격 조정 */
    .help-text,
    .example,
    .modal-header h3 {
        letter-spacing: -0.3px !important;
    }

    /* 모바일에서 placeholder 텍스트 조정 */
    #modal_start_verse::placeholder,
    #modal_end_verse::placeholder {
        font-size: 12px !important;
        color: #999 !important;
        opacity: 0.8 !important;
    }

    /* 긴 텍스트가 포함된 help-text 개선 */
    .help-text {
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
    }

    .modal-actions {
        margin-top: 0 !important;
        padding-top: 0 !important;
        gap: 10px !important;
    }

    .submit-btn, .cancel-btn {
        font-size: 13px !important;
        padding: 8px 12px !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
    }

    .modal-header {
        padding: 10px 16px !important;
    }

    .modal-header h3 {
        font-size: 16px !important;
        line-height: 1.3 !important;
        word-break: keep-all !important;
    }

    .modal-control-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }

    /* 입력 헤더 개선 */
    .input-header {
        margin-bottom: 6px !important;
    }

    .input-header label {
        font-size: 12px !important;
        font-weight: 600 !important;
        word-break: keep-all !important;
    }

    .server-time-info {
        font-size: 11px;
        padding: 6px 12px;
    }

    .storage-info {
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* 매우 작은 화면을 위한 설정 */
@media (max-width: 360px) {
    .modal-content {
        width: 95% !important;
        max-width: 300px !important;
        min-width: 260px !important;
    }

    .mode-legend {
        gap: 8px !important;
        padding: 6px 8px !important;
        flex-direction: row !important;
        justify-content: center !important;
    }

    .legend-item {
        font-size: 11px !important;
        padding: 0 !important;
    }

    .legend-icon {
        width: 16px !important;
        height: 16px !important;
        font-size: 9px !important;
    }

    .toggle-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }

    .dropdown-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .dropdown-row select {
        width: 100% !important;
        min-width: auto !important;
        font-size: 12px !important;
        padding: 8px 10px !important;
    }

    .form-group {
        margin-bottom: 8px !important;
    }

    .form-group label {
        font-size: 11px !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }

    .form-group input {
        font-size: 12px !important;
        padding: 8px 10px !important;
        line-height: 1.3 !important;
    }

    .help-text {
        font-size: 10px !important;
        line-height: 1.2 !important;
        margin-top: 1px !important;
        padding: 0 !important;
    }

    .example {
        font-size: 9px !important;
        padding: 2px 3px !important;
        margin-top: 1px !important;
        line-height: 1.1 !important;
    }

    .modal-actions {
        flex-direction: row !important;
        gap: 8px !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .modal-body {
        padding: 12px 14px 8px !important;
        max-height: calc(70vh - 110px) !important;
    }

    .modal-footer {
        padding: 6px 14px 10px !important;
        flex-shrink: 0;
    }

    .modal-header {
        padding: 8px 14px !important;
    }

    .modal-header h3 {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    .submit-btn, .cancel-btn {
        flex: 1 !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
        line-height: 1.1 !important;
        letter-spacing: -0.2px !important;
    }

    /* 매우 작은 화면에서 placeholder 더 간단히 */
    #modal_start_verse::placeholder,
    #modal_end_verse::placeholder {
        font-size: 11px !important;
        opacity: 0.7 !important;
    }

    /* 텍스트 가독성 최적화 */
    .help-text {
        word-break: keep-all !important;
        overflow-wrap: break-word !important;
    }
}

/* ===== 로그아웃 확인 모달 스타일 ===== */
.logout-modal-content {
    max-width: 420px;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    animation: logoutModalFadeIn 0.3s ease-out;
}

@keyframes logoutModalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.logout-modal-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-message {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    margin: 0 0 12px 0;
}

.logout-info {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.logout-confirm-btn {
    flex: 2;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.logout-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .logout-modal-content {
        width: 90%;
        max-width: 320px;
    }

    .logout-modal-title {
        font-size: 16px;
    }

    .logout-message {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .logout-info {
        font-size: 12px;
    }

    .logout-confirm-btn {
        font-size: 13px;
        padding: 10px 18px;
    }
}

@media (max-width: 360px) {
    .logout-modal-content {
        width: 95%;
        max-width: 300px;
    }

    .logout-modal-title {
        font-size: 14px;
    }

    .logout-message {
        font-size: 13px;
    }

    .logout-info {
        font-size: 11px;
    }

    .logout-confirm-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* ===== 년월 선택 모달 스타일 ===== */
.month-year-picker-modal {
    max-width: 500px;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    animation: monthYearModalFadeIn 0.3s ease-out;
}

.month-year-picker-modal .modal-body {
    overflow: hidden;
    max-height: none;
}

@keyframes monthYearModalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.picker-view {
    padding: 20px 0;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.view-header .nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
    min-width: 50px;
}

.view-header .nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(103, 126, 234, 0.4);
}

.view-header .nav-btn:active {
    transform: translateY(0);
}

.view-title {
    flex: 1;
    background: rgba(103, 126, 234, 0.1);
    border: 2px solid rgba(103, 126, 234, 0.2);
    color: #667eea;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
}

.view-title:hover {
    background: rgba(103, 126, 234, 0.2);
    border-color: rgba(103, 126, 234, 0.4);
    transform: scale(1.02);
}

.month-grid,
.year-grid,
.decade-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;

    /* 스크롤바 스타일링 */
    scrollbar-width: thin;
    scrollbar-color: #667eea #f3f4f6;
}

.month-grid::-webkit-scrollbar,
.year-grid::-webkit-scrollbar,
.decade-grid::-webkit-scrollbar {
    width: 8px;
}

.month-grid::-webkit-scrollbar-track,
.year-grid::-webkit-scrollbar-track,
.decade-grid::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.month-grid::-webkit-scrollbar-thumb,
.year-grid::-webkit-scrollbar-thumb,
.decade-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.month-grid::-webkit-scrollbar-thumb:hover,
.year-grid::-webkit-scrollbar-thumb:hover,
.decade-grid::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.month-btn,
.year-btn,
.decade-btn {
    background: rgba(103, 126, 234, 0.1);
    border: none;
    color: #667eea;
    padding: 16px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.month-btn:hover,
.year-btn:hover,
.decade-btn:hover {
    background: rgba(103, 126, 234, 0.2);
    border-color: rgba(103, 126, 234, 0.4);
    transform: translateY(-2px);
}

.month-btn.current,
.year-btn.current,
.decade-btn.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(103, 126, 234, 0.3);
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    .month-year-picker-modal {
        width: 90%;
        max-width: 360px;
    }

    .picker-view {
        padding: 12px 0;
    }

    .view-header {
        margin-bottom: 12px;
        gap: 8px;
    }

    .month-grid,
    .year-grid,
    .decade-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        max-height: 350px;
    }

    .month-btn,
    .year-btn,
    .decade-btn {
        padding: 10px 6px;
        font-size: 12px;
    }

    .view-title {
        font-size: 16px;
        padding: 6px 12px;
    }

    .view-header .nav-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
    }
}

@media (max-width: 360px) {
    .month-year-picker-modal {
        width: 95%;
        max-width: 320px;
    }

    .picker-view {
        padding: 10px 0;
    }

    .view-header {
        margin-bottom: 10px;
        gap: 6px;
    }

    .month-grid,
    .year-grid,
    .decade-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        max-height: 300px;
    }

    .month-btn,
    .year-btn,
    .decade-btn {
        padding: 8px 4px;
        font-size: 11px;
    }

    .view-title {
        font-size: 14px;
        padding: 5px 10px;
    }

    .view-header .nav-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-width: 32px;
    }
}