/* style.css */
:root {
    /* 色彩系统更新：星云紫和深紫罗兰空间 */
    --primary-color: #9D4EDD;
    --primary-hover: #E0AAFF;
    --bg-dark: #0b0410;
    --bg-card: rgba(26, 11, 46, 0.45);
    --text-main: #f8fafc;
    --text-muted: #c7a1eb;
    --border-color: rgba(157, 78, 221, 0.4);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* 全屏画布背景 */
#galaxy-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Glassmorphism 组件通用毛玻璃效果 */
.card, .price-card, .faq-item, .hero p, header, .page-content {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 25px;
    border-radius: 0 0 16px 16px;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-hover);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.8);
}

.header-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.header-nav a {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.header-nav a:hover {
    color: var(--primary-hover);
    text-shadow: 0 0 8px var(--primary-color);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 20px;
    gap: 40px;
    text-align: left;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 24px;
    line-height: 1.2;
    background: linear-gradient(to right, #f8fafc, #9D4EDD, #E0AAFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(157, 78, 221, 0.4);
}

.hero p {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 40px;
    padding: 20px 30px;
    border-radius: 12px;
}

.hero p strong {
    color: var(--primary-hover);
}

/* Hero Visual SVG 动画 */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-visual svg {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 0 20px rgba(157, 78, 221, 0.3));
}
.ring1 { transform-origin: 100px 100px; animation: spinX 12s linear infinite; }
.ring2 { transform-origin: 100px 100px; animation: spinY 18s linear infinite; }
.ring3 { transform-origin: 100px 100px; animation: spinZ 24s linear infinite; }

@keyframes spinX { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(180deg); } }
@keyframes spinY { 0% { transform: rotateY(0deg) rotateZ(0deg); } 100% { transform: rotateY(360deg) rotateZ(180deg); } }
@keyframes spinZ { 0% { transform: rotateZ(0deg) rotateX(0deg); } 100% { transform: rotateZ(360deg) rotateX(360deg); } }

/* 垂直跑马灯看板 */
.marquee-container {
    height: 60px;
    overflow: hidden;
    background: rgba(157, 78, 221, 0.15);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
    backdrop-filter: blur(8px);
}

.marquee-content {
    display: flex;
    flex-direction: column;
    animation: scroll-vertical 12s linear infinite;
    text-align: center;
    color: #E0AAFF;
    font-weight: bold;
    letter-spacing: 1px;
}

.marquee-item {
    height: 60px;
    line-height: 60px;
    white-space: nowrap;
}

@keyframes scroll-vertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(-240px); } /* 4 items * 60px */
}

/* CTA Buttons */
.cta-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    cursor: pointer;
    border: 1px solid #C77DFF;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

.cta-btn:hover {
    background-color: var(--primary-hover);
    color: #0b0410;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 25px rgba(224, 170, 255, 0.8);
}

.header-cta {
    padding: 10px 20px;
    font-size: 15px;
}

/* Sections Common */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    padding-top: 80px;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.5);
}

/* Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Cards */
.card {
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-hover);
    box-shadow: 0 8px 32px 0 rgba(157, 78, 221, 0.3);
}

.card .icon {
    font-size: 40px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.card h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: #fff;
}

.card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Pricing Section (3D Carousel) */
.pricing-perspective {
    perspective: 1200px;
    width: 100%;
    height: 550px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 60px;
}

.pricing-grid {
    position: absolute;
    width: 320px;
    height: 500px;
    transform-style: preserve-3d;
    animation: carousel-spin 20s infinite linear;
    display: block; /* Override default grid on desktop */
}

/* 悬停时停止旋转，方便点击购买 */
.pricing-grid:hover {
    animation-play-state: paused;
}

.price-card {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    backface-visibility: hidden;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.price-card.popular {
    border-color: var(--primary-hover);
}

.price-card.popular::before {
    content: '最具性价比';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.8);
}

@keyframes carousel-spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-360deg); }
}

