/* ============================================
   江湖聊天室 Go版 - 古风武侠主题样式
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --ink-black: #1a1a1a;
    --cinnabar: #c0392b;
    --cinnabar-dark: #962d23;
    --xuan-paper: #f5f0e8;
    --sandalwood: #8b4513;
    --gold: #d4a017;
    --jade: #2d5a27;
    --fog-gray: #d5d0c8;
    --parchment: #f8f4eb;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Noto Serif SC", "STSong", "SimSun", "Source Han Serif SC", serif;
    background-color: var(--xuan-paper);
    color: var(--ink-black);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Paper texture background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(139, 69, 19, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(192, 57, 43, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

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

a:hover {
    color: var(--cinnabar-dark);
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.4;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

/* ---------- Layout ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--cinnabar);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 4px;
}

.nav-logo span {
    color: var(--cinnabar);
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--xuan-paper);
    font-size: 0.95rem;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 4px;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--xuan-paper);
    transition: all 0.3s ease;
}

/* ---------- Hero Section ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    background:
        linear-gradient(180deg, rgba(26, 26, 26, 0.9) 0%, rgba(26, 26, 26, 0.7) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" x="10" font-size="80" opacity="0.03">剑</text></svg>');
    background-size: cover;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: var(--cinnabar);
    color: var(--xuan-paper);
    font-size: 0.9rem;
    letter-spacing: 4px;
    border-radius: 2px;
    margin-bottom: 32px;
    animation: fadeInDown 0.8s ease;
}

.hero h1 {
    color: var(--xuan-paper);
    font-size: 3.5rem;
    letter-spacing: 8px;
    margin-bottom: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease;
}

.hero h1 .highlight {
    color: var(--gold);
}

.hero-subtitle {
    color: var(--fog-gray);
    font-size: 1.25rem;
    letter-spacing: 2px;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1rem;
    font-family: inherit;
    letter-spacing: 2px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--cinnabar);
    color: var(--xuan-paper);
    border: 2px solid var(--cinnabar);
}

.btn-primary:hover {
    background: var(--cinnabar-dark);
    border-color: var(--cinnabar-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
}

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

.btn-outline:hover {
    background: var(--cinnabar);
    color: var(--xuan-paper);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

/* ---------- Section Common ---------- */
.section {
    padding: 100px 0;
}

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

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.section-header h2::before,
.section-header h2::after {
    content: '—';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cinnabar);
    font-size: 1.5rem;
}

.section-header h2::before { left: -40px; }
.section-header h2::after { right: -40px; }

.section-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Decorative divider */
.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    width: 60px;
    height: 1px;
    background: var(--cinnabar);
}

.divider-icon {
    color: var(--cinnabar);
    font-size: 1.2rem;
}

/* ---------- Features Section ---------- */
.features {
    background: var(--parchment);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--xuan-paper);
    padding: 40px 32px;
    border: 1px solid var(--fog-gray);
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cinnabar);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--parchment);
    border-radius: 50%;
    border: 2px solid var(--cinnabar);
}

.feature-card h3 {
    margin-bottom: 12px;
    color: var(--ink-black);
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ---------- Performance Section ---------- */
.performance {
    background: var(--ink-black);
    color: var(--xuan-paper);
}

.performance .section-header h2 { color: var(--xuan-paper); }
.performance .section-header p { color: var(--fog-gray); }

.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.compare-table thead {
    background: var(--cinnabar);
}

.compare-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 1px;
}

.compare-table td {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.compare-table .highlight-cell {
    color: var(--gold);
    font-weight: 600;
}

.table-caption {
    text-align: center;
    color: var(--fog-gray);
    font-style: italic;
    margin-top: -32px;
    margin-bottom: 48px;
}

/* ---------- Capabilities Section ---------- */
.capabilities {
    background: var(--parchment);
}

.cap-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.cap-tab {
    padding: 10px 24px;
    background: transparent;
    border: 2px solid var(--fog-gray);
    border-radius: 2px;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cap-tab.active,
.cap-tab:hover {
    background: var(--cinnabar);
    border-color: var(--cinnabar);
    color: var(--xuan-paper);
}

.cap-content {
    display: none;
}

.cap-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.cap-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cap-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--xuan-paper);
    border: 1px solid var(--fog-gray);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cap-item:hover {
    border-color: var(--cinnabar);
    box-shadow: 0 4px 12px var(--shadow);
}

.cap-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--parchment);
    border-radius: 50%;
}

.cap-item-text h4 {
    margin-bottom: 4px;
}

.cap-item-text p {
    color: #666;
    font-size: 0.9rem;
}

/* ---------- Pricing Section ---------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.price-card {
    background: var(--xuan-paper);
    border: 2px solid var(--fog-gray);
    border-radius: 4px;
    padding: 40px 28px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow);
}

.price-card.featured {
    border-color: var(--cinnabar);
    transform: scale(1.05);
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 20px;
    background: var(--cinnabar);
    color: var(--xuan-paper);
    font-size: 0.8rem;
    letter-spacing: 2px;
    border-radius: 2px;
}

.price-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.price-users {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--cinnabar);
    margin-bottom: 4px;
}

.price-amount .currency {
    font-size: 1.2rem;
    vertical-align: top;
}

.price-note {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.price-features {
    list-style: none;
    margin-bottom: 28px;
    text-align: left;
    flex-grow: 1;
}

.price-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fog-gray);
    font-size: 0.9rem;
}

.price-features li::before {
    content: '✓ ';
    color: var(--jade);
    font-weight: 700;
}

/* ---------- FAQ Section ---------- */
.faq {
    background: var(--parchment);
}

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

.faq-item {
    border: 1px solid var(--fog-gray);
    border-radius: 4px;
    margin-bottom: 12px;
    background: var(--xuan-paper);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(192, 57, 43, 0.05);
}

.faq-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--cinnabar);
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    color: #555;
    line-height: 1.8;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--ink-black);
    color: var(--fog-gray);
    padding: 60px 0 30px;
}

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

.footer-brand h3 {
    color: var(--gold);
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #999;
    line-height: 1.8;
}

.footer-links h4 {
    color: var(--xuan-paper);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #999;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* ---------- Animations ---------- */

.kernel-code-block {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kernel-code-block pre {
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--cinnabar);
    color: var(--xuan-paper);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--cinnabar-dark);
    transform: translateY(-4px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-card.featured {
        transform: none;
    }

    .price-card.featured:hover {
        transform: translateY(-8px);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.98);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 2px solid var(--cinnabar);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .features-grid,
    .cap-list {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .compare-table {
        font-size: 0.85rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 10px 12px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header h2::before,
    .section-header h2::after {
        display: none;
    }

    #kernel pre {
        padding: 16px;
        font-size: 0.8rem;
    }

    #kernel .cap-item {
        padding: 16px;
    }

    .kernel-code-block {
        padding: 12px !important;
    }

    .kernel-code-block pre {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .cap-tabs {
        flex-direction: column;
        align-items: center;
    }

    .performance .compare-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .performance .compare-table th,
    .performance .compare-table td {
        white-space: nowrap;
        min-width: 80px;
    }

    #kernel .cap-item {
        padding: 12px;
    }

    #kernel pre {
        padding: 12px;
        font-size: 0.75rem;
        word-break: break-all;
        white-space: pre-wrap;
        overflow-wrap: break-word;
    }

    #kernel .compare-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #kernel .compare-table th,
    #kernel .compare-table td {
        white-space: nowrap;
        min-width: 80px;
    }

    .kernel-code-block {
        padding: 8px !important;
    }

    .kernel-code-block pre {
        font-size: 0.7rem;
    }
}
