/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    background: linear-gradient(135deg, #8B0000 0%, #4B0000 50%, #2F1F1F 100%);
    min-height: 100vh;
    position: relative;
}

/* 添加古典纹理背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23000" opacity="0.03"/><path d="M0 0L100 100M100 0L0 100" stroke="%23D4AF37" stroke-width="0.5" opacity="0.1"/></svg>');
    pointer-events: none;
}

/* 头部导航 */
.header {
    background: rgba(139, 0, 0, 0.9);
    border-bottom: 2px solid #D4AF37;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #D4AF37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #FFD700;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #FFF;
}

/* 主要内容区域 */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 卡片样式 */
.card {
    background: rgba(30, 20, 10, 0.95);
    border: 2px solid #D4AF37;
    border-radius: 8px;
    padding: 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, #D4AF37, #FFD700, #D4AF37);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.6;
}

/* 标题样式 */
.card-title {
    text-align: center;
    color: #D4AF37;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.game-title {
    text-align: center;
    color: #D4AF37;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 4px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #FFD700;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 1px;
}

.form-label.required::after {
    content: ' *';
    color: #FF6B6B;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #8B4513;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(40, 30, 20, 0.9);
    color: #FFF;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(50, 40, 30, 0.95);
}

.form-control.is-invalid {
    border-color: #DC143C;
    background: rgba(60, 20, 20, 0.9);
}

