/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 颜色变量 */
:root {
    --primary: #C8102E;
    --secondary: #FFD700;
    --dark: #1A1A1A;
    --light: #F8F8F8;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #C8102E 0%, #8B0000 100%);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.logo-icon {
    font-size: 28px;
    color: #FFD700;
    text-shadow: 0 0 4px #000;
}

.logo h1 {
    font-size: 24px;
    text-shadow: 2px 2px 4px #000;
}

.domain {
    font-size: 12px;
    color: #fff;
    margin-left: 8px;
}

.search-box {
    flex: 1;
    max-width: 380px;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    outline: none;
    border-radius: 4px 0 0 4px;
}

.search-box button {
    background: #FFD700;
    border: none;
    padding: 0 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: 0.3s;
}

.search-box button:hover {
    background: #ffc107;
}

.contact-info {
    color: white;
    font-size: 13px;
    display: flex;
    gap: 15px;
}

/* 导航 */
.nav-menu {
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    margin-bottom: 10px;
}

.nav-menu ul {
    display: flex;
    flex-wrap: wrap;
}

.nav-menu li {
    padding: 10px 16px;
    color: white;
    transition: 0.3s;
}

.nav-menu li.active {
    border-bottom: 2px solid #FFD700;
    font-weight: bold;
}

.nav-menu li:hover {
    background: rgba(200,16,46,0.8);
}

/* 内容区块 */
.section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.section-header h2 {
    color: var(--primary);
    font-size: 18px;
}

/* 动画 */
.section-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.hover-scale {
    transition: 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 按钮 */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background: var(--secondary);
    color: #000;
}

.btn-default {
    background: #eee;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* 表格 */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead tr {
    background: var(--light);
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #fafafa;
}

/* 标签 */
.tag {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
}

.tag.green { background: #e6f6e6; color: #2e7d32; }
.tag.blue { background: #e3f2fd; color: #0d47a1; }
.tag.purple { background: #f3e5f5; color: #7b1fa2; }
.tag.yellow { background: #fff8e1; color: #ff8f00; }
.tag.red { background: #ffebee; color: #c62828; }
.tag.indigo { background: #e8eaf6; color: #303f9f; }

/* 公告 */
.notice {
    background: #fff9c4;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 14px;
}

/* 新闻 */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.news-item {
    background: #f8f8f8;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    gap: 12px;
}

.news-item img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.news-item h3 {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 6px;
}

.news-item p {
    font-size: 12px;
    color: #666;
}

.meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* 攻略 */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.guide-item {
    background: #f8f8f8;
    padding: 12px;
    border-radius: 6px;
}

.guide-icon {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.guide-item h3 {
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 15px;
}

.guide-item p {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.tip {
    font-size: 12px;
    color: var(--primary);
    font-weight: bold;
}

/* 分类 */
.cate-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    text-align: center;
}

.cate-item {
    background: #f8f8f8;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid transparent;
}

.cate-item:hover {
    border-color: var(--primary);
}

.cate-icon {
    width: 40px;
    height: 40px;
    background: rgba(200,16,46,0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 18px;
}

.label {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    margin-top: 8px;
}

.label.hot { background: var(--primary); }
.label.rich { background: var(--secondary); color: #000; }
.label.blue { background: #1976d2; }
.label.purple { background: #7b1fa2; }
.label.red { background: #d32f2f; }
.label.green { background: #388e3c; }
.label.indigo { background: #303f9f; }
.label.gray { background: #616161; }

/* 联系 */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.c-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qrcode {
    width: 100px;
    height: 100px;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: 8px;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-form input,
.message-form select,
.message-form textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.message-form input:focus,
.message-form textarea:focus {
    border-color: var(--primary);
}

/* 底部 */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 30px 0;
    margin-top: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.footer h3 {
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-size: 16px;
}

.footer p, .footer li {
    font-size: 13px;
    color: #ccc;
    line-height: 1.8;
}

.footer li:hover {
    color: var(--secondary);
}

.social {
    display: flex;
    gap: 10px;
}

.social span {
    width: 32px;
    height: 32px;
    background: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    margin-top: 25px;
    padding-top: 15px;
    font-size: 13px;
    color: #888;
}

/* 返回顶部 */
.back-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式 */
@media (max-width: 768px) {
    .news-grid, .guide-grid, .cate-grid, .contact-wrap, .footer-grid {
        grid-template-columns: 1fr;
    }
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-box {
        max-width: 100%;
    }
}