* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --input-bg: #f3f4f6;
    --bg-white: #ffffff;
    --btn-primary: #000000;
    --btn-primary-hover: #333333;
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --link-color: #2563eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-white);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.login-wrapper {
    width: 100%;
}

/* 로고 섹션 */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-img {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
    filter: contrast(1.2) brightness(1.1);
}

/* 제목 섹션 */
.title-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* 로그인 폼 */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-white);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 폼 옵션 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--btn-primary);
}

.checkbox-label span {
    user-select: none;
}

.find-link {
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.find-link:hover {
    color: var(--link-color);
}

/* 로그인 버튼 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--btn-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 32px;
}

.login-btn:hover {
    background: var(--btn-primary-hover);
}

.login-btn:active {
    transform: scale(0.98);
}

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

/* 소셜 로그인 섹션 */
.social-section {
    margin-bottom: 32px;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 16px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.social-icon:active {
    transform: scale(0.95);
}

.social-icon.kakao {
    background: #FEE500;
}

.social-icon.kakao:hover {
    background: #FDD835;
    box-shadow: 0 4px 8px rgba(254, 229, 0, 0.3);
}

.social-icon.naver {
    background: #03C75A;
}

.social-icon.naver:hover {
    background: #02B350;
    box-shadow: 0 4px 8px rgba(3, 199, 90, 0.3);
}

.social-icon.google {
    background: white;
    border: 1px solid var(--border-color);
}

.social-icon.google:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 회원가입 섹션 */
.signup-section {
    text-align: center;
}

.signup-text {
    font-size: 14px;
    color: var(--text-primary);
}

.signup-link {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s;
}

.signup-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 에러 메시지 */
.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--error-bg);
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--error-color);
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    animation: shake 0.3s ease-in-out;
}

/* 성공 메시지 (에러 메시지 스타일 재사용) */
.error-message.success {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
    animation: fadeInUp 0.3s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* 로딩 상태 */
.login-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.login-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-container {
        max-width: 100%;
    }

    .logo-img {
        max-width: 160px;
    }

    .main-title {
        font-size: 20px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 15px;
    }

    .login-btn {
        padding: 14px;
        font-size: 15px;
    }

    .social-icon {
        width: 44px;
        height: 44px;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}

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

