/* PageClaw — Premium Dark Theme */

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

:root {
    --bg: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fb;
    --border: #e5e7eb;
    --border-hover: #d1d5db;
    --text: #111827;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --accent: #1a56db;
    --accent-light: #1a56db;
    --accent-glow: rgba(26, 86, 219, 0.12);
    --blue: #1a56db;
    --gradient: linear-gradient(135deg, #1a56db, #0ea5e9);
    --radius: 12px;
    --radius-sm: 8px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

/* --- Navbar --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.nav-logo {
    width: 32px;
    height: 32px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.nav-username {
    font-weight: 500;
    font-size: 14px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font);
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: var(--bg-secondary);
    border-radius: 20px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 16px;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.lang-option.active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lang-option:not(.active):hover {
    color: var(--text-muted);
}

.lang-flag {
    font-size: 14px;
    line-height: 1;
}

/* --- Card --- */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* --- Hero --- */
.hero {
    position: relative;
    text-align: center;
    padding: 100px 24px 80px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.hero-glow {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.gradient-text {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-trust {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

/* --- Proof Bar --- */
.proof-section {
    padding: 0 24px;
    max-width: 700px;
    margin: -20px auto 40px;
}

.proof-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.proof-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.proof-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

.proof-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* --- Outcomes Section --- */
.outcomes-section {
    padding: 60px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
}

.outcomes-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.outcome-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.outcome-before, .outcome-after {
    padding: 24px 28px;
}

.outcome-before {
    border-right: 1px solid var(--border);
    background: #fef2f2;
}

.outcome-after {
    background: #f0fdf4;
}

.outcome-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ef4444;
    margin-bottom: 8px;
    opacity: 0.7;
}

.outcome-label-after {
    color: #22c55e;
}

.outcome-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.outcome-after p {
    color: var(--text);
}

/* --- Niche Preview (landing) --- */
.niches-preview {
    padding: 60px 24px;
    max-width: 700px;
    margin: 0 auto;
}

.niche-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.niche-preview-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 24px;
    cursor: default;
}

.niche-preview-icon {
    font-size: 18px;
}

/* --- Social Proof Stats --- */
.social-proof {
    padding: 40px 24px 60px;
    max-width: 800px;
    margin: 0 auto;
}

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

.proof-stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}

.proof-stat-unit {
    font-size: 24px;
}

.proof-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

    .outcome-before {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .proof-stat-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* --- CTA Section --- */
.cta-section {
    padding: 40px 24px 100px;
    max-width: 700px;
    margin: 0 auto;
}

.cta-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-secondary);
    border-color: var(--border);
}

.cta-card h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Sections --- */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.steps-section {
    padding: 80px 24px;
    max-width: 900px;
    margin: 0 auto;
}

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

.step-card {
    text-align: center;
    padding: 32px 24px;
    position: relative;
}

.step-number {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(26, 86, 219, 0.08);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* --- Skill Catalog (Landing Page) --- */
.catalog-section {
    padding: 60px 24px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.catalog-search-wrap {
    max-width: 480px;
    margin: 0 auto 20px;
}

.catalog-search {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.catalog-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.08);
}

.catalog-search::placeholder {
    color: var(--text-dim);
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 32px;
}

.catalog-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.catalog-pill:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.catalog-pill.active {
    background: rgba(26, 86, 219, 0.06);
    border-color: rgba(26, 86, 219, 0.3);
    color: var(--accent);
}

.pill-count {
    font-size: 11px;
    opacity: 0.6;
}

/* Catalog — skill cards grouped by niche */
.catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.catalog-niche-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.catalog-niche-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.catalog-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skill-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.skill-card:hover {
    border-color: rgba(26, 86, 219, 0.3);
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.06);
}

.skill-card-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 2px;
}

.skill-card-body {
    flex: 1;
    min-width: 0;
}

.skill-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.skill-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.catalog-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
}

/* Catalog stats bar */
.catalog-stats {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

.catalog-stats strong {
    color: var(--accent);
    font-weight: 700;
}

.catalog-stat-sep {
    color: var(--text-dim);
}

/* --- What is OpenClaw Explainer --- */
.explainer-section {
    padding: 60px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.explainer-card {
    padding: 40px 32px;
    text-align: center;
    background: var(--bg-secondary);
}

.explainer-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    max-width: 540px;
    margin: 0 auto 32px;
}

.explainer-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.explainer-step-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 140px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.explainer-step-icon {
    font-size: 28px;
}

.explainer-arrow {
    font-size: 24px;
    color: var(--accent);
    font-weight: 700;
}

@media (max-width: 600px) {
    .explainer-visual {
        flex-direction: column;
        gap: 8px;
    }
    .explainer-arrow {
        transform: rotate(90deg);
    }
    .explainer-step-mini {
        min-width: unset;
        width: 100%;
        flex-direction: row;
        padding: 12px 16px;
    }
}

/* Hero scroll hint */
.hero-scroll-hint {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-dim);
    animation: hint-bounce 2s ease-in-out infinite;
}

