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

body {
    font-family: Arial, sans-serif;
    background-color: #181418;
    color: #91969f;
    line-height: 1.6;
    font-size: 12px;
    margin: 0;
    padding: 0;
}

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

/* 头部样式 */
.header {
    position: relative;
    z-index: 1000;
}

/* Logo容器 */
.logo-container {
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 306px; /* 与参考网站保持一致的高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 防止图片溢出容器 */
}

.site-logo {
    width: 100%; /* 保持原始宽度 */
    max-width: 100%;
    height: 100%; /* 保持高度与容器一致 */
    max-height: 306px; /* 明确限制最大高度 */
    /* 移除aspect-ratio，允许图片自由调整宽高比例 */
    transition: all 0.3s ease;
    object-fit: contain; /* 保持原始比例并完整显示 */
    object-position: center; /* 居中显示 */
    transform: scaleX(1.3); /* 水平放大图片30% */
}

/* 菜单容器 */
.menu-container {
    background-color: #181418;
    padding: 0;
    border-bottom: 2px solid #ffcc66;
}

/* 导航菜单 */
.nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    background: #181418; /* 使用纯色背景替代背景图片 */
    height: 77px; /* 与参考网站保持一致的高度 */
}

.nav li {
    margin: 0;
}

.nav a {
    color: #ffcc66; /* 修改为更明显的金色 */
    text-decoration: none;
    font-size: 18px; /* 保持较大的字体 */
    font-weight: bold; /* 增加字体粗细 */
    padding: 29.5px 39px; /* 调整垂直内边距，确保文字居中 */
    display: block;
    height: 77px; /* 与导航栏高度一致 */
    /* 移除text-indent，使文字可见 */
    overflow: visible; /* 允许文字完整显示 */
    white-space: nowrap; /* 防止文字换行 */
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box; /* 确保内边距不影响元素总高度 */
}

.nav a:hover {
    color: #ffffff;
    background: #ffcc66; /* 使用金色背景替代背景图片 */
}

.nav a i {
    margin-right: 8px;
    color: #ffcc66; /* 保持图标颜色与文字一致 */
}

/* 主要内容区域 */
.main-content {
    margin-top: 20px;
    width: 1104px;
    margin: 20px auto;
}

.content-wrapper {
    display: flex;
    gap: 20px;
}

/* 左侧内容 */
.left-content {
    width: 730px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 右侧内容 */
.right-content {
    width: 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 快速链接样式 */
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-links .btn {
    width: 100%;
    text-align: center;
    padding: 12px 15px;
    font-size: 16px;
    white-space: normal;
    line-height: 1.4;
    height: auto;
}

/* 首页内容布局 */
.home-content {
    width: 100%;
    max-width: 95%; /* 最大化整体宽度 */
    margin: 0 auto;
}

.home-top {
    display: flex;
    gap: 10px; /* 减少左右部分间距 */
    margin-bottom: 20px;
    width: 100%;
    align-items: stretch; /* 确保左右两部分高度一致 */
}

.home-left {
    width: 65%; /* 增加左侧宽度 */
    display: flex;
    flex-direction: column;
}

.home-right {
    width: 35%; /* 调整右侧宽度，保持整体协调 */
    display: flex;
    flex-direction: column;
    gap: 15px; /* 调整右侧内部模块间距 */
}

.home-bottom {
    width: 100%; /* 确保与上半部分宽度完全一致 */
    margin-top: 20px; /* 添加顶部间距 */
}

/* 调整公告列表的最小高度，确保与右侧高度协调 */
.news-list {
    min-height: 360px; /* 调整高度以更好地匹配右侧内容 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 确保所有卡片的内边距一致，避免高度差异 */
.home-left .card,
.home-right .card {
    padding: 20px;
    margin-bottom: 0;
    height: 100%; /* 确保卡片高度一致 */
}

/* 确保左右两侧高度完全一致 */
.home-left,
.home-right {
    display: flex;
    flex-direction: column;
    height: fit-content; /* 使用fit-content确保高度自适应内容 */
}

/* 确保右侧两个卡片总高度与左侧协调，并统一宽度 */
.home-right .card:nth-child(1),
.home-right .card:nth-child(2) {
    flex: 1;
    min-height: 160px; /* 调整每个卡片的最小高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%; /* 确保两个卡片宽度一致 */
}

/* 链接样式 */
a {
    color: #ffcc66;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .right-sidebar {
        width: 100%;
    }
}

/* 标题 */
h1, h2, h3 {
    color: #ffcc66;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 204, 102, 0.3);
}

h1 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 40px;
}

h2 {
    font-size: 22px;
    border-bottom: 2px solid #ffcc66;
    padding-bottom: 10px;
    margin-top: 0;
}

/* 卡片 */
.card {
    background-color: #18171d;
    border: 1px solid #ffcc66;
    padding: 20px;
    margin: 0 auto 20px auto;
    max-width: 100%; /* 调整为100%宽度，适应父容器 */
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(255, 204, 102, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    background-color: rgba(255, 204, 102, 0.08);
    box-shadow: 0 0 18px rgba(255, 204, 102, 0.3);
    transform: translateY(-2px);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0 15px; /* 添加左右内边距 */
    background-color: #ffcc66;
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #ff9900;
    cursor: pointer; /* 修正鼠标指针样式 */
    font-size: 14px;
    line-height: 26px; /* 调整行高以适应内容 */
    height: 30px;
    margin: 5px;
    text-align: center; /* 文字居中 */
    vertical-align: middle; /* 垂直居中 */
}

.btn:hover {
    background-color: #ff9900;
    color: #ffffff;
    border: 2px solid #ffcc66;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background-color: #18171d;
    border: 1px solid #232227;
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #232227;
}

table th {
    background-color: rgba(255, 204, 102, 0.2);
    color: #ffcc66;
    font-weight: bold;
}

table tr:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 2px;
    color: #ffcc66;
    font-weight: normal;
    font-size: 13px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 70%; /* 减少约30%宽度 */
    padding: 6px;
    background-color: #18171d;
    border: 1px solid #ffcc66;
    color: #91969f;
    font-size: 12px;
    margin: 0 auto;
    display: block;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #ffffff;
}

.inputbox {
    width: 200px;
    padding: 5px;
    background-color: #2c2830;
    border: 1px solid #ffcc66;
    color: #ffffff;
    font-size: 14px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    height: 26px;
    line-height: 26px;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}

.inputbox:focus {
    outline: none;
    border-color: #ffffff;
}

/* 注册表单专用样式 */
.register-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 14px;
}

