/* 登录页面 - 宇宙风格样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Rajdhani', Arial, sans-serif;
    color: #e6e6fa;
    overflow: hidden;
    position: relative;
    perspective: 1000px;
}

/* 宇宙背景色调调整 */
body {
    background: radial-gradient(ellipse at center, #0a0a1f 0%, #050510 100%);
}

/* 星星尘埃效果 - 增强宇宙感 */
#star-dust {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 30%);
    z-index: -1;
}
/* 扫描线效果 */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 100%);
    background-size: 100% 4px;
    z-index: 1;
    pointer-events: none;
    animation: scanline 0.5s linear infinite;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* 3D粒子容器 */
#particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 霓虹边框效果 */
.neon-border {
    border: 1px solid #00f2fe;
    box-shadow: 0 0 10px #00f2fe, 0 0 20px rgba(0, 242, 254, 0.5), inset 0 0 10px #00f2fe;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(0, 242, 254, 0.3), transparent);
    transform: skewX(-20deg);
    animation: glowBorder 3s infinite;
}

@keyframes glowBorder {
    0% { left: -100%; }
    100% { left: 150%; }
}

/* 登录容器 */
.login-container {
    max-width: 400px;
    text-align: center;
    padding: 40px;
    background-color: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
    z-index: 2;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-container:hover {
    transform: translateY(-5px) rotateX(5deg);
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 10px;
    background: rgba(0, 242, 254, 0.2);
    border-radius: 50%;
    filter: blur(10px);
    transition: all 0.3s ease;
}

.login-container:hover::after {
    background: rgba(0, 242, 254, 0.3);
    transform: scale(1.1);
}

/* 标题样式 */
h2 {
    color: #00f2fe;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 0 0 10px #00f2fe, 0 0 20px #00f2fe;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    animation: titleGlow 2s infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 10px #00f2fe, 0 0 20px #00f2fe;
    }
    100% {
        text-shadow: 0 0 15px #00f2fe, 0 0 30px #00f2fe, 0 0 40px rgba(0, 242, 254, 0.5);
    }
}

/* 输入框样式 */
input {
    margin: 20px auto;
    padding: 15px;
    width: 280px;
    background-color: rgba(5, 5, 15, 0.8);
    border: 2px solid #ff00ff;
    color: #ffffff;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
    display: block;
    position: relative;
    overflow: hidden;
}

input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 15px #00f2fe;
    transform: scale(1.03);
}

input::placeholder {
    color: #8a8aa3;
    font-style: italic;
}

/* 按钮样式 */
button {
    margin-top: 30px;
    padding: 15px 40px;
    background: linear-gradient(45deg, #ff00ff, #00f2fe);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Orbitron', sans-serif;
    transform-style: preserve-3d;
}

button::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: all 0.6s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    box-shadow: 0 0 20px #ff00ff, 0 0 30px #00f2fe;
    transform: translateY(-3px) translateZ(5px);
}

/* 错误信息样式 */
p[style*="color:red"] {
    color: #ff4d4d;
    font-weight: bold;
    text-shadow: 0 0 5px #ff4d4d;
    animation: pulse 1s infinite;
    margin: 20px 0;
    padding: 10px;
    background-color: rgba(255, 77, 77, 0.1);
    border-radius: 5px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 装饰性元素 */
.cyberpunk-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: decorationPulse 5s infinite alternate;
}

@keyframes decorationPulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.cyberpunk-decoration:nth-child(1) {
    top: 10%;
    left: 10%;
    background: rgba(255, 0, 255, 0.3);
}

.cyberpunk-decoration:nth-child(2) {
    bottom: 10%;
    right: 10%;
    background: rgba(0, 242, 254, 0.3);
}

/* 弹窗样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: rgba(15, 15, 30, 0.95);
    margin: 15% auto;
    padding: 40px;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    transform: translateY(-20px);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #ff4d4d;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ffffff;
    text-shadow: 0 0 10px #ff4d4d;
}

/* 注册按钮样式 */
.register-btn {
    background: linear-gradient(45deg, #00f2fe, #008cff);
    margin-top: 20px;
}

.register-btn:hover {
    box-shadow: 0 0 20px #00f2fe, 0 0 30px #008cff;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    input {
        width: 100%;
    }
    
    button {
        width: 100%;
    }
    
    .modal-content {
        margin: 30% auto;
        padding: 30px 20px;
        max-width: 90%;
    }
}