/* 
사용자 인증 페이지 스타일시트
모던하고 접근성을 고려한 UI 디자인

구조적 결정:
- 반응형 디자인으로 다양한 디바이스 지원
- 시각적 피드백으로 사용자 경험 향상
- 접근성 고려 (색상 대비, 포커스 표시 등)
*/

/* ==================== 기본 설정 ==================== */
.auth-container {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #1f2937;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

/* ==================== 폼 스타일 ==================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:invalid {
    border-color: #ef4444;
}

.form-control:valid {
    border-color: #10b981;
}

.form-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: -4px;
}

/* ==================== 체크박스 그룹 ==================== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.checkbox-item label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    margin: 0;
}

/* ==================== 버튼 스타일 ==================== */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

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

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

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

/* ==================== 알림 메시지 ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ==================== 링크 스타일 ==================== */
.auth-links {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.auth-links p {
    margin: 8px 0;
    color: #6b7280;
    font-size: 14px;
}

.auth-links a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.auth-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ==================== 비밀번호 강도 표시 ==================== */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
}

.password-strength .very-weak {
    color: #dc2626;
}

.password-strength .weak {
    color: #ea580c;
}

.password-strength .medium {
    color: #ca8a04;
}

.password-strength .strong {
    color: #16a34a;
}

.password-strength .very-strong {
    color: #059669;
}

/* ==================== 비밀번호 일치 표시 ==================== */
.password-match {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
}

.match-success {
    color: #16a34a;
}

.match-error {
    color: #dc2626;
}

/* ==================== 반응형 디자인 ==================== */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px auto;
        padding: 20px;
        max-width: 90%;
    }
    
    .auth-header h2 {
        font-size: 24px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .checkbox-group {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 10px auto;
        padding: 16px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* iOS에서 줌 방지 */
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* ==================== 접근성 개선 ==================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .btn {
        border: 2px solid transparent;
    }
    
    .btn-primary {
        border-color: #1d4ed8;
    }
    
    .btn-secondary {
        border-color: #374151;
    }
}

/* 다크 모드 지원 (선택적) */
@media (prefers-color-scheme: dark) {
    .auth-container {
        background-color: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .auth-header h2 {
        color: #f9fafb;
    }
    
    .form-group label {
        color: #d1d5db;
    }
    
    .form-control {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-control:focus {
        border-color: #60a5fa;
    }
    
    .form-help {
        color: #9ca3af;
    }
    
    .checkbox-group {
        background-color: #374151;
        border-color: #4b5563;
    }
    
    .checkbox-item label {
        color: #d1d5db;
    }
    
    .auth-links {
        border-color: #374151;
    }
    
    .auth-links p {
        color: #9ca3af;
    }
    
    .auth-links a {
        color: #60a5fa;
    }
    
    .auth-links a:hover {
        color: #93c5fd;
    }
}

/* ==================== 애니메이션 효과 ==================== */
.auth-container {
    animation: fadeInUp 0.5s ease-out;
}

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

/* 폼 필드 애니메이션 */
.form-control {
    position: relative;
}

.form-control:focus {
    animation: focusPulse 0.3s ease-out;
}

@keyframes focusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
} 