/* 기본 스타일 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f6f8;
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
}

/* 컨테이너 스타일링 */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 헤더 스타일링 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.box-logo {
    font-size: 32px;
    font-weight: 900;
    color: #2563eb;
    margin-bottom: 12px;
}

.welcome-text {
    color: #6b7280;
    font-size: 16px;
}

/* 폼 스타일링 */
.form-group {
    margin-bottom: 24px;
}

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

.input-wrapper {
    position: relative;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

input:focus + .input-border {
    width: 100%;
}

/* 옵션 그룹 스타일링 */
.option-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #2563eb;
    border-color: #2563eb;
}

.remember-me input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #1d4ed8;
}

/* 버튼 스타일링 */
.login-button {
    width: 100%;
    padding: 12px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.login-button:hover {
    background-color: #1d4ed8;
}

/* 소셜 로그인 스타일링 */
.social-login {
    margin-top: 32px;
}

.divider {
    text-align: center;
    position: relative;
    margin-bottom: 24px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background-color: #e5e7eb;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background-color: white;
    padding: 0 12px;
    color: #6b7280;
    font-size: 14px;
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-button {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-button.kakao {
    background-color: #fee500;
    color: #000000;
}

.social-button.google {
    background-color: white;
    color: #333;
}

.social-button:hover {
    background-color: #f8f9fa;
}

/* 회원가입 링크 스타일링 */
.signup-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.signup-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link a:hover {
    color: #1d4ed8;
}

/* 에러 메시지 스타일링 */
.error-message {
    position: fixed;
    top: -50px; /* 처음에는 화면 밖에 위치 */
    left: 50%;
    transform: translateX(-50%);
    background-color: #ef4444;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease; /* opacity뿐만 아니라 모든 속성에 트랜지션 적용 */
    z-index: 1;
    opacity: 1;
}

.error-message.show {
    top: 80px; /* 보여질 때의 위치 (헤더 아래) */
}
/* 반응형 디자인 */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 24px;
        border-radius: 12px;
    }

    .box-logo {
        font-size: 28px;
    }

    .social-buttons {
        gap: 8px;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-wrapper {
    animation: fadeIn 0.5s ease;
}