/* 이메일 인증 모달 스타일 */
.email-verification-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow: hidden;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease-out;
    overflow: auto;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-header {
    background-color: #333;
    color: white;
    padding: 20px 30px;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: -0.02em;
    color: #fff;
}

.modal-header .email-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

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

.modal-body {
    padding: 30px;
    text-align: center;
}

.verification-info {
    margin-bottom: 25px;
}

.verification-info h3 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.02em;
}

.verification-info p {
    color: #7f8c8d;
    line-height: 1.6;
    margin: 10px 0;
    font-weight: 400;
    font-family: inherit;
    letter-spacing: -0.01em;
}

.email-highlight {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.01em;
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.modal-btn.primary {
    background-color: #333;
    color: white;
}

.modal-btn.primary:hover {
    background: linear-gradient(135deg, #434343 0%, #333 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.modal-btn.secondary {
    background: #6c757d;
    color: white;
}

.modal-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.resend-cooldown {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
}

.verification-steps {
    text-align: left;
    margin: 20px 0;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.verification-steps h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.verification-steps ol {
    margin: 0;
    padding-left: 20px;
}

.verification-steps li {
    margin: 8px 0;
    color: #555;
    line-height: 1.5;
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 모바일 대응 */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-btn {
        width: 100%;
    }
}

/* 로딩 상태 */
.modal-btn.loading {
    position: relative;
    color: transparent;
}

.modal-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6자리 코드 입력 필드 스타일 */
.code-input-container {
    margin: 25px 0;
    text-align: center;
}

.code-input-container label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.code-input {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.code-digit {
    width: 50px;
    height: 60px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.code-digit:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.code-digit:invalid {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.code-digit.filled {
    background-color: #f8f9fa;
    border-color: #000;
}

.code-submit-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.code-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.code-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.code-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.code-success {
    color: #27ae60;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

/* 타이머 스타일 */
.timer-text {
    margin: 0 auto;
    width: 105px;
    font-size: 13px;
    font-weight: bold;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 3px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.timer-text.warning {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.timer-text.danger {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .code-digit {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .code-input {
        gap: 8px;
    }
}