/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    color: #e0e0e0;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
}

/* 下拉菜单容器：相对定位，用于承载绝对定位的子菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}
  
  /* 下拉菜单内容：默认隐藏，绝对定位避免影响布局 */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #201e1e; /* 与导航栏背景一致 */
    min-width: 160px;
    box-shadow: 0 8px 16px #201e1e;
    z-index: 1; /* 确保下拉菜单在最上层 */
}
  
  /* 下拉菜单项样式 */
.dropdown-content li a {
    color: #ccc;
    padding: 12px 16px;
    text-decoration: none;
    display: block; /* 让链接占满整个菜单项区域，方便点击 */
}
  
  /* 下拉菜单项 hover 效果 */
.dropdown-content li a:hover {
    background-color: #222;
    color: #ff7f00; /* hover时文字变色，与主色调呼应 */
}
  
  /* 鼠标悬浮在下拉容器上时，显示子菜单 */
.dropdown:hover .dropdown-content {
    display: block;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.banners-link {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.banners-link:hover {
    color: #ff7f00;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a img:hover {
    color: #ff7f00;
    filter: brightness(1.5);
}

.nav-menu img {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* 横幅样式 - 所有banner类型统一样式 */
.banner, .banner-all, .banner-qiuyuan, .banner-yinlin, .banner-jiyan {
    padding: 2.75rem 2rem 4rem;
    margin-bottom: 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* 统一样式 */
}

.banner {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('banner-bg.jpg');
    background-size: cover;
    background-position: center;
}

.banner-all, .banner-qiuyuan, .banner-yinlin, .banner-jiyan {
    background-color: #1a1a1a;
    border-radius: 8px;
}

/* 统一banner标题样式 */
.banner h1, .banner-all h1, .banner-qiuyuan h1, .banner-yinlin h1, .banner-jiyan h1, .detail-main h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
    font-weight: bold;
    line-height: 1.2;
    font-family: 'Arial', sans-serif;
}

/* 统一banner内容样式 */
.banner p, .banner-all p, .banner-qiuyuan p, .banner-yinlin p, .banner-jiyan p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
    font-family: 'Arial', sans-serif;
}
/* 详情页两栏布局 */
.detail-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.detail-main {
    flex: 1;
    min-width: 0;
}

.event-details {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 8px;
    color: #e0e0e0;
    line-height: 1.6;
}

.event-summary {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

.banner-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: block;
}

.event-section {
    margin-bottom: 2rem;
}

.event-section:last-of-type {
    margin-bottom: 1.5rem;
}

.event-section-title {
    color: #ff7f00;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.event-section p {
    color: #e0e0e0;
    margin-bottom: 0;
}

.event-rules-list {
    list-style: none;
    padding-left: 0;
}

.event-rules-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #e0e0e0;
    line-height: 1.6;
}

.event-rules-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ff7f00;
    font-weight: bold;
    font-size: 1.2rem;
}

.event-rules-list li:last-child {
    margin-bottom: 0;
}

.event-note {
    color: #999;
    font-style: italic;
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

/* 侧边栏样式 - sticky定位 */
.sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

/* 版本导航栏样式 */
.version-nav {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.version-nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.version-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 6px;
    background-color: #232326;
    border: 1px solid #444;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    min-height: 40px;
    font-size: 1rem;
}

.version-nav-link:hover {
    background-color: #1a73e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    border-color: #1a73e8;
}

.version-nav-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
}

/* 版本导航样式已统一 */

/* 版本章节样式 */
.version-section {
    scroll-margin-top: 2rem;
}

.article-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-item {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.article-item:hover {
    transform: translateY(-2px);
}

.article-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.article-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background-color: #3f3f41;
}

.article-title {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #e0e0e0;
    flex: 1;
    transition: color 0.2s;
}

.article-link:hover .article-title {
    color: #ff7f00;
}

/* 统一标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Arial', sans-serif;
    color: #fff;
    margin-bottom: 1rem;
}

/* Resonators页面特定样式 - 确保与banner字体一致 */
.resonators-section h1, .resonators-section h2 {
    font-family: 'Arial', sans-serif;
    color: #fff;
    font-weight: bold;
}

/* Resonator卡片样式 */
.resonators-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.resonator-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
    display: inline-block;
}

.resonator-link:hover {
    transform: translateY(-4px);
}

.resonator-link:hover .resonator-card {
    background-color: #252525;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.resonator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    width: 150px; /* 与图片宽度相匹配 */
    text-align: center;
    transition: all 0.3s ease;
}

.resonator-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.resonator-info {
    flex: 1;
}

.resonator-name {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.resonator-desc {
    color: #e0e0e0;
    line-height: 1.5;
}

/* 底部正方形图片区域样式 */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

@media (max-width: 768px) {
    .bottom-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

.grid-item {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.grid-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.grid-text {
    padding: 1rem;
    text-align: center;
    color: #fff;
    background-color: #232326;
}

.grid-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.grid-description {
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-top: 0.5rem;
}

/* 确保Banners页面中的图片正常显示 */
.banner-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    display: block;
    background-color: #3f3f41;
}

.banner p, .banner-all p, .banner-qiuyuan p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.banner p a {
    color: #ff7f00;
    text-decoration: underline;
}

/* News 区块样式 */
.news-section {
    padding: 2rem 2rem 0;
}
.news-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
}
.news-arrow {
    color: #ff7f00;
    font-size: 2.6rem;
    vertical-align: 0.06em;
    margin-left: 0.2em;
}
.news-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.news-card {
    background: #232326;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: column;
    min-height: 360px;
    transition: transform 0.18s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.news-card:hover, .news-card:focus {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 6px 32px rgba(0,0,0,0.22);
    text-decoration: none;
}
.news-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #3f3f41;
}
.news-content {
    padding: 1.3rem 1rem 1rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-headline {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.1rem;
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    color: #bababa;
    font-size: 1rem;
    margin-top: auto;
}
.news-source {
    display: flex;
    align-items: center;
    gap: 0.3em;
}
.news-source img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.2em;
}
.news-date {
    font-size: 0.98rem;
    color: #bababa;
    display: flex;
    align-items: center;
}

/* 响应式适配（feature-grid 相关已移除） */
@media (max-width: 768px) {
    .banners-link {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .banner {
        padding: 2rem 1.5rem 3rem;
        min-height: 300px;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .banners-link {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .banner {
        padding: 1.5rem 1rem 2rem;
        min-height: 250px;
        justify-content: flex-start;
    }
    
    .nav-menu {
        display: none;
    }
}

@media (max-width: 1200px) {
    .news-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    .news-cards {
        grid-template-columns: 1fr;
    }
    .news-title {
        font-size: 2rem;
    }
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: #ff7f00;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top:hover {
    background-color: #ff9500;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 127, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top.show {
    display: flex;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* 详情页响应式 */
@media (max-width: 1024px) {
    .detail-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}