/* login.css */

.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 40px;
    background-color: white;
    border-bottom: 1px solid #ddd;
    z-index: 999;
}

body {
    margin: 0;
    padding-top: 50px;
    background-color: #f2f3f6;
    font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

/* 로그인 페이지 스타일 */
.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: calc(100vh - 80px);
}

.login-form,
.register-form {
    width: 400px;
    background-color: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-title,
.register-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #212529;
}

/* 폼 그룹 스타일 */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #212529;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #FF6F0E;
    box-shadow: 0 0 0 2px rgba(255, 111, 14, 0.1);
}

.error-input {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1) !important;
}

/* 버튼 스타일 */
.btn-login,
.btn-register {
    width: 100%;
    background-color: #FF6F0E;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn-login:hover,
.btn-register:hover {
    background-color: #e85a00;
}

.btn-login:active,
.btn-register:active {
    transform: translateY(1px);
}

.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #212529;
    text-decoration: none;
    background-color: white;
    box-sizing: border-box;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-google-login:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google-login img {
    width: 20px;
    height: 20px;
}

/* 푸터 및 링크 스타일 */
.login-footer {
    margin-top: 30px;
    font-size: 14px;
    color: #212529;
    text-align: center;
}

.register-container {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.to-login {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.login-link,
.register-link {
    color: #ff6f0e;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.login-link:hover,
.register-link:hover {
    text-decoration: underline;
    color: #e85a00;
}

/* 메시지 스타일 */
.error-message {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #fdf2f2;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    animation: fadeIn 0.3s ease-in;
}

.success-message {
    color: #27ae60;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #f2fdf2;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
    animation: fadeIn 0.3s ease-in;
}

.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    animation: slideDown 0.3s ease-in;
}

/* 비밀번호 관련 스타일 */
.password-policy {
    margin-top: 4px;
}

.password-policy small {
    color: #6c757d;
    font-size: 11px;
    line-height: 1.4;
}

.password-strength {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

.strength-weak {
    color: #e74c3c;
}

.strength-medium {
    color: #f39c12;
}

.strength-strong {
    color: #27ae60;
}

/* 유효성 검사 메시지 */
.validation-message {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

.validation-success {
    color: #27ae60;
}

.validation-error {
    color: #e74c3c;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 20px;
    }
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-form,
    .register-form {
        width: 90%;
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .register-container {
        margin-top: 20px;
        padding: 10px;
    }
    
    .login-wrapper {
        padding: 20px;
        height: auto;
        min-height: calc(100vh - 80px);
    }
    
    .form-group input {
        padding: 12px;
        font-size: 16px; /* iOS에서 줌 방지 */
    }
    
    .btn-login,
    .btn-register {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 320px) {
    .login-form,
    .register-form {
        width: 95%;
        padding: 20px 15px;
    }
    
    .login-title,
    .register-title {
        font-size: 20px;
    }
}