/* ==========================================
   八戒Bajie 官网落地页核心样式表 (index.css)
   ========================================== */

/* 引入谷歌字体 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Noto+Sans+SC:wght@300;400;700;900&display=swap');

:root {
    --primary-color: #8a2be2;
    --primary-glow: rgba(138, 43, 226, 0.6);
    --secondary-color: #d8b4fe;
    --accent-color: #ff79c6;
    --bg-dark: #0c0714;
    --bg-card: rgba(25, 15, 38, 0.65);
    --border-color: rgba(216, 180, 254, 0.2);
    --border-hover: rgba(216, 180, 254, 0.5);
    --text-main: #f3f0f7;
    --text-muted: #c3b5d0;
    --font-outfit: 'Outfit', 'Noto Sans SC', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-outfit);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0510;
}
::-webkit-scrollbar-thumb {
    background: #4a2872;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 背景 Canvas 容器 */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 鼠标尾翼粒子样式 */
.cursor-particle {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: fadeOut 0.8s forwards ease-out;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
}

/* 全局二次元网格背景与渐变光晕 */
.bg-glow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(216, 180, 254, 0.1) 0%, transparent 45%),
        linear-gradient(rgba(138, 43, 226, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 43, 226, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    z-index: -2;
    pointer-events: none;
}

/* 紫白渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--secondary-color) 70%, #d8b4fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
}

/* 常用玻璃容器 */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px 0 rgba(138, 43, 226, 0.2);
}

/* 头部 Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 7, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 15px var(--primary-glow);
    object-fit: cover;
    animation: pulseLogo 4s infinite alternate;
}

@keyframes pulseLogo {
    0% { transform: scale(1); box-shadow: 0 0 10px var(--primary-glow); }
    100% { transform: scale(1.05); box-shadow: 0 0 20px var(--accent-color); }
}

/* H1 标题样式 */
h1.brand-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* 右侧实时注册统计 */
.live-counter-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(216, 180, 254, 0.2);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #50fa7b;
    border-radius: 50%;
    box-shadow: 0 0 10px #50fa7b;
    animation: blinkIndicator 1.5s infinite;
}

@keyframes blinkIndicator {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.live-counter-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.live-number {
    color: #ffd166;
    font-weight: 700;
    font-family: monospace;
    margin-left: 3px;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    padding: 120px 5% 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-pig-mascot {
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
    animation: floatMascot 6s ease-in-out infinite;
    filter: drop-shadow(0 0 25px var(--primary-glow));
}

@keyframes floatMascot {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.4);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(138, 43, 226, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: 0.8s;
}

.cta-button:hover::after {
    left: 120%;
}

/* 核心指示符容器 */
section {
    padding: 80px 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* H2 文章滑动排序组件 */
.articles-container {
    display: flex;
    gap: 30px;
    height: 600px;
    align-items: stretch;
}

.articles-sidebar {
    width: 28%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 10px;
}

.article-nav-item {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.article-nav-item:hover, .article-nav-item.active {
    background: rgba(138, 43, 226, 0.15);
    border-color: var(--secondary-color);
    transform: translateX(5px);
}

.article-nav-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-nav-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.articles-scrollview {
    width: 72%;
    overflow-y: auto;
    padding-right: 15px;
    scroll-behavior: smooth;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(15, 8, 25, 0.8);
    padding: 30px;
}

.article-content-wrapper {
    margin-bottom: 60px;
    border-bottom: 1px dashed rgba(216, 180, 254, 0.2);
    padding-bottom: 40px;
}

.article-content-wrapper:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-content-wrapper h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.article-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: justify;
    text-justify: inter-word;
    letter-spacing: 0.5px;
}

.article-text p {
    margin-bottom: 18px;
    text-indent: 2em;
}

.article-text a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.article-text a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--accent-color);
}

/* H3 价格滑动卡片 */
.packages-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.packages-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 20px 10px 40px;
    scrollbar-width: auto;
}

/* 自定义滚动条风格 */
.packages-slider::-webkit-scrollbar {
    height: 8px;
}
.packages-slider::-webkit-scrollbar-track {
    background: rgba(12, 7, 20, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(216, 180, 254, 0.1);
}
.packages-slider::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #8a2be2, #ff79c6);
    border-radius: 10px;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
.packages-slider::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, #ff79c6, #ff9ff3);
}

