
:root {
    --bg-main: #F4F6F9;
    --bg-card: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #7F8C8D;
    --brand-color: #2980B9;
    --brand-hover: #1A5276;
    --accent-color: #E67E22;
    --border-color: #E0E6ED;
    --font-serif: 'Noto Serif SC', 'Songti SC', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --radius-lg: 16px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 32px rgba(41, 128, 185, 0.1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

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

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

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.header-nav { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.logo { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.5px; color: var(--text-primary); font-family: var(--font-serif); }
.logo span { color: var(--brand-color); }
.nav-links { display: flex; gap: 32px; font-weight: 600; font-size: 0.95rem; }
.nav-links a { position: relative; }
.nav-links a:hover::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--brand-color); }

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero h1 { font-size: 3.2rem; font-weight: 900; margin-bottom: 24px; letter-spacing: -1px; color: #111827; }
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 680px; margin: 0 auto; line-height: 1.8; }

/* Bento Grid System */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: 80px; }
.bento-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--brand-color); }
.span-12 { grid-column: span 12; }
.span-6 { grid-column: span 6; }

/* Core Tool Section */
.tool-section { border-top: 4px solid var(--brand-color); }
.tool-header { text-align: center; margin-bottom: 32px; }
.tool-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.tool-header p { color: var(--text-secondary); }

.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.tool-panel { display: flex; flex-direction: column; gap: 20px; }
.input-group label { display: block; font-weight: 600; margin-bottom: 12px; color: var(--text-primary); font-size: 1.05rem; }
.tool-textarea { 
    width: 100%; height: 240px; padding: 16px; 
    border: 2px solid var(--border-color); border-radius: var(--radius-md); 
    font-family: var(--font-mono); font-size: 1rem; line-height: 1.6;
    background: #F8FAFC; resize: none; transition: all 0.3s; 
}
.tool-textarea:focus { outline: none; border-color: var(--brand-color); background: #FFF; box-shadow: 0 0 0 3px rgba(41,128,185,0.1); }

.options-panel { background: #F8FAFC; padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.options-panel h4 { font-size: 0.95rem; margin-bottom: 16px; color: #475569; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-label { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; }
.option-input { padding: 6px 10px; border: 1px solid #CBD5E1; border-radius: 4px; font-family: var(--font-mono); width: 80px; }

.btn-group { display: flex; gap: 16px; margin-top: auto; }
.btn { flex: 1; padding: 14px 24px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; border: none; transition: all 0.3s; text-align: center; }
.btn-primary { background: var(--brand-color); color: #FFF; }
.btn-primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--brand-color); border: 2px solid var(--brand-color); }
.btn-outline:hover { background: var(--brand-color); color: #FFF; }

.stats-bar { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; }

/* Article Categories */
.cat-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.cat-title::before { content: ''; display: block; width: 4px; height: 18px; background: var(--accent-color); border-radius: 2px; }
.article-list { list-style: none; }
.article-list li { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--border-color); }
.article-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.article-list h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.article-list p { font-size: 0.9rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* FAQ Section */
.faq-section { background: #1C2833; color: white; padding: 80px 0; border-radius: 24px; margin-bottom: 80px; }
.faq-title { text-align: center; font-size: 2.2rem; margin-bottom: 48px; font-weight: 900; color: #F8FAFC; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 0 40px; }
.faq-item { background: rgba(255,255,255,0.03); padding: 24px; border-radius: var(--radius-md); border-left: 4px solid var(--brand-color); }
.faq-item h4 { font-size: 1.1rem; color: #3498DB; margin-bottom: 12px; font-weight: 600; line-height: 1.5; }
.faq-item p { font-size: 0.95rem; color: #ABB2B9; text-align: justify; }

/* Article Details Page */
.page-layout { display: grid; grid-template-columns: minmax(0, 3fr) 1fr; gap: 40px; margin: 40px auto 80px; }
.article-body { background: var(--bg-card); padding: 48px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid var(--border-color); }
.breadcrumb { font-size: 0.9rem; font-weight: 600; color: var(--brand-color); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; display: inline-block; background: #EBF5FB; padding: 4px 12px; border-radius: 4px; }
.article-body h1 { font-size: 2.4rem; font-weight: 900; line-height: 1.35; margin-bottom: 24px; color: #111827; }
.lead-text { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border-color); }

.prose h2 { font-size: 1.6rem; font-weight: 800; color: #111827; margin: 40px 0 20px; position: relative; padding-left: 16px; border-left: 4px solid var(--accent-color); }
.prose p { font-size: 1.1rem; margin-bottom: 24px; color: #34495E; text-align: justify; }
.prose blockquote { background: #F8FAFC; padding: 24px 32px; border-left: 4px solid var(--brand-color); margin: 32px 0; font-size: 1.1rem; font-style: italic; color: #475569; border-radius: 0 8px 8px 0; }
.prose a { color: var(--brand-color); font-weight: 600; border-bottom: 1px solid rgba(41, 128, 185, 0.3); }
.prose a:hover { border-bottom-color: var(--brand-color); background: rgba(41,128,185,0.05); }

.data-table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 0.95rem; }
.data-table th, .data-table td { border: 1px solid var(--border-color); padding: 16px; text-align: left; }
.data-table th { background: #F8FAFC; font-weight: 700; color: #111827; }

/* Sidebar */
.sidebar-wrapper { position: sticky; top: 100px; background: var(--bg-card); padding: 32px; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); border: 1px solid var(--border-color); }
.sidebar-wrapper h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; color: #111827; border-bottom: 2px solid var(--bg-main); padding-bottom: 12px; }
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border-color); }
.sidebar-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.sidebar-list a { font-size: 0.95rem; font-weight: 600; color: #475569; display: block; line-height: 1.5; }
.sidebar-list a:hover { color: var(--brand-color); transform: translateX(4px); }

/* Footer */
footer { text-align: center; padding: 40px; border-top: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1024px) {
    .span-6 { grid-column: span 12; }
    .tool-layout, .page-layout, .faq-grid { grid-template-columns: 1fr; }
    .faq-grid { padding: 0 24px; }
    .article-body { padding: 32px 24px; }
    .hero h1 { font-size: 2.4rem; }
}
