/* 游戏风格登录界面样式 */

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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background-color: #f0f0f0;
}

/* 背景容器 */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: brightness(0.7);
    animation: fadeIn 1.5s ease-in-out;
}

/* 背景动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 登录容器 */
.login-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 登录卡片 */
.login-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    animation: slideIn 0.8s ease-out;
}

/* 下拉菜单样式 */
.form-control {
    color: #ffd700 !important;
}

.form-control option {
    color: #000 !important;
    background: #fff !important;
}

.form-control:focus {
    color: #ffd700 !important;
}

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

/* 游戏图标 */
.game-icon {
    display: block;
    margin: 0 auto 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.9);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* 标题样式 */
.login-title {
    text-align: center;
    color: #ffd700;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.login-subtitle {
    text-align: center;
    color: rgba(255, 215, 0, 0.9);
    font-size: 16px;
    margin-bottom: 30px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* 表单样式 */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label,
.form-label,
#registerForm label {
    display: block;
    color: #ffd700 !important;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3) !important;
}

.login-form .form-control,
#registerForm .form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    color: #ffd700;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.1);
}

.login-form .form-control:focus,
#registerForm .form-control:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.3);
}

.login-form .form-control::placeholder,
#registerForm .form-control::placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

/* 通用placeholder样式 */
::placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

/* 针对不同浏览器的placeholder样式 */
::-webkit-input-placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

::-moz-placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

:-ms-input-placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

:-moz-placeholder {
    color: rgba(255, 215, 0, 0.7) !important;
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #ffd700;
}

.remember-me label {
    margin: 0;
    font-size: 14px;
    cursor: pointer;
    color: rgba(255, 215, 0, 0.9);
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.8);
    border-radius: 10px;
    color: #ffd700;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.2);
}

.login-btn:hover {
    background: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), inset 0 0 15px rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
    border-color: #ffd700;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), inset 0 0 10px rgba(255, 215, 0, 0.2);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.4), transparent);
    transform: rotate(45deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 215, 0, 0.3);
}

.divider span {
    padding: 0 15px;
    color: rgba(255, 215, 0, 0.9);
    font-size: 14px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link p {
    color: rgba(255, 215, 0, 0.9);
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.register-link a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.5);
    padding-bottom: 2px;
}

.register-link a:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* 错误信息 */
.error-message {
    background: rgba(220, 53, 69, 0.3);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    color: #ffd700;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

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

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top: 3px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .game-icon {
        width: 60px;
        height: 60px;
    }
}

/* 粒子效果容器 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}