/* 基础样式 */
:root {
    --primary-color: #6e48aa;
    --secondary-color: #9d50bb;
    --accent-color: #4776e6;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #f8f9fa;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-color);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景 */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--dark-color) 0%, #16213e 100%);
}

.main-container {
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header-area {
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient 8s ease infinite;
    background-size: 200% 200%;
}

.domain {
    font-size: 1.1rem;
    display: block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.sub-title {
    font-size: 1.3rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    position: relative;
}

/* 选项卡样式 */
.tab-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.nav-tabs {
    border: none;
    justify-content: center;
    position: relative;
}

.nav-tabs .nav-item {
    margin: 0 0.5rem;
}

.nav-tabs .nav-link {
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.nav-tabs .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-tabs .nav-link.active {
    color: white;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 15px rgba(110, 72, 170, 0.4);
    transform: translateY(-3px);
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--secondary-color);
}

/* 内容区域样式 */
.content-area {
    padding-bottom: 2rem;
}

.category-list {
    background: rgba(26, 26, 46, 0.7);
    border-radius: 15px;
    padding: 1.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    transition: var(--transition);
}

.category-list:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.category-title {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.category-title i {
    margin-right: 0.7rem;
    color: var(--secondary-color);
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.category-list ul li {
    margin-bottom: 0;
}

.category-list ul li a {
    display: block;
    padding: 0.6rem 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.category-list ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: var(--transition);
}

.category-list ul li a:hover::before {
    left: 100%;
}

.category-list ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 1rem;
}

.category-list ul li a.active {
    background: linear-gradient(90deg, rgba(110, 72, 170, 0.3), transparent);
    color: white;
    border-left: 3px solid var(--secondary-color);
    font-weight: 500;
}

.category-list ul li a i {
    margin-right: 0.6rem;
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}

.content-display {
    background: rgba(26, 26, 46, 0.7);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 500px;
    transition: var(--transition);
    overflow-y: auto;
    max-height: 70vh;
}

.content-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.category-content {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* 内容项样式 */
.content-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    transition: var(--transition);
    border-left: 2px solid transparent;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.content-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
    border-left: 2px solid var(--secondary-color);
}

.content-item h4 {
    font-size: 1rem;
    margin-bottom: 0;
    color: white;
    display: flex;
    align-items: center;
    font-weight: 400;
}

.content-item h4 i {
    margin-right: 0.6rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
}

/* 子目录样式 */
.subcategory-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.content-item.has-subitems {
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
}

.content-item.has-subitems h4 {
    display: flex;
    align-items: center;
    width: 100%;
}

.arrow-icon {
    margin-right: 0.6rem;
    color: var(--secondary-color);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

/* 修复子项目布局 - 电脑端每行显示两个 */
.sub-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 默认两列布局 */
    gap: 0.8rem;
    margin-top: 0.8rem;
    padding-left: 1.5rem;
    width: 100%;
}

.sub-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
    width: 100%;
}

.sub-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.resource-icon, .subitem-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.6rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* 页脚样式 */
.footer-area {
    background: rgba(26, 26, 46, 0.8);
    padding: 2rem 0 1rem;
    margin-top: 2rem;
    position: relative;
}

.footer-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.footer-area h3 {
    color: white;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links i {
    margin-right: 0.6rem;
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(110, 72, 170, 0.4);
    z-index: 999;
    font-size: 1rem;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* 动画效果 */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 无链接样式 */
.no-link-style a {
    color: inherit;
    text-decoration: none;
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
}

.no-link-style a:hover {
    color: var(--secondary-color);
}

/* ============== 移动端优化 ============== */
/* 移动端分类选择器 */
.mobile-category-selector {
    position: sticky;
    top: 10px;
    z-index: 100;
}

.mobile-category-selector .input-group {
    background: rgba(26, 26, 46, 0.7);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.mobile-category-selector .btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px 0 0 50px;
    padding: 0.7rem 1.2rem;
    z-index: 2;
}

.mobile-category-selector .form-control {
    background: transparent;
    color: white;
    border: none;
    box-shadow: none;
    height: auto;
    padding: 0.7rem 1.2rem;
}

.mobile-category-selector .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 移动端分类面板 */
.mobile-category-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    padding: 1rem;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.mobile-category-panel .category-list {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mobile-category-header .category-title {
    margin-bottom: 0;
}

.close-category-panel {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-category-panel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-category-panel .category-list ul {
    grid-template-columns: 1fr;
}

/* 触摸优化 */
.content-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.sub-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-title {
        font-size: 2.3rem;
    }

    .sub-title {
        font-size: 1.1rem;
    }

    .nav-tabs .nav-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .content-display {
        min-height: 400px;
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .header-area {
        padding: 1.5rem 0;
    }

    .main-title {
        font-size: 2rem;
    }

    .domain {
        font-size: 1rem;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .nav-tabs .nav-item {
        margin: 0 0.3rem;
        flex-shrink: 0;
    }

    .category-list {
        margin-bottom: 1rem;
    }

    /* 隐藏桌面端目录 */
    .d-none.d-md-block {
        display: none !important;
    }

    /* 移动端内容区域全宽 */
    .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 移动端子目录优化 */
    .content-item.has-subitems {
        flex-direction: column;
        align-items: flex-start;
    }

    .sub-items-grid {
        grid-template-columns: 1fr; /* 移动端单列布局 */
        padding-left: 0.5rem;
    }

    .content-display {
        min-height: auto;
        max-height: none;
        padding: 1rem;
    }

    .content-item {
        padding: 0.7rem;
    }

    .content-item h4 {
        font-size: 0.95rem;
    }

    .footer-area .row > div {
        margin-bottom: 1.5rem;
    }

    .copyright p {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .main-title {
        font-size: 1.7rem;
    }

    .sub-title {
        font-size: 0.95rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .back-to-top {
        width: 38px;
        height: 38px;
        bottom: 15px;
        right: 15px;
        font-size: 0.9rem;
    }

    .category-title {
        font-size: 1.1rem;
    }

    .mobile-category-selector .btn,
    .mobile-category-selector .form-control {
        padding: 0.6rem 1rem;
    }

    .sub-item {
        padding: 0.5rem;
    }
}
/* 在index.css中添加 */
.search-container {
    margin: 1rem 0;
    background: rgba(26, 26, 46, 0.7);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container .input-group-text {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
}

.search-container .form-control {
    background: transparent;
    border: none;
    color: white;
    box-shadow: none;
}

.search-container .form-control:focus {
    background: transparent;
    color: white;
}

.search-container .btn {
    border-radius: 0 50px 50px 0;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: none;
}

.search-container .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
/* 在index.css中添加 */
.highlight {
    background-color: rgba(255, 255, 0, 0.3);
    padding: 0 2px;
    border-radius: 3px;
}

.badge {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}
/* 电影列表样式 */
.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
}

.movie-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.movie-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.movie-link {
    color: #2c3e50;
    text-decoration: none;
    display: block;
    font-size: 16px;
    font-weight: 500;
}

.movie-link:hover {
    color: #e74c3c;
}

.no-link {
    color: #7f8c8d;
    cursor: default;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .movie-list {
        grid-template-columns: 1fr;
    }
}
/* 视频列表样式 */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 15px;
}

.video-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.video-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
}

.video-link::before {
    content: "▶";
    margin-right: 10px;
    color: #9d50bb;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .video-item {
        padding: 12px;
    }

    .video-link {
        font-size: 14px;
    }
}
/* 优化视频链接样式 */
.video-link {
    color: #f8f9fa; /* 浅白色文字 */
    text-decoration: none; /* 去掉下划线 */
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 25px; /* 给图标留空间 */
}

/* 播放图标样式 */
.video-link::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #9d50bb; /* 紫色图标 */
    font-size: 14px;
    transition: all 0.3s ease;
}

/* 悬停效果 */
.video-link:hover {
    color: #fff; /* 悬停时纯白色 */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.video-link:hover::before {
    transform: scale(1.2); /* 图标放大 */
    color: #6e48aa; /* 悬停时深紫色 */
}

/* 去掉所有超链接的默认样式 */
a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #9d50bb;
}