.price-title { font-size: 24px; margin-bottom: 10px; }
.price { font-size: 48px; font-weight: bold; margin: 20px 0; color: var(--primary-hover); text-shadow: 0 0 15px rgba(224, 170, 255, 0.5); }
.price span { font-size: 16px; color: var(--text-muted); font-weight: normal; text-shadow: none; }
.features { list-style: none; margin-bottom: 30px; text-align: left; flex-grow: 1; }
.features li { margin-bottom: 16px; padding-left: 28px; position: relative; color: var(--text-muted); }
.features li::before { content: '✦'; color: var(--primary-hover); position: absolute; left: 0; }
.price-card .cta-btn { width: 100%; }

/* Testimonials */
.testimonial-card { text-align: left; padding: 30px; }
.testimonial-text { font-style: italic; margin-bottom: 20px; font-size: 16px; color: var(--text-muted); }
.testimonial-author { font-weight: bold; color: var(--primary-hover); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto; }
.faq-item { padding: 30px; border-radius: 12px; }
.faq-item h4 { margin-bottom: 12px; font-size: 18px; color: #fff; }
.faq-item p { color: var(--text-muted); font-size: 15px; }

/* Subpages Content Styles */
.page-content {
    padding: 60px 40px;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 16px;
    margin-top: 40px;
}
.page-content h1 { font-size: 32px; margin-bottom: 30px; text-align: center; color: var(--primary-hover); }
.page-content h2 { font-size: 24px; margin-top: 40px; margin-bottom: 16px; color: #fff; }
.page-content p { margin-bottom: 16px; color: var(--text-muted); }
.page-content ul { margin-bottom: 20px; padding-left: 20px; color: var(--text-muted); }
.page-content li { margin-bottom: 10px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--primary-color); font-weight: 600; }
.back-link:hover { text-decoration: underline; color: var(--primary-hover); }

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 40px;
    margin-top: 100px;
    text-align: center;
    color: var(--text-muted);
}
.footer-links { margin-bottom: 30px; display: flex; justify-content: center; gap: 40px; }
.footer-links a { transition: color 0.3s; font-size: 15px; }
.footer-links a:hover { color: var(--primary-hover); text-shadow: 0 0 8px var(--primary-hover); }
.copyright { font-size: 14px; opacity: 0.7; }

/* Mobile Responsive - Media Queries */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 10px;
    }
    .hero-content { margin: 0 auto; }
    .hero-visual { width: 100%; margin-top: 20px; }
    
    /* 禁用 3D Carousel 转为普通堆叠网格以适配手机 */
    .pricing-perspective {
        perspective: none;
        height: auto;
        display: block;
        margin-bottom: 40px;
    }
    .pricing-grid {
        position: relative;
        width: 100%;
        height: auto;
        transform-style: flat;
        animation: none;
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 400px;
        margin: 0 auto;
    }
    .price-card {
        position: relative;
        transform: none !important;
        height: auto;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 15px;
    }
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
        margin-bottom: 15px;
        width: 100%;
    }
    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; padding: 15px; }
    .grid, .faq-grid { grid-template-columns: 1fr; }
    .card { padding: 30px 20px; }
    .cta-btn { display: block; width: 100%; padding: 20px; font-size: 20px; }
    .header-cta { display: none; }
    .footer-links { flex-direction: column; gap: 20px; }
}

/* === SEO & Accessibility Updates === */
*[id] { scroll-margin-top: 100px; }
.skip-link {
    position: absolute; top: -50px; left: 0; background: var(--primary-hover);
    color: #fff; padding: 10px 20px; z-index: 10000; transition: top 0.3s;
    font-weight: bold;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px dashed #E0AAFF; outline-offset: 4px; }

/* Pricing Table Semantic roles fallback */
.pricing-grid[role="table"] { display: flex; /* keep carousel working */ }

/* FAQ Details/Summary resets */
details { background: rgba(157, 78, 221, 0.05); border: 1px solid rgba(157, 78, 221, 0.2); border-radius: 8px; padding: 15px; margin-bottom: 15px; }
summary { font-size: 18px; font-weight: bold; color: #E0AAFF; cursor: pointer; list-style: none; outline: none; }
summary::-webkit-details-marker { display: none; }
details p, details dd { color: var(--text-muted); margin-top: 10px; line-height: 1.6; }
