/* 기본 래퍼와 배경 */
.login-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #fefbf7 0%, #fef9e7 50%, #fefef2 100%);
    overflow: hidden;
    padding: 20px;
}

.background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.background-gradient .circle {
    position: absolute;
    border-radius: 50%;
}

.circle-orange {
    top: -160px;
    left: -160px;
    width: 384px;
    height: 384px;
    background-color: rgba(253, 186, 116, 0.15);
    filter: blur(60px);
    opacity: 0.4;
}

.circle-amber {
    bottom: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    background-color: rgba(252, 211, 77, 0.1);
    filter: blur(60px);
    opacity: 0.2;
}

.circle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 512px;
    height: 512px;
    background-color: rgba(254, 215, 170, 0.15);
    filter: blur(40px);
    opacity: 0.3;
}

/* 컨테이너 */
.login-container {
    width: 100%;
    max-width: 420px;
    z-index: 10;
    position: relative;
}

/* 헤더 섹션 - 단색으로 변경 */
.login-header {
    text-align: center;
    margin-bottom: 0;
    padding: 28px 32px;
    background: #f97316;
    border-radius: 20px 20px 0 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.main-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.main-subtitle {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* 메인 카드 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0 0 20px 20px;
    backdrop-filter: blur(20px);
    padding: 32px;
    box-shadow:
            0 20px 25px -5px rgba(0, 0, 0, 0.1),
            0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.login-tab {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 3px;
}

.tab-button {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    background-color: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button.active {
    background-color: #f97316;
    color: #fff;
    box-shadow: 0 1px 3px rgba(249, 115, 22, 0.2);
    border-radius: 5px;
}

.tab-button:hover:not(.active) {
    background-color: rgba(248, 250, 252, 0.8);
}

.teacher-icon {
    margin-top: 1px;
}

.student-icon {
    margin-top: 0.5px;
}

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

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

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 15px;
    z-index: 2;
}

/* 비밀번호 토글 버튼 스타일 수정 */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: #6b7280;
    z-index: 2;
}

.password-toggle:hover {
    color: #374151;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

/* 비밀번호 입력 필드 패딩 조정 */
.password-input {
    padding-right: 48px !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #f97316;
    outline: none;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #9ca3af;
}

.error-message {
    color: #ef4444;
    font-size: 13px;
    margin: 0;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

.btn-login {
    width: 100%;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    /* 호버 시 색상 변화만 유지 */
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login-icon {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login:hover .btn-login-icon {
    transform: translateX(4px);
}

.register-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.register-section p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px 0;
}

.btn-register {
    width: 100%;
    height: 44px;
    border: 1px solid #f97316;
    background-color: transparent;
    color: #f97316;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-register:hover {
    background-color: #fff7ed;
    transform: translateY(-1px);
}

/* 비밀번호 찾기 링크 스타일 */
.forgot-password-wrapper {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 20px;
}

.forgot-password-link {
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    font-weight: 500;
}

.forgot-password-link:hover {
    color: #f97316;
}

/* ========================================
   비밀번호 찾기 폼 전용 스타일 (회원가입과 동일)
   ======================================== */

/* 스텝 정보 */
.pwd-reset-step-info {
    margin-bottom: 32px;
    text-align: left;
}

.pwd-reset-step-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.pwd-reset-step-hint {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* 입력 그룹 */
.pwd-reset-input-group {
    width: 100%;
    margin-bottom: 24px;
}

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

/* 필수 표시 */
.pwd-reset-required-mark {
    color: #ef4444;
    margin-left: 2px;
}

.pwd-reset-input-field {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.pwd-reset-input-field.error .pwd-reset-main-input {
    border-color: #ef4444;
}

.pwd-reset-main-input {
    width: 100%;
    height: 48px;
    padding: 0 16px !important;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.pwd-reset-main-input:focus {
    border-color: #f97316;
    outline: none;
}

.pwd-reset-main-input::placeholder {
    color: #9ca3af;
}

/* 비밀번호 입력 */
.pwd-reset-password-input {
    padding-right: 48px !important;
}

.pwd-reset-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    color: #6b7280;
}

.pwd-reset-password-toggle:hover {
    color: #374151;
}

.pwd-reset-password-group {
    display: grid;
    gap: 16px;
}

/* 버튼들 */
.pwd-reset-verify-btn, .pwd-reset-confirm-btn {
    height: 48px;
    padding: 0 24px;
    background-color: #f97316;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.pwd-reset-verify-btn:hover:not(:disabled), .pwd-reset-confirm-btn:hover:not(:disabled) {
    background-color: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.25);
}

.pwd-reset-verify-btn:disabled, .pwd-reset-confirm-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.pwd-reset-submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 16px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pwd-reset-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(249, 115, 22, 0.3);
}

.pwd-reset-submit-btn:active {
    transform: translateY(0);
}

.pwd-reset-btn-icon {
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwd-reset-submit-btn:hover .pwd-reset-btn-icon {
    transform: translateX(4px);
}

/* 입력 래퍼 */
.pwd-reset-input-wrapper {
    position: relative;
    width: 100%;
}

.pwd-reset-input-wrapper .pwd-reset-main-input {
    width: 100%;
}

/* 타이머가 있는 입력 필드 */
.pwd-reset-input-with-timer {
    position: relative;
    flex: 1;
    min-width: 0;
}

.pwd-reset-code-input {
    padding-right: 70px !important;
    width: 100%;
}

/* 타이머 디스플레이 */
.pwd-reset-timer-display {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 600;
    color: #f97316;
    pointer-events: none;
}

.pwd-reset-timer-display.expired {
    color: #ef4444;
}

/* 에러 메시지 */
.pwd-reset-error-msg {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    line-height: 1.4;
}

.pwd-reset-error-section {
    margin-bottom: 16px;
    text-align: center;
}

/* 성공 메시지 */
.pwd-reset-success-area {
    margin-bottom: 16px;
    text-align: center;
}

.pwd-reset-success-msg {
    color: #059669;
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    font-size: 14px;
    margin: 0;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
    padding: 10px;
    border-radius: 8px;
}

/* 푸터 섹션 */
.pwd-reset-footer-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.pwd-reset-footer-text {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.pwd-reset-link-btn {
    background: none;
    border: none;
    color: #f97316;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pwd-reset-link-btn:hover {
    color: #ea580c;
    text-decoration: underline;
}

/* ========================================
   소셜 로그인 섹션 스타일 (개선된 버전)
   ======================================== */

.social-login-section {
    margin: 24px 0;
    text-align: center;
}

.divider {
    margin: 24px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5e7eb 50%, transparent 100%);
}

.divider span {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

/* 공통 소셜 로그인 버튼 스타일 */
.social-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    margin-top: 10px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.social-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-login-btn:hover::before {
    opacity: 0;
}

/* 카카오 로그인 버튼 */
.kakao-login-btn {
    background: #FEE500;
    color: #3C4043;
    border: 1px solid rgba(253, 224, 0, 0.3);
}

.kakao-login-btn:hover {
    text-decoration: none;
    color: #2C2C2E;
    background: #FFC107;
}

.kakao-login-btn:hover .kakao-icon path {
    fill: #2C2C2E;
}

.kakao-login-btn .kakao-icon {
    width: 22px;
    height: 22px;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

/* 네이버 로그인 버튼 (공식 가이드 준수) */
.naver-login-btn {
    background: #03C75A; /* 네이버 공식 그린 컬러 */
    color: #FFFFFF;
    border: 1px solid #03C75A;
    font-weight: 700; /* 네이버 가이드 권장 */
}

.naver-login-btn:hover {
    text-decoration: none;
    color: #FFFFFF;
    background: #00B553; /* 호버 시 약간 어두운 그린 */
    border: 1px solid #00B553;
}

/* 네이버 로고 SVG */
.naver-login-btn .naver-icon {
    width: 15px;
    height: 15px;
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
}

/* 구글 로그인 버튼 */
.google-login-btn {
    background: #FFFFFF;
    color: #3C4043;
    border: 1px solid #DADCE0;
}

.google-login-btn:hover {
    text-decoration: none;
    color: #3C4043;
    background: #F8F9FA;
    border: 1px solid #C8CCD0;
}

.google-login-btn .google-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* 활성 상태 */
.social-login-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* 활성 상태 스타일 (필요시 추가) */

/* ======================================== 
   소셜 로그인 버튼 반응형 및 접근성 (개선)
   ======================================== */

/* 모바일 환경에서 터치 영역 최적화 */
@media (max-width: 480px) {
    .social-login-btn {
        height: 48px;
        font-size: 14px;
        border-radius: 10px;
        margin-top: 8px;
    }
    
    .kakao-login-btn .kakao-icon {
        width: 19px;
        height: 19px;
        left: 16px;
    }
    
    .naver-login-btn .naver-icon {
        width: 13px;
        height: 13px;
        left: 16px;
    }
    
    .google-login-btn .google-icon {
        width: 16px;
        height: 16px;
        left: 16px;
    }
    
    .social-login-section {
        margin: 20px 0;
    }
    
    .divider {
        margin: 20px 0;
    }
}

/* 터치 디바이스에서 호버 효과 조정 */
@media (hover: none) {
    .social-login-btn:hover {
        transform: none;
    }
    
    .social-login-btn:hover::before {
        opacity: 0;
    }
    
    .kakao-login-btn:hover {
        background: #FEE500;
    }
    
    .naver-login-btn:hover {
        background: #03C75A;
        border: 1px solid #03C75A;
    }
    
    .google-login-btn:hover {
        background: #FFFFFF;
        border: 1px solid #DADCE0;
    }
}

/* 포커스 상태 outline 제거 */
.social-login-btn:focus {
    outline: none;
}

.kakao-login-btn:focus {
    outline: none;
}

.naver-login-btn:focus {
    outline: none;
}

.google-login-btn:focus {
    outline: none;
}

/* 로딩 상태 애니메이션 (선택사항) */
.social-login-btn.loading {
    pointer-events: none;
    position: relative;
}

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

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

