/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* 侧边栏样式 */
.sidebar {
    width: 220px;
    background-color: #0c162d;
    color: #e6f1ff;
    padding: 15px;
    height: 100%;
    position: fixed;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar h2 {
    color: #64ffda;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.3);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    color: #e6f1ff;
    text-decoration: none;
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.sidebar-nav a:hover {
    background-color: #112240;
    color: #64ffda;
    transform: translateX(3px);
}

.sidebar-nav a.active {
    background-color: #112240;
    color: #64ffda;
    font-weight: 500;
    border-left: 2px solid #64ffda;
}

/* 主内容区域 */
.main-content {
    margin-left: 220px;
    padding: 15px;
}

/* 顶部导航栏样式 */
.main-nav {
    background-color: #0c162d;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    width: 100%;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    color: #e6f1ff;
    text-decoration: none;
    padding: 12px 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: #112240;
    color: #64ffda;
}

.nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #64ffda;
}

/* 响应式侧边栏 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-item {
        flex: 1 0 33.33%;
    }
    
    .nav-link {
        padding: 10px 5px;
        font-size: 13px;
    }
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #0c162d, #1a3a6d);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: #e6f1ff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 首页主标题 */
.main-header {
    background: linear-gradient(135deg, #0c162d, #1a3a6d);
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 跑马灯样式 */
.marquee-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 0;
    margin: 20px 0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.marquee {
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    color: #64ffda;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.main-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.main-header p {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    color: #e6f1ff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* 搜索框样式 */
.search-container {
    text-align: center;
    margin: 30px 0 0;
}

.search-container input[type="text"] {
    padding: 15px 25px;
    width: 400px;
    border-radius: 30px;
    border: 2px solid #64ffda;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.search-container input[type="text"]:focus {
    border-color: #64ffda;
    box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
    background-color: white;
}

.search-container button {
    padding: 15px 30px;
    background-color: #64ffda;
    color: #0c162d;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    margin-left: 15px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.search-container button:hover {
    background-color: #4dccba;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 图片轮播 */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slide {
    display: none;
    position: relative;
}

.slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.text {
    color: #fff;
    font-size: 20px;
    padding: 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #007bff;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* 内容容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* 页面介绍文字 */
.intro p {
    font-size: 1.3rem;
    color: #1a2b40;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.9;
    font-weight: 500;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 历史页面介绍文字特殊样式 */
.history-intro p {
    font-size: 1.3rem;
    color: #1a2b40;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.9;
    font-weight: 500;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* 首页介绍文字特殊样式 */
.main-header .intro p {
    font-size: 1.5rem;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    max-width: 900px;
    margin: 20px auto;
    padding: 25px;
    background-color: rgba(12, 22, 45, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(100, 255, 218, 0.3);
}

/* 武器卡片网格 */
.weapon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.weapon-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.weapon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.weapon-img {
    width: 100%;
    height: 200px;
    background-color: #0c162d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64ffda;
    font-weight: bold;
    overflow: hidden;
}

.weapon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.weapon-info {
    padding: 20px;
}

.weapon-info h3 {
    color: #007bff;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.weapon-info h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.weapon-info h3 a:hover {
    color: #0056b3;
}

.weapon-info p {
    margin-bottom: 15px;
    color: #666;
}

.weapon-info .specs {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.specs ul {
    list-style-type: none;
}

.specs li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.specs li:before {
    content: "•";
    color: #007bff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 视频区域 */
.video-section {
    margin: 40px 0;
}

.section-title {
    text-align: center;
    margin: 30px 0;
    color: #007bff;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background-color: #007bff;
    margin: 10px auto;
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.video-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.video-placeholder {
    width: 100%;
    height: 250px;
    background-color: #0c162d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64ffda;
    font-weight: bold;
}

.video-placeholder embed {
    width: 100%;
    height: 100%;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    color: #007bff;
    margin-bottom: 10px;
}

/* 页脚 */
footer {
    background-color: #0c162d;
    color: #e6f1ff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-item {
        flex: 1 0 33.33%;
    }
    
    .weapon-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .video-container {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .main-header p {
        font-size: 1.1rem;
    }
    
    .search-container input[type="text"] {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-container button {
        margin-left: 0;
        width: 100%;
    }
    
    .slide img {
        height: 300px;
    }
    
    .text {
        font-size: 16px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .nav-item {
        flex: 1 0 50%;
    }
    
    .nav-link {
        padding: 12px 5px;
        font-size: 14px;
    }
    
    .search-container input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .search-container button {
        margin-left: 0;
        width: 100%;
    }
    
    .slide img {
        height: 200px;
    }
    
    .text {
        font-size: 14px;
        padding: 10px;
    }
    
    .main-header {
        padding: 60px 15px;
    }
    
    .main-header h1 {
        font-size: 1.8rem;
    }
    
    .main-header p {
        font-size: 1rem;
    }
}

/* 表格样式 */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.specs-table th, .specs-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.specs-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #0056b3;
}

/* 卡片详情页样式 */
.weapon-detail {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.detail-img {
    width: 100%;
    height: 400px;
    background-color: #0c162d;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64ffda;
    font-weight: bold;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content h2 {
    color: #007bff;
    margin-bottom: 20px;
}

.detail-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 返回按钮 */
.back-btn {
    margin-bottom: 20px;
}

/* 社区页面样式 */
.post-form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #007bff;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 话题卡片样式 */
.weapon-card.topic-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.weapon-card.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.weapon-card.topic-card .weapon-info h3 {
    color: #007bff;
    margin-bottom: 10px;
}

.weapon-card.topic-card .weapon-info p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* 热门话题标签 */
.hot-tag {
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

/* 社区页面特定样式 */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.page-header h1 {
    color: #007bff;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 16px;
}

/* 侧边栏导航增强样式 */
.sidebar-nav .nav-link.active {
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .form-group input[type="text"],
    .form-group textarea {
        font-size: 14px;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
    }
    
    .weapon-card {
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .sidebar-nav {
        padding: 10px;
    }
    
    .sidebar-nav a {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    .post-form {
        padding: 15px;
    }
    
    footer {
        padding: 10px;
        font-size: 12px;
    }
    
    .topic-card .weapon-info h3 {
        font-size: 16px;
    }
    
    .topic-card .weapon-info p {
        font-size: 14px;
    }
    
    .hot-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .specs ul {
        font-size: 12px;
    }
    
    .topic-card {
        transition: all 0.3s ease;
    }
    
    .topic-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .topic-card.topic-card .weapon-info h3 {
        transition: color 0.3s ease;
    }
    
    .topic-card.topic-card:hover .weapon-info h3 {
        color: #0056b3;
    }
    
    .topic-card.topic-card .weapon-info p {
        transition: color 0.3s ease;
    }
    
    .topic-card.topic-card:hover .weapon-info p {
        color: #333;
    }
    
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}
