:root {
    --primary: #1677ff;
    --primary-hover: #4096ff;
    --primary-light: #eff6ff;
    --bg: #f9fafb;
    --bg-card: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 48px rgba(22, 119, 255, 0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --nav-h: 64px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

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

/* ── Nav ── */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(249, 250, 251, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

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

.nav-auth {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary);
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-auth:hover {
    background: var(--primary-hover);
    color: #fff !important;
}

.nav-auth-outline {
    background: #fff;
    color: var(--primary) !important;
    border: 1px solid var(--primary);
}

.nav-auth-outline:hover {
    background: var(--primary-light);
    color: var(--primary) !important;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text);
    font-size: 18px;
}

/* ── Hero / Header ── */
.header {
    padding: calc(var(--nav-h) + 64px) 0 80px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.header h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    color: var(--text);
}

.header h1 span {
    color: var(--primary);
}

.header .hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    max-width: 480px;
}

.header .hero-subdesc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
}

.auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
    font-family: inherit;
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.btn-secondary {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

/* App preview mock */
.app-preview {
    position: relative;
    display: flex;
    justify-content: center;
}

.app-window {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.app-titlebar {
    height: 36px;
    background: #f3f4f6;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}

.app-titlebar-icon {
    width: 16px;
    height: 16px;
    background: var(--primary-light);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.app-titlebar-name {
    font-size: 11px;
    color: var(--text);
    flex: 1;
}

.app-titlebar-btns {
    display: flex;
    gap: 6px;
}

.app-titlebar-btns span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
}

.app-body {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-input {
    height: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0 10px 0 28px;
    font-size: 11px;
    color: var(--text-muted);
    position: relative;
    display: flex;
    align-items: center;
}

.app-input::before {
    content: attr(data-icon);
    position: absolute;
    left: 8px;
    font-size: 11px;
}

.app-result-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 6px 8px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    color: #dc2626;
}

.app-result-row.ok {
    background: #f0fdf4;
    color: #16a34a;
}

.app-btns {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.app-btn {
    flex: 1;
    height: 32px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.app-btn-primary {
    background: var(--primary);
    color: #fff;
}

.app-statusbar {
    height: 24px;
    background: #f3f4f6;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 10px;
    color: var(--text-muted);
    gap: 8px;
}

.preview-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(22, 119, 255, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

/* ── Sections ── */
.landing-section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.section-note {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
    margin-top: -32px;
    margin-bottom: 32px;
}

/* Stats */
.stats-section {
    padding: 48px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-card {
    padding: 24px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Features */
.features-section {
    padding: 80px 0;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
    box-shadow: var(--shadow);
    border-color: #bfdbfe;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* API */
.api-section {
    padding: 80px 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.api-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.api-content h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 600;
}

.api-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 13px;
    margin: 12px 0 20px;
    line-height: 1.6;
}

.api-content code {
    font-family: 'Consolas', 'Courier New', monospace;
}

.api-endpoint {
    background: var(--primary-light);
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 10px 0 16px;
    font-size: 14px;
}

.api-content ul {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.api-content li {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Steps */
.steps-section {
    padding: 80px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    counter-reset: step;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    position: relative;
    counter-increment: step;
}

.step-card::before {
    content: counter(step, decimal-leading-zero);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.step-number {
    display: none;
}

.step-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.step-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.steps-cta {
    text-align: center;
    margin-top: 40px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background: var(--bg-card);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Auth page ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 40px) 24px 40px;
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 32px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 16px;
}

.form-control {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.remember-group {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.remember-group input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.btn-auth {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
    color: #fff;
}

.switch-auth {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.switch-auth a {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.switch-auth a:hover {
    text-decoration: underline;
}

/* ── Query interface ── */
.query-mode {
    padding-top: 24px;
}

.query-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 24px auto;
    max-width: 1100px;
    box-shadow: var(--shadow);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    gap: 4px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}

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

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.input-section {
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.input-group textarea,
.input-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.input-group input[type="text"] {
    height: 44px;
}

.input-group textarea:focus,
.input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.buttons.hidden {
    display: none;
}

.progress-section {
    margin-top: 20px;
}

.progress-section.hidden {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #4096ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-info {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.results-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 0 auto 40px;
    max-width: 1100px;
    box-shadow: var(--shadow);
}

.results-section h3 {
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.results-table th {
    background: #f9fafb;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.results-table tr:hover {
    background: #f9fafb;
}

.results-table tr.status-normal {
    background: rgba(22, 163, 74, 0.04);
}

.results-table tr.status-banned {
    background: rgba(220, 38, 38, 0.04);
}

.results-table tr.status-wechat-frozen {
    background: rgba(22, 119, 255, 0.04);
}

.results-table tr.status-guardian-limit {
    background: rgba(234, 88, 12, 0.04);
}

.results-table td.ban-reason {
    max-width: 280px;
    word-break: break-word;
    color: var(--text-secondary);
    line-height: 1.5;
}

.status-normal .status {
    color: #16a34a;
    font-weight: 500;
}

.status-banned .status {
    color: #dc2626;
    font-weight: 500;
}

.status-wechat-frozen .status {
    color: var(--primary);
    font-weight: 500;
}

.status-guardian-limit .status {
    color: #ea580c;
    font-weight: 500;
}

.status-limit {
    background: rgba(245, 158, 11, 0.06);
}

.status-limit .status {
    color: #d97706;
    font-weight: 600;
}

.retry-btn {
    background: #f3f4f6;
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
}

.retry-btn:hover {
    background: #e5e7eb;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
}

.user-info {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.user-info .user-details {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.user-info .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info .user-info-content {
    flex: 1;
    min-width: 0;
}

.user-info .user-greeting {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--text);
}

.user-info .user-type {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.free-user {
    background: var(--primary);
    color: white;
}

.premium-user {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
}

.user-info .user-token {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Courier New', monospace;
    word-break: break-all;
}

.user-info .token-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 5px;
}

.tab-content {
    display: none;
}

.tab-content:not(.hidden) {
    display: block;
}

.alert {
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
    background-color: var(--primary-light);
    color: #1e40af;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
}

.upgrade-content h3 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 18px;
}

.plans-grid {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    margin-bottom: 30px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px 4px 16px;
}

.plans-grid::-webkit-scrollbar {
    height: 4px;
}

.plans-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    width: 240px;
    min-width: 240px;
    transition: all 0.2s;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.plan-header {
    text-align: center;
    margin-bottom: 16px;
}

.plan-header h4 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 15px;
}

.plan-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.plan-price span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: normal;
}

.plan-features {
    margin-bottom: 16px;
}

.feature {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-footer {
    text-align: center;
}

.example-downloads a {
    display: block;
    margin: 6px 0;
    color: var(--primary);
    font-size: 14px;
}

.example-downloads a:hover {
    text-decoration: underline;
}

.payment-result {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 24px;
    text-align: center;
}

.payment-result h4 {
    margin-bottom: 16px;
    color: var(--text);
}

.payment-status.success {
    color: #16a34a;
    font-weight: 600;
}

.payment-status.error {
    color: #dc2626;
    font-weight: 600;
}

.payment-message {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header .hero-desc,
    .header .hero-subdesc {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-buttons {
        justify-content: center;
    }

    .app-preview {
        order: -1;
    }

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

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px 24px;
        gap: 16px;
        margin-left: 0;
    }

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

    .nav-toggle {
        display: block;
    }

    .header h1 {
        font-size: 30px;
    }

    .features-grid,
    .steps-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .landing-section,
    .features-section,
    .api-section,
    .steps-section {
        padding: 56px 0;
    }

    .buttons {
        flex-direction: column;
    }

    .buttons .btn {
        width: 100%;
    }

    .query-section,
    .results-section {
        margin-left: 12px;
        margin-right: 12px;
        padding: 20px;
    }

    .auth-panel {
        padding: 32px 24px;
    }
}