.package-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    border-radius: 24px;
    padding: 35px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: rgba(20, 10, 30, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 动态背景反光遮罩效果 */
.package-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.package-card:hover::after {
    left: 150%;
}

/* 定义各卡片的色彩主题 */
.package-card:nth-child(1) { --card-glow: rgba(0, 242, 254, 0.25); --card-accent: #00f2fe; }
.package-card:nth-child(2) { --card-glow: rgba(162, 155, 254, 0.25); --card-accent: #a29bfe; }
.package-card:nth-child(3) { --card-glow: rgba(255, 121, 198, 0.45); --card-accent: #ff79c6; }
.package-card:nth-child(4) { --card-glow: rgba(186, 104, 200, 0.25); --card-accent: #ba68c8; }
.package-card:nth-child(5) { --card-glow: rgba(255, 184, 108, 0.25); --card-accent: #ffb86c; }
.package-card:nth-child(6) { --card-glow: rgba(255, 85, 85, 0.25); --card-accent: #ff5555; }

/* 顶部霓虹边框线 */
.package-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--card-accent);
    box-shadow: 0 0 10px var(--card-accent);
}

.package-card.popular {
    border-color: var(--card-accent);
    transform: scale(1.03);
    box-shadow: 0 15px 35px var(--card-glow);
}

.package-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--card-accent);
    color: #0c0714;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 12px;
    box-shadow: 0 0 10px var(--card-accent);
}

.package-name {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #ffffff;
}

.package-price {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    color: #ffffff;
    text-shadow: 0 0 15px var(--card-glow);
}

.package-price span {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

.package-features {
    list-style: none;
    margin-bottom: 35px;
    flex-grow: 1;
}

.package-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.package-features li::before {
    content: '★';
    color: var(--card-accent);
    text-shadow: 0 0 8px var(--card-accent);
    font-weight: bold;
}

.package-btn {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    border: 1px solid var(--card-accent);
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.05);
}

.package-card:hover {
    transform: translateY(-12px);
    border-color: var(--card-accent);
    box-shadow: 0 20px 40px var(--card-glow);
}

.package-card.popular:hover {
    transform: translateY(-12px) scale(1.03);
}

.package-card:hover .package-btn {
    background: var(--card-accent);
    color: #0c0714;
    border-color: transparent;
    box-shadow: 0 5px 20px var(--card-accent);
}

/* H4 用户反馈与节点测速区 */
.h4-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* 自动轮播反馈卡片 */
.reviews-container {
    height: 380px;
    overflow: hidden;
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(20, 10, 30, 0.5);
    padding: 25px;
}

.reviews-scroll-wrapper {
    height: calc(100% - 40px);
    overflow: hidden;
    position: relative;
    margin-top: 10px;
}

.reviews-slider {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: autoScrollReviews 25s linear infinite;
}

.reviews-slider:hover {
    animation-play-state: paused;
}

@keyframes autoScrollReviews {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); } /* 滚动一半实现无缝衔接 */
}

.review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(216, 180, 254, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.review-card:hover {
    background: rgba(138, 43, 226, 0.1);
    border-color: var(--secondary-color);
}

.review-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4a2872;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.review-user-details h5 {
    font-size: 0.9rem;
    font-weight: 700;
}

.review-stars {
    color: #ffb86c;
    font-size: 0.75rem;
}

.review-comment {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 节点测速组件 */
.speed-test-panel {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(20, 10, 30, 0.5);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.speed-test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(216, 180, 254, 0.1);
    padding-bottom: 12px;
}

.speed-test-header h4 {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-refresh-badge {
    background: rgba(80, 250, 123, 0.15);
    color: #50fa7b;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.nodes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.node-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.node-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.node-name {
    font-weight: 600;
}

.node-ping {
    color: #50fa7b;
    font-family: monospace;
}

.node-ping.high {
    color: #ff5555;
}

.speed-progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.speed-progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* H5 FAQ 动态并排手风琴 */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.faq-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(25, 15, 38, 0.5);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.faq-card:hover {
    border-color: var(--border-hover);
    background: rgba(138, 43, 226, 0.08);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
}

.faq-icon {
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.faq-card.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, margin-top 0.4s ease;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-card.open .faq-answer {
    max-height: 200px;
    margin-top: 15px;
}

/* 页脚和友情链接 */
footer {
    padding: 50px 5% 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: #08040d;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

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

.footer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.footer-logo span {
    font-size: 1.2rem;
    font-weight: 800;
}

.pbn-links-area {
    margin-top: 15px;
    font-size: 0.8rem;
    color: rgba(195, 181, 208, 0.4);
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.pbn-link {
    color: rgba(216, 180, 254, 0.4);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.8rem;
}

.pbn-link:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 5px var(--primary-glow);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ==========================================
   媒体查询 (移动端与平板适配)
   ========================================== */

@media (max-width: 1024px) {
    .h4-section-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 4%;
    }
    
    h1.brand-title {
        font-size: 1.3rem;
    }
    
    .live-counter-box {
        padding: 4px 10px;
    }
    
    .live-counter-text {
        font-size: 0.75rem;
    }
    
    .hero {
        padding: 100px 4% 40px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .cta-button {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* 文章滑动区域变为垂直堆叠或简单折叠 */
    .articles-container {
        flex-direction: column;
        height: auto;
    }
    
    .articles-sidebar {
        width: 100%;
        flex-direction: row;
        height: auto;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .article-nav-item {
        flex: 0 0 160px;
        padding: 10px;
    }
    
    .article-nav-item h4 {
        font-size: 0.85rem;
    }
    
    .articles-scrollview {
        width: 100%;
        height: 450px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .packages-slider {
        gap: 15px;
    }
    
    .package-card {
        flex: 0 0 280px;
        padding: 25px 15px;
    }
    
    .speed-test-panel, .reviews-container {
        padding: 15px;
    }
}