.register-table td {
    padding: 6px 5px;
    vertical-align: middle;
}

.form-label {
    text-align: right;
    padding-right: 10px;
    width: 30%;
    font-size: 14px;
    color: #ffcc66;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.form-input {
    text-align: left;
    width: 70%;
    position: relative;
}

.form-input .inputbox {
    display: inline-block;
    margin-right: 10px;
}

.form-hint {
    display: inline-block;
    font-size: 12px;
    color: #aaa;
    vertical-align: middle;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.required-star {
    color: #ff4444;
    font-weight: bold;
    margin-left: 2px;
}

.register-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.form-hint {
    font-size: 12px;
    color: #91969f;
    display: inline-block;
    margin-top: 0;
    vertical-align: middle;
}

.required-star {
    color: #ff4444;
    font-weight: bold;
    margin-left: 2px;
}

.password-strength {
    margin-top: 5px;
    margin-left: 0;
}

#strength-text {
    font-size: 12px;
    margin-bottom: 3px;
    color: #ccc;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.strength-bar-container {
    width: 100%;
    max-width: 200px;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
}

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

.form-actions {
    text-align: center;
    padding: 15px 0;
}

.form-actions .btn {
    margin: 0 10px;
    padding: 10px 25px;
    font-size: 16px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    border-radius: 5px;
    line-height: normal; /* 重置行高以适应更大的按钮 */
    height: auto; /* 自动高度 */
}

/* 密码强度指示器 */
#pwd-strength {
    height: 18px;
    line-height: 18px;
    width: 208px;
    border: 1px solid #d6b673;
    background-color: #fff1d4;
    text-align: center;
    font-size: 12px;
    margin: 0 auto;
}

.pwd-strength-box {
    float: left;
    width: 64px;
    height: 18px;
    line-height: 18px;
    border: 1px solid #d6b673;
    background-color: #fff1d4;
    text-align: center;
    font-size: 12px;
    color: #000000;
}

.pwd-strength-box-low {
    background-color: #f00;
    color: #ffffff;
}

.pwd-strength-box-med {
    background-color: #f90;
    color: #000000;
}

.pwd-strength-box-hi {
    background-color: #390;
    color: #ffffff;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.image-item {
    border: 1px solid #00ffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.image-item:hover {
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.4);
    transform: scale(1.02);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 游戏介绍页面 */
