/* css/style.css - JSON Empire Core Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-page: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1e293b;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --border: #1e293b;
    --border-hover: #3b82f6;
    --border-subtle: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.25);
    
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
    --accent-indigo: #6366f1;
    
    --badge-bg: rgba(59, 130, 246, 0.12);
    --badge-text: #60a5fa;
    --badge-border: rgba(59, 130, 246, 0.25);
    
    --code-bg: #0f172a;
    --code-header: #1e293b;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-border: #ef4444;
    --error-text: #fca5a5;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border: #e2e8f0;
    --border-hover: #2563eb;
    --border-subtle: rgba(0, 0, 0, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.15);
    
    --badge-bg: #eff6ff;
    --badge-text: #1d4ed8;
    --badge-border: #bfdbfe;
    
    --code-bg: #f8fafc;
    --code-header: #e2e8f0;
    --error-bg: #fef2f2;
    --error-border: #fca5a5;
    --error-text: #b91c1c;
    
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark light;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.3s, border-color 0.3s;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-badge {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.client-security-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-emerald);
}

.theme-toggle-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 4.5rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--badge-bg);
    border: 1px solid var(--badge-border);
    color: var(--badge-text);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-highlight {
    color: var(--primary);
    position: relative;
}

.hero-desc {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Global Search Bar in Hero */
.hero-search-wrapper {
    max-width: 650px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.25s ease;
}

.hero-search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-right: 0.75rem;
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-family: inherit;
    outline: none;
}

.hero-search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.search-status-bar {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.search-status-count {
    color: var(--primary);
    font-weight: 600;
}

/* Stats Counter Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin: 2.5rem 0;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Interactive Demo Playground */
.demo-section {
    margin: 3.5rem 0 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

.playground-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.playground-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--code-header);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.playground-modes {
    display: flex;
    gap: 0.5rem;
}

.demo-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.demo-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.demo-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
}

.playground-actions {
    display: flex;
    gap: 0.5rem;
}

.playground-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 340px;
}

.playground-pane {
    display: flex;
    flex-direction: column;
    position: relative;
}

.playground-pane:first-child {
    border-right: 1px solid var(--border);
}

.pane-label {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-textarea {
    flex: 1;
    background: var(--code-bg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 1rem;
    border: none;
    resize: none;
    outline: none;
}

/* Category Filter Tabs Bar */
.category-filter-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.5rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.filter-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.filter-chip-count {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

/* Tools Directory Categorized */
.tools-directory {
    margin-bottom: 5rem;
}

.category-block {
    margin-bottom: 3.5rem;
    scroll-margin-top: 100px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.category-title-group h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.01em;
}

.category-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.category-badge-count {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

/* Tool Grid & Cards */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.tool-card-icon {
    font-size: 1.5rem;
}

.tool-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-border);
}

.tool-badge.high-cpc {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.25);
}

.tool-badge.popular {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.25);
}

.tool-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.tool-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.tool-arrow {
    transition: transform 0.2s ease;
}

.tool-card:hover .tool-arrow {
    transform: translateX(4px);
}

/* Empty search state */
.no-results-box {
    display: none;
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.no-results-box h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.no-results-box p {
    color: var(--text-muted);
}

/* Why Choose Section & Comparison */
.comparison-section {
    margin-bottom: 6rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.925rem;
}

.comparison-table th, .comparison-table td {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: var(--code-header);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.feature-highlight {
    font-weight: 600;
    color: var(--text-primary);
}

.badge-yes {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-emerald);
    font-weight: 600;
}

.badge-no {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
}

/* Feature Pillars Grid */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: transform 0.2s ease;
}

.pillar-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.pillar-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.pillar-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.pillar-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Testimonials Section */
/* Testimonials Section & Carousel */
.testimonials-section {
    margin-bottom: 6rem;
    position: relative;
}

.testimonials-carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.carousel-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.carousel-nav-arrows {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.carousel-nav-btn:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.carousel-nav-btn:active {
    transform: translateY(0);
}

.testimonials-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0;
}

.testimonials-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding-bottom: 1rem;
}

.testimonials-carousel-track::-webkit-scrollbar {
    height: 6px;
}

