.otp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.otp-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.otp-modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.otp-modal-overlay.active .otp-modal-content {
    transform: scale(1) translateY(0);
}

.close-button {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: #f0f0f0;
}

.otp-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.otp-modal-icon {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
}

.otp-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.otp-modal-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.phone-number, .email-address {
    font-weight: 600;
    color: #333;
}

/* 1단계: 인증 방법 선택 */
.step-1 {
    display: block;
}

.step-1.hidden {
    display: none;
}

.verification-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.verification-option {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.verification-option:hover {
    border-color: #087ef7;
    background-color: #f8f9ff;
}

.verification-option.selected {
    border-color: #087ef7;
    background-color: #f8f9ff;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: #f8f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.option-description {
    font-size: 14px;
    color: #666;
}

.option-check {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.verification-option.selected .option-check {
    border-color: #087ef7;
    background-color: #087ef7;
}

.verification-option.selected .option-check::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 2단계: OTP 입력 */
.step-2 {
    display: none;
}

.step-2.active {
    display: block;
}

.back-button {
    background: none;
    border: none;
    color: #087ef7;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.back-button:hover {
    color: #5a6fd8;
}

.otp-container {
    margin: 24px 0;
}

.otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-input {
    width: 48px;
    height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s;
    outline: none;
}

.otp-input:focus {
    border-color: #087ef7;
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: #087ef7;
    background-color: #f8f9ff;
}

.timer-container {
    text-align: center;
    margin: 20px 0;
}

.timer {
    font-size: 18px;
    font-weight: 600;
    color: #087ef7;
    margin-bottom: 8px;
}

.timer.warning {
    color: #ff6b6b;
}

.timer-text {
    font-size: 12px;
    color: #999;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #087ef7 0%, #092947 100%);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #ff6b6b 0%, #ff8e8e 100%);
}

.otp-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.primary-button {
    width: 100%;
    padding: 14px;
    background: #465166;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.primary-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.secondary-button {
    width: 100%;
    padding: 12px;
    background: none;
    color: #087ef7;
    border: 1px solid #087ef7;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-button:hover:not(:disabled) {
    background: #087ef7;
    color: white;
}

.secondary-button:disabled {
    color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

.success-message {
    color: #4caf50;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    display: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.slide-out {
    animation: slideOut 0.3s ease-out;
}