/* 이메일 인증코드 입력 페이지 스타일 - 개선된 디자인 */

/* 회원가입 페이지 기본 설정 */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

/* 메인 컨텐츠 스타일 */
.main-content {
    display: flex;
    flex-direction: column;
    padding: 60px 0;
    flex: 1;
}

.header__content {
    flex: 1;
    width: 100%;
    max-width: 1456px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header__content_inner {
    display: flex;
    gap: 3rem;
    min-height: 600px;
    align-items: stretch;
}

.header__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
}

.header__title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.4;
    font-family: 'Pretendard', sans-serif;
}

.header__subtitle {
    font-size: clamp(14px, 1.5vw, 18px);
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.header__benefits {
    margin-top: 2rem;
}

.benefits__title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.benefits__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits__item {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #555;
}

.benefits__icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    background-color: #6b53d3;
    border-radius: 50%;
    flex-shrink: 0;
}

.header__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 레이아웃 스타일 */
.layout__body {
    margin: 40px auto 0;
}

/* ID 기반 요소 스타일 */
#email-verification-status {
    display: none !important; /* btn-verify verified 클래스에 인증완료가 표시되므로 숨김 */
}

#verification-status {
    text-align: center;
    display: none;
}

/* 전체 컨테이너 스타일 */
.auth-container {
    min-height: 100vh;
    padding: 2rem 0;
}

.auth-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-form {
    background: white;
    border-radius: 12px;
    margin: 100px;
    margin-left: auto;
}

.auth-form h2 {
    text-align: center;
    color: #333;
}
   /* 타이머 개선 - 인라인 스타일 */
.timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
}

.timer #countdown {
    font-weight: 700;
    color: #e74c3c;
    font-size: 14px;
    margin: 0;
}

.auth-info {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f8f9fa;
}

.auth-info h3 {
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 섹션 스타일 */
.email-section,
.user-info-section,
.verification-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fafbfc;
    transition: all 0.3s ease;
}

/* .email-section {

} */

.verification-section {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border-color: #ff9800;
    animation: slideDown 0.5s ease-out;
}

.user-info-section { 
  color: #3d3c54;
}

.section-divider {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-divider h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-divider p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 폼 그룹 스타일 */
.form-group {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-gap: 1rem;
    align-items: center;
    width: 100%;
}

/* 이메일 필드는 전체 너비 차지 */
.email-field {
    grid-column: 1 / -1;
}

/* 구분선 */
.form-divider {
    grid-column: 1 / -1;
    height: 1px;
    background: #e9ecef;
    margin: 1.5rem 0;
}

/* 각 필드 그룹 */
.user-info-section .field-group {
    display: grid !important;
    grid-template-columns: 120px 1fr !important;
    grid-gap: 1rem !important;
    align-items: start !important;
    margin-bottom: 1rem !important;
}

.user-info-section .field-group label {
    color: #3d3c54 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0 !important;
    padding-top: 12px !important;
}

.user-info-section .field-group input {
    width: 100% !important;
}

.user-info-section .field-group .form-text {
    grid-column: 2 !important;
    margin-top: 0.25rem !important;
    font-size: 0.8rem !important;
    color: #6c757d !important;
}

.form-group label {
    color: #3d3c54;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0;
    align-self: center;
}

.form-group label:first-child {
    margin-top: 0;
}

/* user-info-section 내부 레이블 색상 변경 */
.user-info-section .form-group label {
    color: #3d3c54;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .form-group {
        grid-template-columns: 1fr;
        grid-gap: 0.5rem;
    }
    
    .email-field,
    .form-divider,
    .field-group {
        grid-column: 1;
    }
}