.testimonials-carousel-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.testimonials-carousel-track .testimonial-card {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 320px;
    max-width: 380px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.testimonials-carousel-track .testimonial-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

@media (max-width: 992px) {
    .testimonials-carousel-track .testimonial-card {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: 290px;
    }
}

@media (max-width: 640px) {
    .testimonials-carousel-track .testimonial-card {
        flex: 0 0 100%;
        min-width: 260px;
    }
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.testimonial-quote {
    color: var(--text-primary);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

.author-info h4 {
    font-size: 0.925rem;
    font-weight: 700;
    color: var(--text-primary);
}

.author-info span {
    font-size: 0.775rem;
    color: var(--text-muted);
}

/* FAQ Accordion Section */
.faq-section {
    margin-bottom: 6rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.faq-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item.active {
    border-color: var(--border-hover);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: transform 0.25s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Feedback & Suggestion Section */
.feedback-section {
    margin-bottom: 6rem;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.feedback-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group label .required {
    color: #ef4444;
    margin-left: 0.2rem;
}

.form-group label .optional-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.775rem;
    margin-left: 0.35rem;
}

.form-control {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.925rem;
    font-family: inherit;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

select.form-control {
    cursor: pointer;
}

.feedback-status-msg {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: none;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.feedback-status-msg.success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.feedback-status-msg.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-submit-feedback {
    align-self: flex-start;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

@media (max-width: 640px) {
    .btn-submit-feedback {
        width: 100%;
        justify-content: center;
    }
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 6rem;
}

.cta-banner h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.cta-banner p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Tool Workspace Page Styling */
.tool-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: 60vh;
    min-height: 450px;
    margin-bottom: 1.5rem;
}

.panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-header {
    background: var(--code-header);
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel textarea {
    flex-grow: 1;
    resize: none;
    border: none;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.5;
    background: var(--code-bg);
    color: var(--text-primary);
    outline: none;
}

.error-box {
    background: var(--error-bg);
    color: var(--error-text);
    border-top: 1px solid var(--error-border);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    display: none;
    font-family: var(--font-mono);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.placeholder-tool-banner {
    background: rgba(59, 130, 246, 0.08);
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--badge-text);
}

/* SEO Article Section */
.seo-article {
    max-width: 850px;
    margin: 4rem auto;
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.seo-article h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.seo-article h2:first-child {
    margin-top: 0;
}

.seo-article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.seo-article p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.seo-article ul, .seo-article ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.seo-article li {
    margin-bottom: 0.5rem;
}

.seo-article code {
    background: var(--code-header);
    color: var(--badge-text);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.88em;
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 4.5rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 1rem 0 1.5rem;
    max-width: 320px;
    line-height: 1.6;
}

.footer-col h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.825rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .workspace {
        grid-template-columns: 1fr;
        height: auto;
    }
    .workspace textarea {
        height: 260px;
    }
    .playground-grid {
        grid-template-columns: 1fr;
    }
    .playground-pane:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .stats-row {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Tree Viewer Styles */
.tree-container {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.6;
    background: var(--code-bg);
    color: var(--text-primary);
    user-select: text;
}

.tree-node {
    margin-left: 1.25rem;
    position: relative;
}

.tree-node-root {
    margin-left: 0;
}

.tree-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 0.1rem 0.35rem;
    transition: background 0.15s ease;
}

.tree-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.tree-toggle {
    display: inline-block;
    width: 14px;
    height: 14px;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    user-select: none;
}

.tree-node.collapsed > .tree-header .tree-toggle {
    transform: rotate(-90deg);
}

.tree-node.collapsed > .tree-children {
    display: none;
}

.tree-key {
    color: #38bdf8;
    font-weight: 600;
}

[data-theme="light"] .tree-key {
    color: #0284c7;
}

.tree-colon {
    color: var(--text-muted);
    margin-right: 0.35rem;
}

.tree-val-string {
    color: #34d399;
    word-break: break-all;
}

[data-theme="light"] .tree-val-string {
    color: #059669;
}

.tree-val-number {
    color: #f59e0b;
}

.tree-val-boolean {
    color: #c084fc;
    font-weight: 600;
}

.tree-val-null {
    color: #f87171;
    font-style: italic;
}

.tree-bracket {
    color: var(--text-muted);
    font-weight: 600;
}

.tree-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    padding: 0.05rem 0.4rem;
    border-radius: var(--radius-full);
    margin-left: 0.35rem;
}

/* Metrics & Stats Ribbon */
.metrics-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric-item .metric-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

.metric-item .metric-val.green {
    color: var(--accent-emerald);
}

.metric-item .metric-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Success and Alert Boxes */
.success-box {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.seo-code-preview {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 1rem 0 1.75rem;
    color: var(--text-primary);
}

.seo-code-preview .keyword { color: #c084fc; font-weight: 600; }
.seo-code-preview .string { color: #34d399; }
.seo-code-preview .number { color: #f59e0b; }
.seo-code-preview .comment { color: #64748b; font-style: italic; }

/* Policy & Legal Pages Styling */
.legal-container {
    max-width: 920px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 6rem;
}

.legal-header {
    text-align: center;
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.legal-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.legal-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.legal-meta {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
}

.legal-content {
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 0.975rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.75rem 0 0.75rem;
}

.legal-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.legal-content ul, .legal-content ol {
    margin: 0 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

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

.legal-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:hover {
    color: var(--primary-hover);
}

.legal-card-callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2rem 0;
}

.legal-card-callout.highlight {
    border-left-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.05);
}

.legal-card-callout h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-card-callout p {
    margin-bottom: 0;
    font-size: 0.925rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}