/* Login page specific styles */
body {
    background: #121212;
    /* 배경을 약간의 블러 효과와 오버레이가 있는 그라데이션으로 변경 */
    background-image: 
        linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(5, 5, 5, 0.95) 100%),
        radial-gradient(circle at center, rgba(50, 50, 50, 0.2) 0%, rgba(0, 0, 0, 0.5) 70%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}

/* 배경 애니메이션 효과 */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(100, 0, 0, 0.03) 0%, rgba(50, 0, 0, 0.03) 25%, transparent 70%);
    animation: rotateBackground 25s linear infinite;
    z-index: 0;
}

@keyframes rotateBackground {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.login-container {
    background-color: rgba(40, 40, 40, 0.8);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    padding: 40px;
    width: 460px; /* 너비 증가 */
    max-width: 90%;
    text-align: center;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(100, 100, 100, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(220, 53, 69, 0.8), transparent);
    animation: borderAnimation 3s linear infinite;
    z-index: 3;
}

@keyframes borderAnimation {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.logo-container {
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 1.8rem; /* 폰트 크기 축소 */
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
    letter-spacing: 0.5px; /* 글자 간격 조정 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
    padding: 0 15px; /* 좌우 여백 추가 */
}

.login-form {
    margin-top: 10px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-form input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
    transform: translateY(-2px);
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.login-btn {
    background: linear-gradient(135deg, #dc3545 0%, #b32535 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 15px 0;
    width: 100%;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    margin-top: 5px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #d9293a 0%, #9a1f2c 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
}

.login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

.copyright {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    z-index: 2;
    letter-spacing: 0.5px;
    font-weight: 300;
    transition: color 0.3s ease;
}

.copyright:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* 회원가입 링크 스타일 */
.register-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    margin-top: 20px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.05);
}

.register-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

.register-link i {
    margin-right: 6px;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.register-link:hover i {
    transform: translateX(-3px);
}

/* Flash message styling */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 모바일 최적화 미디어 쿼리 */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 20px;
        width: 90%;
        max-width: 400px;
    }
    
    .logo-container img {
        max-width: 200px;
    }
    
    .login-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
        white-space: nowrap; /* 모바일에서도 텍스트 줄바꿈 방지 */
        letter-spacing: 0.5px;
        padding: 0 10px;
    }
    
    .login-form input {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .login-btn {
        padding: 13px 0;
        font-size: 16px;
    }
    
    .copyright {
        padding: 0 20px;
        font-size: 12px;
    }
}

/* 작은 화면 디바이스에 대한 추가 최적화 */
@media (max-width: 480px) {
    .login-container {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .logo-container {
        margin-bottom: 20px;
    }
    
    .logo-container img {
        max-width: 180px;
    }
    
    .login-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
        white-space: nowrap; /* 더 작은 화면에서도 텍스트 줄바꿈 방지 */
        letter-spacing: 0.3px;
        padding: 0 8px;
    }
    
    body {
        background-attachment: fixed;
    }
    
    /* 모바일에서 애니메이션 감소 (배터리 절약 및 성능 향상) */
    body::before {
        animation: rotateBackground 40s linear infinite;
    }
    
    .login-container::before {
        animation: borderAnimation 5s linear infinite;
    }
}