/* ==========================================================================
   黑丝 - 汽车改装与视频社区 原创样式表
   主题色：赛车红 (#DC143C) + 碳纤维黑 (#1A1A1A)
   ========================================================================== */

:root {
    --primary-color: #DC143C; /* 赛车红 */
    --primary-hover: #B22222;
    --secondary-color: #FF4500;
    --dark-bg: #111111; /* 极夜黑 */
    --card-bg: #1E1E1E; /* 碳纤灰 */
    --text-main: #F5F5F5;
    --text-muted: #AAAAAA;
    --border-color: #333333;
    --neon-glow: 0 0 10px rgba(220, 20, 60, 0.5);
    --font-family: 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

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

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

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.bg-light { background-color: #151515; }

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: var(--neon-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.6);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--neon-glow);
}

.btn-sm {
    padding: 6px 15px;
    font-size: 14px;
}

/* 头部导航 */
.site-header {
    background-color: rgba(17, 17, 17, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 40px;
}

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

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* 搜索框区域 */
.search-container {
    background-color: var(--card-bg);
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    display: none; /* 默认隐藏，可通过JS切换 */
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 0 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(17,17,17,0.9) 0%, rgba(17,17,17,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ddd;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero-actions {
    display: flex;
    gap: 15px;
}

/* 章节标题 */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 60px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 20px;
}

/* 视频卡片 */
.video-section {
    padding-bottom: 60px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), var(--neon-glow);
    border-color: var(--primary-color);
}

.video-thumb {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
}

.video-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
}

.video-card:hover .video-thumb::before {
    background-color: rgba(0,0,0,0.1);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px;
    height: 60px;
    background-color: rgba(220, 20, 60, 0.8);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.video-card:hover .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* 模拟播放状态 */
.video-card.playing .play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(220, 20, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 20, 60, 0); }
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card:hover .video-title {
    color: var(--primary-color);
}

.video-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.video-desc {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--dark-bg);
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

/* 专家展示 */
.expert-section {
    padding-bottom: 60px;
}

.expert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.expert-card {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.expert-img {
    width: 180px;
    object-fit: cover;
}

.expert-info {
    padding: 20px;
    flex: 1;
}

.expert-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.expert-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.expert-actions {
    display: flex;
    gap: 10px;
}

/* 用户评价 */
.review-section {
    padding-bottom: 60px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.review-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

.review-stars {
    color: #FFD700;
    font-size: 20px;
    margin-bottom: 15px;
}

.review-text {
    font-size: 14px;
    font-style: italic;
    margin-bottom: 15px;
    color: #ddd;
}

.review-author {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: bold;
    text-align: right;
}

/* FAQ */
.faq-section {
    padding-bottom: 60px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--card-bg);
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(220, 20, 60, 0.1);
}

.faq-question h3 {
    font-size: 16px;
    margin: 0;
}

.faq-icon {
    font-size: 24px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-muted);
    font-size: 14px;
}

.faq-item.active .faq-answer {
    padding: 0 20px 18px;
    max-height: 200px;
}

/* 底部区域 */
.site-footer {
    background-color: #0A0A0A;
    padding: 60px 0 20px;
    border-top: 2px solid var(--primary-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.social-share span {
    display: block;
    margin-bottom: 10px;
    color: #fff;
}

.share-icon {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--card-bg);
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.wx-icon:hover { background-color: #07C160; color: #fff; }
.wb-icon:hover { background-color: #E6162D; color: #fff; }
.dy-icon:hover { background-color: #000000; color: #fff; }
.bz-icon:hover { background-color: #00A1D6; color: #fff; }

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links li, .contact-info li {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.qr-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qr-box {
    text-align: center;
}

.qr-box img {
    width: 100px;
    height: 100px;
    margin: 0 auto 5px;
    border: 2px solid var(--card-bg);
}

.qr-box p {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

/* MCP挂件 */
.mcp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    border: 1px solid var(--primary-color);
    z-index: 9999;
    overflow: hidden;
}

.mcp-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.mcp-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.mcp-body {
    padding: 15px;
}

.mcp-body p {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.mcp-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

/* 内页样式 */
.page-header {
    background-color: #151515;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-main);
}

.content-section {
    padding: 40px 0 60px;
}

.category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 20px;
    background-color: var(--card-bg);
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.tab.active, .tab:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link, .page-current {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 4px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.page-current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 社区布局 */
.community-layout {
    display: flex;
    gap: 30px;
}

.community-main {
    flex: 1;
}

.community-sidebar {
    width: 300px;
}

.post-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.username {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
}

.time {
    font-size: 12px;
    color: var(--text-muted);
}

.post-tag {
    font-size: 12px;
    padding: 3px 8px;
    background-color: rgba(220, 20, 60, 0.2);
    color: var(--primary-color);
    border-radius: 4px;
}

.post-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #888;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.sidebar-widget {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

.topic-list li {
    margin-bottom: 10px;
}

.brand-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.brand-tag {
    padding: 5px 10px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    color: #ccc;
}

/* 关于我们 */
.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text h3 {
    margin: 25px 0 15px;
    color: #fff;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.about-text ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-muted);
}

.about-text li {
    margin-bottom: 10px;
    list-style-type: square;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--neon-glow);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .about-content {
        flex-direction: column;
    }
    .community-layout {
        flex-direction: column;
    }
    .community-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: rgba(17, 17, 17, 0.98);
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav .nav-list {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #222;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .expert-grid {
        grid-template-columns: 1fr;
    }
    
    .expert-card {
        flex-direction: column;
    }
    
    .expert-img {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions {
        flex-direction: column;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }
}
