/* 기본 설정 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* 어두우면서도 은은한 그라데이션 배경 */
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
    overflow: hidden; /* 배경 애니메이션이 화면을 벗어나지 않도록 */
    position: relative;
}

/* 배경에 둥근 원형 효과 추가 (시각적 깊이) */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(50px);
    z-index: 0;
}

body::before {
    background: #4a5568;
    width: 300px;
    height: 300px;
    top: -50px;
    left: -50px;
    animation: moveCircle1 15s infinite alternate;
}

body::after {
    background: #667eea;
    width: 250px;
    height: 250px;
    bottom: -50px;
    right: -50px;
    animation: moveCircle2 18s infinite alternate-reverse;
}

@keyframes moveCircle1 {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(100px, 150px);
    }
}

@keyframes moveCircle2 {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(-150px, -100px);
    }
}

/* 로그인 카드 - 다크 글래스모피즘 */
.login-card {
    position: relative;
    z-index: 1; /* 배경 효과 위에 오도록 */
    background: rgba(45, 55, 72, 0.4); /* 어두운 투명 배경 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(113, 128, 150, 0.3); /* 은은한 테두리 */
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    max-width: 420px;
    color: #e2e8f0; /* 밝은 회색 텍스트 */
}

.login-card h2 {
    font-size: 32px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #fff;
}

.login-card p {
    font-size: 15px;
    margin-bottom: 40px;
    color: #a0aec0;
}

/* 입력 그룹 */
.input-group {
    text-align: left;
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #cbd5e0;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(113, 128, 150, 0.4); /* 투명한 테두리 */
    border-radius: 15px;
    background-color: rgba(26, 32, 44, 0.5); /* 어두운 투명 배경 */
    color: #fff;
    font-size: 16px;
    transition: 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(160, 174, 192, 0.6);
}

.input-group input:focus {
    border-color: #667eea; /* 포커스 시 보라색 테두리 */
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    background-color: rgba(26, 32, 44, 0.7);
}


.input-wrapper {
    position: relative;
    display: flex;
    align-items: center; /* 내부 요소들(아이콘, 인풋) 수직 중앙 정렬 */
}

/* 왼쪽 아이콘 위치 고정 */
.input-wrapper .prefix-icon {
    position: absolute;
    left: 16px;
    color: #64748b;
    pointer-events: none; /* 아이콘 클릭 방해 금지 */
    width: 18px;
    height: 18px;
    transition: color 0.3s;
}

/* 입력창 패딩 세밀 조정 */
.input-wrapper input {
    width: 100%;
    height: 52px; /* 높이 명시적 지정으로 정렬 일관성 확보 */
    padding: 0 48px 0 48px; /* 좌측(아이콘), 우측(눈아이콘) 여백 확보 */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    border-color: #818cf8;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.1);
}

/* 포커스 시 왼쪽 아이콘 색상 변경 */
.input-wrapper input:focus ~ .prefix-icon {
    color: #818cf8;
}

/* 비밀번호 토글 버튼 위치 고정 */
.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #f8fafc;
}


/* 로그인 버튼 */
.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); /* 보라색 그라데이션 */
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
    margin-top: 20px;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
    background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
}

/* 흔들림 애니메이션 (유효성 검사 실패 시) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-6px);
    }
    40% {
        transform: translateX(6px);
    }
    60% {
        transform: translateX(-6px);
    }
    80% {
        transform: translateX(6px);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
    border: 1px solid #ef4444 !important;
}


/* 추가 링크 */
.extra-links {
    margin-top: 30px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    color: #a0aec0;
}

.extra-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: 0.2s ease;
    font-weight: 400;
}

.extra-links a:hover {
    color: #667eea;
}


/* 명언 영역 스타일 */
#quote-container {
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 300px;
}

#quote-text {
    color: #818cf8; /* 포인트 컬러 */
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 8px;
    word-break: keep-all; /* 단어 단위 줄바꿈으로 깔끔하게 */
}

#quote-author {
    color: #64748b;
    font-size: 12px;
}


/* 반응형 모바일 최적화 */
@media (max-width: 480px) {
    .login-card {
        padding: 40px 25px;
    }

    .login-card h2 {
        font-size: 28px;
    }

    .login-card p {
        margin-bottom: 30px;
    }
}