.game-intro-content h3 {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.game-intro-content h4 {
    color: #ffd700;
    font-size: 1.4rem;
    margin: 25px 0 15px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

.game-intro-content p {
    color: #ffffff;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.game-intro-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.game-intro-content li {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.game-intro-content strong {
    color: #ffd700;
}

.game-intro-content a {
    color: #00ffff;
    text-decoration: none;
}

.game-intro-content a:hover {
    text-decoration: underline;
    color: #ff4500;
}

/* 页脚 */
.footer {
    background-color: #181418;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 2px solid #ffcc66;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    text-align: center;
    color: #91969f;
    font-size: 12px;
    flex: 1;
    width: 100%;
}

.footer-info p {
    text-align: center;
    margin: 0;
    padding: 0;
}

/* 轮播样式 */
.slideshow-container {
    position: relative;
    margin: auto;
    width: 100%;
    overflow: hidden;
    border-radius: 8px; /* 添加圆角 */
}

.slide {
    display: none;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

.slide img {
    width: 100%;
    height: 350px; /* 调整图片高度 */
    object-fit: cover;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* 轮播控制按钮 */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 12px;
    color: #91969f;
    font-weight: bold;
    font-size: 16px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(24, 20, 24, 0.7);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 204, 102, 0.7);
    color: #000000;
}

/* 轮播指示器 */
.dots-container {
    text-align: center;
    padding: 10px;
    background-color: #181418;
}

.dot {
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 0 4px;
    background-color: #91969f;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #ffcc66;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }
    
    .prev, .next {
        font-size: 14px;
        padding: 10px;
    }
}

/* 科幻风格装饰 */
.sci-fi-border {
    position: relative;
}

.sci-fi-border::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #ffd700, #ff4500, #ffd700, #ff4500);
    border-radius: 15px;
    z-index: -1;
    animation: border-glow 2s ease-in-out infinite;
}

@keyframes border-glow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 公告列表 */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.news-item {
    padding: 18px 20px;
    border-bottom: 1px solid #333;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 204, 102, 0.02);
    border-radius: 5px;
}

.news-item:hover {
    background-color: rgba(255, 204, 102, 0.1);
    padding-left: 25px;
    transform: translateX(3px);
}

.news-title {
    font-size: 14px;
    color: #ffcc66;
    text-decoration: none;
    display: block;
    flex-grow: 1;
    line-height: 1.4;
}

.news-title:hover {
    text-decoration: underline;
    color: #ffffff;
}

.news-date {
    font-size: 12px;
    color: #ffcc66;
    margin-left: 15px;
    white-space: nowrap;
    font-weight: bold;
}

/* 重要公告样式 */
.news-item:first-child .news-title {
    color: #ff0000;
    font-weight: bold;
}

/* 管理页面样式 */
.admin-panel {
    background-color: rgba(26, 26, 46, 0.8);
    border: 1px solid #ffd700;
    border-radius: 10px;
    padding: 30px;
    margin: 40px auto;
    max-width: 560px; /* 减少约30%宽度 (800px * 0.7) */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-table th, .admin-table td {
    text-align: center;
}

/* 登录页面样式 */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 20px;
}

.login-container {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.login-container .login-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.login-container .login-btn:hover {
    background-color: #0056b3;
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: #007bff;
    text-decoration: none;
    margin: 0 10px;
}

.login-links a:hover {
    text-decoration: underline;
}

/* 下载项目 */
.download-item {
    background-color: rgba(26, 26, 46, 0.8);
    border: 1px solid #ffd700;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto 20px auto;
    max-width: 70%; /* 减少约30%宽度 */
}

.download-item h3 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 10px;
}

.download-item p {
    color: #cccccc;
    margin-bottom: 15px;
}

.download-item .note {
    color: #cccccc;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* 角色排行页面 */
.ranking-content {
    text-align: center;
    padding: 20px;
}

.ranking-content .btn {
    display: inline-block;
    margin: 20px 0;
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* 筛选区域 */
.filter-section {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(26, 26, 46, 0.5);
    border: 1px solid #232227;
    border-radius: 8px;
}

.filter-section label {
    color: #ffcc66;
    margin-right: 10px;
    font-weight: bold;
}

.filter-section select {
    padding: 5px;
    background-color: #18171d;
    color: #91969f;
    border: 1px solid #ffcc66;
    font-size: 12px;
}

/* 排名表格 */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #18171d;
    border: 1px solid #232227;
}

.rank-table th {
    background-color: rgba(255, 204, 102, 0.2);
    color: #ffcc66;
    font-weight: bold;
    text-align: center;
}

.rank-table td {
    text-align: center;
    border-bottom: 1px solid #232227;
}

.rank-table tr:hover {
    background-color: rgba(255, 215, 0, 0.1);
}

.info-note {
    background-color: rgba(26, 26, 46, 0.5);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 20px;
    margin: 30px auto 0 auto;
    text-align: left;
    max-width: 70%; /* 减少约30%宽度 */
}

.info-note h3 {
    color: #ffd700;
    margin-top: 0;
}

.info-note ul {
    padding-left: 20px;
}

.info-note li {
    color: #cccccc;
    margin-bottom: 10px;
}