/* ============================================
   로그인 페이지 스타일
   login.css
   ============================================ */

:root {
    --primary-color: #2c3e50;
    --primary-light: #34495e;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --danger-color: #e74c3c;
    --bg-color: #f0f2f5;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--bg-color);
    overflow: hidden;
}

/* ===== 좌측 비주얼 패널 ===== */
.login-visual {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 50%, #0d1117 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(52,152,219,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(52,152,219,0.05) 0%, transparent 50%);
    animation: visualPulse 8s ease-in-out infinite alternate;
}

@keyframes visualPulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-2%, -1%) scale(1.02); }
}

.visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 480px;
}

.visual-icon {
    width: 100px;
    height: 100px;
    background: rgba(52,152,219,0.15);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 40px;
    border: 1px solid rgba(52,152,219,0.2);
}

.visual-icon i {
    font-size: 44px;
    color: var(--accent-color);
}

.visual-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.visual-content p {
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    font-weight: 300;
}

.visual-features {
    display: flex;
    gap: 32px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.feature-item {
    text-align: center;
    flex: 1;
}

.feature-item i {
    font-size: 22px;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.feature-item span {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

/* ===== 우측 로그인 폼 ===== */
.login-form-wrapper {
    width: 520px;
    min-width: 520px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: #fff;
    position: relative;
}

.login-form-inner {
    width: 100%;
    max-width: 380px;
}

.login-logo {
    margin-bottom: 40px;
}

.login-logo h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.login-logo p {
    font-size: 14px;
    color: #999;
    font-weight: 400;
}

/* 폼 그룹 */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.input-group-login {
    position: relative;
}

.input-group-login i.field-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 15px;
    transition: color 0.2s;
    z-index: 2;
}

.input-group-login input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Noto Sans KR', sans-serif;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.input-group-login input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.12);
    background: #fff;
}

.input-group-login input:focus + i.field-icon,
.input-group-login input:focus ~ i.field-icon {
    color: var(--accent-color);
}

.input-group-login input::placeholder {
    color: #bbb;
}

/* 비밀번호 보기 토글 */
.pw-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 15px;
    padding: 0;
    z-index: 2;
    transition: color 0.2s;
}

.pw-toggle:hover {
    color: #888;
}

/* 옵션 행 */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    user-select: none;
}

.remember-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

/* 로그인 버튼 */
.btn-login {
    width: 100%;
    height: 50px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Noto Sans KR', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(52,152,219,0.3);
}

.btn-login:active {
    transform: scale(0.99);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.btn-login.loading .spinner {
    display: block;
}

.btn-login.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 에러 메시지 */
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--danger-color);
    animation: errorShake 0.4s ease;
}

.login-error.show {
    display: flex;
}

.login-error i {
    font-size: 16px;
    flex-shrink: 0;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* 하단 정보 */
.login-footer {
    margin-top: 48px;
    text-align: center;
    font-size: 12px;
    color: #bbb;
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .login-visual {
        display: none;
    }

    .login-form-wrapper {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .login-form-wrapper {
        padding: 40px 24px;
    }

    .login-form-inner {
        max-width: 100%;
    }

    .input-group-login input {
        height: 48px;
    }

    .btn-login {
        height: 48px;
    }
}
