/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: #0a0a0a;
    background-color: #ffffff;
    font-size: 14px;
}

/* CSS Variables */
:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --popover: #ffffff;
    --popover-foreground: #0a0a0a;
    --primary: #2563eb;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #3e3f40;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #2563eb;
    --radius: 0.5rem;
}

/* 全局链接样式 */
a {
    color: var(--foreground);
}

/* Page Header */
.page-header {
    background: var(--background);
    padding: 6rem 0;
}

.header-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.main-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 1.5rem 0;
}

.author {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.author a {
    text-decoration: none;
}

.author a:hover {
    text-decoration: underline;
}

/* Main Container */
.main-container {
    width: 100%;
    max-width:960px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

/* Section */
.section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.resources-disclaimer {
    font-size: 12px;
    color: #999999;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.subsection {
    margin-bottom: 2.5rem;
}

.subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--foreground);
    padding-bottom: 0.5rem;
}

.faq-list {
    margin-bottom: 1.5rem;
}

/* FAQ Item */
.faq-item {
    background: var(--card);
    overflow: hidden;
    transition: all 0.2s ease-out;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--card-foreground);
    transition: color 0.2s ease-out;
    position: relative;
    overflow: hidden;
}

.faq-question:hover {
    color: #1e40af;
}

.faq-question:hover .question-icon {
    color: #1e40af;
}

.question-text {
    flex: 1;
    margin-right: 1rem;
    position: relative;
    z-index: 2;
}

.question-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--muted-foreground);
    transition: transform 0.2s ease-out, color 0.2s ease-out;
    flex-shrink: 0;
}

.faq-item.expanded .question-icon {
    transform: rotate(180deg);
}

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

.faq-item.expanded .faq-answer {
    max-height: 1000px;
}

.answer-content {
    color: var(--muted-foreground);
    line-height: 1.5;
    padding: 16px;
    background: #fafbfc;
    margin-bottom: 16px;
}

.answer-content p {
    margin-bottom: 1rem;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

.answer-content p {
    margin-bottom: 1rem;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

.answer-content a {
    color: var(--muted-foreground);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.answer-content a:hover {
    color: var(--foreground);
    font-weight: 500;
}

.answer-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.answer-content li {
    margin-bottom: 0.5rem;
}

/* Sidebar Navigation */
.sidebar-nav {
    width: 200px;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: sticky;
    top: 2rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.35s ease-in;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--foreground);
    background: #f6f7f9;
}

.nav-link.active {
    color: var(--foreground);
    font-weight: 600;
    background: transparent;
    border-left-color: transparent;
}

.nav-link--sub {
    padding-left: 1.5rem;
    font-size: 0.8125rem;
}

.back-to-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.back-to-top-icon {
    width: 16px;
    height: 16px;
}

/* Tab 样式 */
.tab-container {
    margin-top: 1rem;
}

.tab-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tab-button {
    background: var(--background);
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    border-radius: var(--radius);
}

.tab-button:hover {
    color: var(--foreground);
    background: #fafbfc;
}

.tab-button.active {
    color: #ffffff;
    font-weight: 500;
    background: var(--foreground);
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel ul {
    list-style: none;
    padding: 0;
}

.tab-panel li {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.tab-panel a {
    color: #0a0a0a;
    text-decoration: underline;
}

.tab-panel a:hover {
    color: var(--foreground);
    font-weight: 500;
}

/* 移动端返回顶部按钮 */
.mobile-back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.35s ease-in;
    z-index: 1000;
}

.mobile-back-to-top:hover {
    background: #0066cc;
    transform: translateY(-2px);
}

.mobile-back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 32px;
}

/* Page Footer */
.page-footer {
    background: #f8f8f8;
    padding: 2rem 0;
}

.footer-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-title {
    font-size: 14px;
    font-weight: 400;
    color: #999999;
    margin-bottom: 1rem;
}

.disclaimer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.disclaimer-list li {
    font-size: 10px;
    color: #999999;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.75rem;
}

.disclaimer-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
}

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

.footer-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    flex: 1;
}

.footer-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.copyright {
    font-size: 12px;
    color: #999999;
    margin-bottom: 0.5rem;
}

.copyright a {
    color: #999999;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

.contact-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-info a,
.contact-info span {
    font-size: 12px;
    color: #999999;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Donation Popup */
.donation-popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    width: auto;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease-in;
    z-index: 1000;
}

.donation-popup.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.donation-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    color: var(--muted-foreground);
    transition: color 0.35s ease-in;
    z-index: 1001;
}

.donation-close:hover {
    color: var(--foreground);
}

.donation-close svg {
    width: 100%;
    height: 100%;
}

.donation-header {
    width: 100%;
    margin-bottom: 1rem;
}

.donation-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

.donation-qrcodes {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.qrcode-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qrcode-item img {
    width: 128px;
    height: 128px;
    object-fit: cover;
}

.qrcode-label {
    font-size: 10px;
    color: var(--muted-foreground);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        text-align: center;
        padding: 0 1rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-container {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .sidebar-nav {
        display: none;
    }
    
    .main-content {
        order: 1;
        margin-left: 0;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 0.8125rem;
        border-left: 1px solid var(--border);
    }
    
    .nav-link--sub {
        padding-left: 0.75rem;
    }
    
    .faq-question {
        padding: 1rem 0rem 1rem 0;
    }
    
    .faq-answer {
        padding: 0 1rem 0 0;
    }
    
    .faq-item.expanded .faq-answer {
        padding: 0;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    /* 移动端footer布局调整 */
    .footer-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-right {
        justify-content: center;
    }
    
    /* 移动端显示返回顶部按钮 */
    .mobile-back-to-top {
        display: flex;
    }
}


