/* 统一登录页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    position: relative;
}

/* 当使用背景图片时的样式 */
body.has-bg-image {
    background-size: cover;           /* 覆盖整个容器，保持比例 */
    background-position: center center; /* 居中显示 */
    background-repeat: no-repeat;      /* 不重复 */
    background-attachment: fixed;      /* 固定背景，滚动时不动 */
    -webkit-background-size: cover;    /* Safari/Chrome 兼容 */
    -moz-background-size: cover;       /* Firefox 兼容 */
    -o-background-size: cover;         /* Opera 兼容 */
}

/* 响应式背景图片优化 */
@media screen and (max-width: 768px) {
    body.has-bg-image {
        background-attachment: scroll; /* 移动端使用滚动背景，性能更好 */
    }
}

/* 背景图片叠加层（增强文字可读性） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);    /* 半透明黑色遮罩，增强对比度 */
    z-index: 0;
    display: none;
    pointer-events: none;              /* 不阻止鼠标事件 */
}

/* 当使用背景图片时显示叠加层 */
body.has-bg-image::before {
    display: block;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    margin: auto;
    position: relative;
    z-index: 1;                        /* 确保登录框在遮罩层之上 */
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
}

/* 有背景图片时降低登录框透明度 */
body.has-bg-image .login-box {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.login-type-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
    background: #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e0e0e0;
}

.error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
    text-align: left;
}

.error-icon {
    margin-right: 8px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.captcha-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input input {
    flex: 1;
}

.captcha-input img {
    width: 140px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
}

.remember-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

/* 客户端下载按钮 */
.client-download-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.client-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.client-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 160, 71, 0.5);
    color: white;
}

.client-download-btn:active {
    transform: translateY(0);
}

.client-download-btn.disabled {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
}

.client-download-btn.disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.3);
}

.download-icon {
    width: 20px;
    height: 20px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    color: #999;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }

    .login-box {
        padding: 30px 20px;
    }
}

/* 游戏声明和版权信息 */
.game-disclaimer {
    margin-top: 20px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 有背景图片时降低声明框透明度 */
body.has-bg-image .game-disclaimer {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.disclaimer-text {
    color: #666;
    font-size: 11px;
    line-height: 1.8;
    margin-bottom: 10px;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
}

.disclaimer-text:last-child {
    margin-bottom: 0;
}

.disclaimer-text a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400;
}

.disclaimer-text a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.disclaimer-text.copyright {
    font-weight: 500;
    color: #333;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

@media (max-width: 480px) {
    .game-disclaimer {
        padding: 20px;
        margin-top: 15px;
    }

    .disclaimer-text {
        font-size: 10px;
        line-height: 1.6;
    }
}

