/**
 * 광남2동 체육회 - 로그인 페이지 스타일 (login.css)
 * login.html 전용 스타일시트
 */

/* === 페이지 기본 레이아웃 === */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 배경 장식 요소 */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

body::before {
    top: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    bottom: -100px;
    right: -100px;
    width: 150px;
    height: 150px;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* === 로그인 컨테이너 === */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
    position: relative;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s ease-out;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

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

.login-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 15px;
    font-weight: 500;
}

/* === 폼 스타일 === */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    position: relative;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: white;
}

.form-control:focus + .form-label {
    color: #667eea;
}

.form-control::placeholder {
    color: #bdc3c7;
    transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.6;
}

.form-control.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-control.error:focus {
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

.form-error.show {
    display: block;
}

/* === 로그인 버튼 === */
.login-btn {
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

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

.login-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* === 로딩 스피너 === */
.loading {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading.show {
    display: block;
}

/* === 알림 컴포넌트 === */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: none;
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.alert.show {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #fdf2f2;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

.alert-error::before {
    content: '⚠️';
    font-size: 16px;
}

.alert-success {
    background-color: #f0f9f0;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-success::before {
    content: '✅';
    font-size: 16px;
}

/* === 홈 링크 === */
.home-link {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 10px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.home-btn:hover {
    background-color: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.home-btn i {
    font-size: 16px;
}

/* === 푸터 === */
.footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #ecf0f1;
    color: #95a5a6;
    font-size: 12px;
}

/* === 추가 인터랙션 효과 === */
.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0,0,0,0.25);
}

/* 입력 필드 아이콘 효과 */
.form-group {
    position: relative;
}

.form-group::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-group:has(.form-control:focus)::after {
    opacity: 0.3;
}

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

/* === 반응형 디자인 === */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .login-container {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .form-control {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .login-btn {
        padding: 14px 18px;
        font-size: 15px;
    }
}

@media (max-width: 320px) {
    .login-container {
        padding: 25px 20px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .form-control {
        padding: 12px 16px;
    }
    
    .login-btn {
        padding: 12px 16px;
    }
}

/* === 다크모드 대응 (향후 확장용) === */
@media (prefers-color-scheme: dark) {
    /* 다크모드가 활성화되어도 로그인 페이지는 밝은 테마 유지 */
}

/* === 고대비 접근성 === */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .login-btn {
        border: 2px solid #4a5568;
    }
}