@keyframes hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* Compact steps */
.steps-compact {
    padding-top: 40px;
    padding-bottom: 40px;
}

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

    .catalog-filters {
        gap: 4px;
    }

    .catalog-pill {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* (skill preview cards removed — replaced by catalog) */

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

.footer a {
    color: var(--accent-light);
}

.footer-sep {
    margin: 0 8px;
}

/* --- Error Page --- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 24px;
}

.error-card {
    text-align: center;
    padding: 48px;
    max-width: 420px;
}

.error-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-card h1 {
    font-size: 24px;
    margin-bottom: 12px;
}

.error-card p {
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ==================== */
/* --- Dashboard ---    */
/* ==================== */

.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-count {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Page cards */
.pages-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-card {
    overflow: hidden;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.page-avatar-placeholder {
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.page-name {
    font-size: 17px;
    font-weight: 600;
}

.page-meta {
    display: flex;
    gap: 12px;
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-muted);
}

.page-category {
    background: rgba(26, 86, 219, 0.06);
    color: var(--accent);
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.page-expand-icon {
    font-size: 12px;
    color: var(--text-dim);
    transition: transform 0.3s;
}

.page-card.expanded .page-expand-icon {
    transform: rotate(180deg);
}

/* Skills panel */
.page-skills {
    display: none;
    padding: 0 24px 24px;
    border-top: 1px solid var(--border);
}

.page-card.expanded .page-skills {
    display: block;
}

.skill-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.skill-tabs::-webkit-scrollbar {
    display: none;
}

.skill-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: var(--font);
}

.skill-tab:hover {
    color: var(--text);
    background: var(--bg-card);
}

.skill-tab.active {
    color: var(--accent);
    background: rgba(26, 86, 219, 0.06);
    border-color: rgba(26, 86, 219, 0.2);
}

.skill-tab-icon {
    font-size: 15px;
}

.skill-content {
    display: none;
}

.skill-content.active {
    display: block;
}

.skill-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Token block */
.token-block {
    margin-bottom: 20px;
}

.token-block label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.token-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-value {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
}

/* Prompt block */
.prompt-block {
    position: relative;
}

.prompt-block label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.prompt-code {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    overflow-x: auto;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 12.5px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.btn-copy {
    margin-top: 12px;
}

.btn-copy .copy-check {
    display: none;
}

.btn-copy.copied .copy-text {
    display: none;
}

.btn-copy.copied .copy-check {
    display: inline;
    color: #22c55e;
}

.btn-copy.copied {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .navbar {
        padding: 12px 16px;
    }

    .nav-username {
        display: none;
    }

    .skill-tabs {
        gap: 2px;
    }

    .skill-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .skill-tab-name {
        display: none;
    }

    .page-header {
        padding: 16px;
    }

    .page-skills {
        padding: 0 16px 16px;
    }
}

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

    .hero {
        padding: 60px 16px 50px;
    }
}

/* --- Partner CTA --- */
.partner-section {
    padding: 0 24px 80px;
    max-width: 700px;
    margin: 0 auto;
}

.partner-cta {
    text-align: center;
    padding: 40px 32px;
    margin-top: 40px;
    background: var(--bg-secondary);
}

.partner-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.partner-cta h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.partner-cta p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 440px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.partner-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Niche Selection --- */
.select-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

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

/* --- OpenClaw Banner on Select Page --- */
.openclaw-banner {
    margin-bottom: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.06), rgba(14, 165, 233, 0.06));
    border-color: rgba(26, 86, 219, 0.15);
    text-align: center;
}

.openclaw-banner-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.openclaw-banner-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.openclaw-badge {
    color: var(--text-muted);
    font-weight: 500;
}

.openclaw-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
}

.openclaw-tagline {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 520px;
}

/* --- OpenClaw CTA at bottom of Select Page --- */
.openclaw-cta {
    margin-top: 48px;
    padding: 28px 32px;
    border-color: rgba(26, 86, 219, 0.2);
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.04), rgba(14, 165, 233, 0.04));
}

.openclaw-cta-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.openclaw-cta-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.openclaw-cta-content {
    flex: 1;
}

.openclaw-cta-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.openclaw-cta-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.openclaw-cta-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .openclaw-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .openclaw-cta-buttons {
        justify-content: center;
    }
}

.select-header h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.select-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.niche-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.niche-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px 24px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.niche-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.niche-card:hover::before {
    opacity: 1;
}

.niche-card:hover {
    transform: translateY(-2px);
    border-color: rgba(26, 86, 219, 0.3);
    box-shadow: 0 8px 24px rgba(26, 86, 219, 0.1);
}

.niche-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.niche-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.niche-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.niche-badge {
    font-size: 11px;
    color: var(--accent);
    background: rgba(26, 86, 219, 0.06);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

/* Dashboard title row */
.dashboard-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (max-width: 768px) {
    .niche-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .select-header h1 {
        font-size: 28px;
    }

    .dashboard-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: #fff;
    padding: 14px 28px;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9000;
    white-space: nowrap;
}

.toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* --- Loading Overlay (OAuth redirect) --- */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.92);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1rem;
    color: var(--text-muted);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
