/*
 * 공통 모달 프리미엄 디자인
 * 투명도와 블러 효과를 활용한 모던한 UI 스타일
 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* 깊이감 있는 다크 네이비 투명 배경 */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px); /* 세련된 배경 블러 처리 */
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s ease;
    opacity: 0;
}

.modal-overlay.is-show {
    opacity: 1;
}

.modal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* 깊은 그림자 */
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: scale(1);
    animation: modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* 탄력 있는 등장 효과 */
    overflow: hidden;
}

.modal-header {
    padding: 24px 28px 0;
    text-align: center;
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.modal-body {
    padding: 14px 28px 28px;
    text-align: center;
}

#modal-message {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.7;
    word-break: keep-all;
    white-space: pre-line;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 28px 28px;
}

.modal-btn {
    flex: 1;
    min-width: 0;
    height: 54px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

.modal-btn:active {
    transform: translateY(0);
}

.modal-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.modal-btn-secondary {
    background: #e2e8f0;
    color: #334155;
}

.modal-btn-secondary:hover {
    background: #cbd5e1;
    box-shadow: 0 5px 15px rgba(148, 163, 184, 0.25);
}

.modal-btn:not(.modal-btn-secondary) {
    background: #1f3a5f; /* 소다랩 포인트 컬러 */
    color: #ffffff;
}

.modal-btn:not(.modal-btn-secondary):hover {
    background: #2c5282;
    box-shadow: 0 5px 15px rgba(31, 58, 95, 0.3);
}

@keyframes modal-pop {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/*
 * 로딩 모달 스타일
 */
.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #1f3a5f;
    animation: soda-spin 0.8s linear infinite;
    background: transparent;
}

@keyframes soda-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .modal-card {
        width: calc(100% - 32px);
        max-width: none;
        border-radius: 20px;
    }

    .modal-header {
        padding: 22px 20px 0;
    }

    .modal-body {
        padding: 12px 20px 24px;
    }

    .modal-footer {
        padding: 0 20px 20px;
        flex-direction: column-reverse;
    }

    .modal-btn {
        width: 100%;
    }
}