.form-group input:focus {
    outline: none;
    border-color: #6b53d3;
    width: 100%;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

/* user-info-section 내부 form-text 색상 변경 */
.user-info-section .form-text {
    color: #ccc;
    width: 100%;
    text-align: center;
}

/* 데스크톱에서만 그리드 효과 적용 */
@media (min-width: 769px) {
    .user-info-section .form-text {
        grid-column: 1 / 3; /* 2행의 1열부터 2열까지 차지 */
        grid-row: 2; /* 2행에 위치 */
    }
}

/* 인증 완료 후 verification-section 숨김 */
.verification-section.verified {
    display: none !important;
}

/* 이메일 인증 그룹 스타일 */
.email-verification-group {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.email-verification-group input[type="email"] {
    flex: 1;
    margin-right: 0;
}

.btn-verify {
    background: #3d3c54;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.btn-verify:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.btn-verify:disabled {
    background: #6c757d !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-verify.verified {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* 이메일 입력 필드 옆 인증 완료 표시 */
.email-verification-group .verification-check {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 10px;
}

.btn-verify.verified {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* 기존 verification-status 스타일 제거됨 */

.resend-section .verification-check {
    color: #28a745;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

@media (max-width: 768px) {
    .email-verification-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .email-verification-group input[type="email"] {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .resend-section {
        margin-top: 10px;
    }
}

.section-divider {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-divider h3 {
    color: #2d2c44;
    margin-bottom: 0.5rem;
}

.section-divider p {
    color: #666;
    font-size: 0.9rem;
}

/* 재발송 섹션 스타일 */
.resend-section {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-success {
    background: #3d3c54;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.btn-success:enabled {
    opacity: 1;
}

.btn-success:hover:enabled {
    background: #3d3c54;
}

.btn-success:disabled {
    cursor: not-allowed;
    transform: none;
}

.initial-message {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

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

.step-arrow {
    margin: 0 1rem;
    color: #ccc;
}

.auth-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #536492;
}

.verification-code-input {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-input-single {
    width: 200px;
    height: 49px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;
    letter-spacing: 8px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    padding: 0 20px;
}

.code-input-single:focus {
    border-color: #536492;
    box-shadow: 0 0 0 2px rgba(83, 100, 146, 0.2);
}

.code-input-single.loading {
    background-color: #f0f8ff;
    border-color: #007bff;
}

.verification-code-input.submitted {
    opacity: 0.7;
    pointer-events: none;
}

.timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    color: #e74c3c;
    font-weight: bold;
    white-space: nowrap;
}

.resend-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-resend {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: none; /* 초기에는 숨김 */
    transition: background-color 0.3s ease;
}

.btn-resend:hover {
    background: #5a6268;
}

.btn-resend:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.status-message {
    transition: all 0.3s ease;
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.auth-container {
    margin: 0 auto;
    padding: 20px;
}

.auth-content {
    background: #fff;
    border-radius: 12px;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.auth-info h3 {
    margin: 0 0 10px 0;
    color: #536492;
    font-size: 16px;
}

.auth-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.btn-primary {
    background: #6b53d3;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    background: #6b53d3;
    transform: translateY(-1px);
}

/* 인증된 코드 입력 필드 스타일 */
.code-input-single.verified {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.code-input-single.loading {
    background-color: #cce5ff;
    border-color: #007bff;
    animation: pulse 1s infinite;
}

.code-input-single.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    animation: shake 0.5s ease-in-out;
}

.code-input-single.expired {
    background-color: #f1f3f4;
    border-color: #6c757d;
    color: #6c757d;
}

.code-input-single:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* 개선된 인증코드 입력 필드 스타일 */
.verification-code-input {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-input-single {
    width: 280px !important;
    height: 49px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 6px;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    background: white;
    transition: all 0.3s ease;
    color: #333;
    padding: 0 20px;
}

.code-input-single:focus {
    outline: none;
}

.code-input-single.verified {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.code-input-single[readonly] {
    cursor: not-allowed;
    background: #f8f9fa !important;
    color: #6c757d !important;
}

.code-input-single.verified[readonly] {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    color: #155724 !important;
    cursor: default;
}

.code-input-single.error {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    animation: shake 0.6s ease-in-out;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.code-input-single.loading {
    animation: pulse 1.5s infinite;
}

/* 타이머 개선 */
.timer {
    text-align: center;
    margin: 1.5rem 0;
    /* padding: 1rem; */
    /* background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%); */
    border-radius: 8px;
    /* border: 2px solid #ffc107; */
}

.timer #countdown {
    font-weight: 700;
    color: #856404;
    font-size: 1.1rem;
}

/* 재발송 섹션 개선 */
.resend-section {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.1) 0%, rgba(90, 98, 104, 0.1) 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.btn-resend {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: none; /* 초기에는 숨김 */
    transition: all 0.3s ease;
}

.btn-resend:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

/* 반응형 개선 */
@media (max-width: 1200px) {
    .header__content {
        padding: 0 1rem;
    }
    
    .header__content_inner {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header__content_inner {
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
    }
    
    .header__left {
        padding-right: 0;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .header__content {
        padding: 0 1rem;
    }
    
    .verification-code-input {
        justify-content: center;
    }
    
    .code-input-single {
        width: 180px !important;
        height: 45px;
        font-size: 1rem;
        letter-spacing: 4px;
        padding: 0 15px;
    }
}