.form-control::placeholder {
    color: #999;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 18px 30px;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #8B0000 100%);
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 0, 0, 0.7);
    border-color: #FFD700;
    background: linear-gradient(135deg, #A52A2A 0%, #FF6B6B 50%, #A52A2A 100%);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #FFD700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.5);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.7);
    border-color: #FFD700;
    background: linear-gradient(135deg, #34ce57 0%, #26d0ce 50%, #34ce57 100%);
}

/* 错误信息样式 */
.invalid-feedback {
    color: #FF6B6B;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    font-weight: 500;
}

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border: none;
    font-size: 16px;
    font-weight: 500;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #90EE90;
    border: 1px solid rgba(40, 167, 69, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #FF6B6B;
    border: 1px solid rgba(220, 53, 69, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 链接样式 */
.text-center {
    text-align: center;
    margin-top: 30px;
}

.link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

.link:hover {
    color: #FFF;
    text-decoration: underline;
}

/* 加载动画 */
.loading {
    display: none;
    text-align: center;
    margin-top: 10px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        max-width: 500px;
    }

    .card {
        padding: 30px;
    }

    .game-title {
        font-size: 36px;
    }

    .card-title {
        font-size: 28px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        gap: 20px;
    }

    .main-content {
        padding-top: 140px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
        max-width: 400px;
    }

    .card {
        padding: 20px;
    }

    .game-title {
        font-size: 28px;
    }

    .card-title {
        font-size: 24px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }

    .button-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .button-group .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.button-group .btn {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

/* 可选字段样式 */
.optional-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.optional-title {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

/* 表单行样式 */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 5px;
    height: 4px;
    border-radius: 2px;
    background: #e1e1e1;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.strength-weak { background: #dc3545; width: 33%; }
.strength-medium { background: #ffc107; width: 66%; }
.strength-strong { background: #28a745; width: 100%; }

/* ==================== 充值页面样式 ==================== */

/* 充值说明区域 */
.recharge-notice {
    background: rgba(139, 0, 0, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
}

.notice-title {
    color: #D4AF37;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.notice-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #E8D4A0;
    font-size: 15px;
    line-height: 1.6;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.notice-item.highlight {
    background: rgba(220, 20, 60, 0.2);
    border: 1px solid rgba(220, 20, 60, 0.4);
    color: #FFB6C1;
}

.notice-item strong {
    color: #FFD700;
    font-weight: 600;
}

.notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    font-size: 12px;
    color: #D4AF37;
    flex-shrink: 0;
}

/* 收款码区域 */
.qrcode-section {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.qrcode-title {
    color: #D4AF37;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.qrcode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.qrcode-image {
    max-width: 280px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 3px solid #D4AF37;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.qrcode-tip {
    color: #FFD700;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

/* 充值表单 */
.recharge-form {
    margin-top: 30px;
}

/* 充值页面容器宽度 */
body:has(.recharge-form) .container,
.recharge-page .container {
    max-width: 1000px;
}

.form-section-title {
    color: #D4AF37;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

/* 多选框组 */
.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(40, 30, 20, 0.9);
    border: 2px solid #8B4513;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.checkbox-item:hover {
    border-color: #D4AF37;
    background: rgba(50, 40, 30, 0.95);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B0000;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: #FFD700;
}

.checkbox-item span {
    color: #E8D4A0;
    font-size: 15px;
}

/* 单选框组 */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(40, 30, 20, 0.9);
    border: 2px solid #8B4513;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-item:hover {
    border-color: #D4AF37;
    background: rgba(50, 40, 30, 0.95);
}

.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #8B0000;
    cursor: pointer;
}

.radio-item input[type="radio"]:checked + span {
    color: #FFD700;
}

.radio-item span {
    color: #E8D4A0;
    font-size: 15px;
}

/* 字符计数 */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 表单行响应式 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        width: 100%;
    }

    .checkbox-group,
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .checkbox-item,
    .radio-item {
        width: 100%;
    }

    .qrcode-image {
        max-width: 200px;
    }
}

/* ==================== 移动端适配 ==================== */

@media (max-width: 768px) {
    /* 头部导航 */
    .header {
        padding: 10px 0;
    }

    .header-content {
        flex-direction: column;
        gap: 8px;
        padding: 0 10px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        gap: 0;
        flex-wrap: nowrap;
        justify-content: space-evenly;
        width: 100%;
    }

    .nav-links a {
        font-size: 15px;
        padding: 4px 6px;
        text-align: center;
        white-space: nowrap;
    }

    /* 主内容区域 */
    .main-content {
        padding-top: 115px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* 容器 */
    .container {
        padding: 15px;
    }

    /* 卡片 */
    .card {
        padding: 25px 20px;
    }

    /* 标题 */
    .game-title {
        font-size: 28px !important;
    }

    /* 按钮 */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* 表单 */
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 快速导航 */
    .nav-links-section {
        margin-top: 30px !important;
    }

    .nav-links-section div[style*="grid"] {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 15px !important;
    }

    .nav-link-item {
        padding: 12px !important;
    }

    .nav-link-item div[style*="font-size: 18px"] {
        font-size: 16px !important;
    }

    .nav-link-item div[style*="font-size: 14px"] {
        font-size: 12px !important;
    }

    /* 充值说明 */
    .recharge-notice {
        padding: 15px !important;
    }

    .notice-title {
        font-size: 18px !important;
    }

    .notice-item {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }

    /* 收款码 */
    .qrcode-section {
        padding: 15px !important;
    }

    .qrcode-title {
        font-size: 18px !important;
    }

    .qrcode-image {
        max-width: 180px;
    }

    /* 表单组 */
    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /* 提示信息 */
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }

    /* 用户中心 */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-label {
        min-width: auto;
        font-size: 13px;
    }

    .info-value {
        font-size: 14px;
    }

    .characters-container {
        flex-direction: column;
        gap: 8px;
    }

    .character-tag {
        width: 100%;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 管理员表格 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .records-table {
        font-size: 12px;
        white-space: nowrap;
    }

    .records-table th,
    .records-table td {
        padding: 8px 5px;
    }

    /* 统计卡片 */
    .stat-card {
        min-width: 100px;
        padding: 15px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    /* 分页 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    /* 更小屏幕的适配 */
    .logo {
        font-size: 20px;
    }

    .nav-links {
        gap: 0;
    }

    .nav-links a {
        font-size: 14px;
        padding: 4px 5px;
    }

    .main-content {
        padding-top: 120px;
    }

    .game-title {
        font-size: 24px !important;
    }

    .card {
        padding: 20px 15px;
    }

    /* 快速导航更小 */
    .nav-links-section div[style*="grid"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .nav-link-item {
        padding: 10px !important;
    }

    .nav-link-item div[style*="font-size: 18px"] {
        font-size: 14px !important;
    }

    .nav-link-item div[style*="font-size: 14px"] {
        font-size: 11px !important;
    }

    /* 按钮 */
    .btn {
        width: 100%;
        padding: 14px 20px;
        text-align: center;
    }
}

/* ==================== 用户中心样式 ==================== */

.section-title {
    color: #D4AF37;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.info-section {
    padding: 20px;
    background: rgba(40, 30, 20, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.info-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-size: 14px;
    min-width: 100px;
}

.info-value {
    color: #FFD700;
    font-size: 15px;
}

.characters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
}

.character-tag {
    background: rgba(139, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #FFD700;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}