/* ============================================================
   ReviewReply AI — Premium Design System (v2)
   ============================================================ */

/* --- Dark Theme Variables (Default) --- */
:root,
[data-theme="dark"] {
    --c-bg: #07070e;
    --c-surface: #0f0f1a;
    --c-surface-2: #15152a;
    --c-surface-3: #1c1c35;
    --c-border: rgba(255, 255, 255, 0.07);
    --c-border-hover: rgba(255, 255, 255, 0.14);

    --c-primary: #7c5cfc;
    --c-primary-dark: #5a3de8;
    --c-primary-glow: rgba(124, 92, 252, 0.35);
    --c-accent: #00d4b4;
    --c-accent-glow: rgba(0, 212, 180, 0.25);

    --c-text: #e8e8f0;
    --c-text-muted: #8888aa;
    --c-text-faint: #44445a;

    --c-positive: #22c55e;
    --c-negative: #ef4444;
    --c-neutral: #f59e0b;
    --c-error: #ef4444;

    --c-glass-bg: rgba(15, 15, 30, 0.75);
    --c-glass-border: rgba(255, 255, 255, 0.08);

    --c-kbd-bg: rgba(255, 255, 255, 0.08);
    --c-kbd-border: rgba(255, 255, 255, 0.15);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px var(--c-primary-glow);
}

/* --- Light Theme Variables --- */
[data-theme="light"] {
    --c-bg: #f4f4f8;
    --c-surface: #ffffff;
    --c-surface-2: #f0f0f8;
    --c-surface-3: #e8e8f4;
    --c-border: rgba(0, 0, 0, 0.08);
    --c-border-hover: rgba(0, 0, 0, 0.16);

    --c-primary: #6b46f5;
    --c-primary-dark: #5535d4;
    --c-primary-glow: rgba(107, 70, 245, 0.2);
    --c-accent: #00b09b;
    --c-accent-glow: rgba(0, 176, 155, 0.15);

    --c-text: #1a1a2e;
    --c-text-muted: #5a5a7a;
    --c-text-faint: #9999bb;

    --c-glass-bg: rgba(255, 255, 255, 0.85);
    --c-glass-border: rgba(0, 0, 0, 0.06);

    --c-kbd-bg: rgba(0, 0, 0, 0.06);
    --c-kbd-border: rgba(0, 0, 0, 0.12);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px var(--c-primary-glow);
}

/* --- Design Tokens (non-color) --- */
:root {
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-display: 'Outfit', 'Inter', system-ui, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.35s ease, color 0.35s ease;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

a:hover {
    text-decoration: underline;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--c-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--c-surface-3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-primary);
}

/* ============================================================
   BACKGROUND ORBS
   ============================================================ */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    animation: drift 18s ease-in-out infinite alternate;
}

[data-theme="dark"] .bg-orb {
    opacity: 0.12;
}

[data-theme="light"] .bg-orb {
    opacity: 0.06;
}

.bg-orb--1 {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, #7c5cfc, transparent);
    top: -160px;
    left: -160px;
    animation-duration: 22s;
}

.bg-orb--2 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, #00d4b4, transparent);
    top: 40%;
    right: -120px;
    animation-duration: 18s;
    animation-direction: alternate-reverse;
}

.bg-orb--3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #a855f7, transparent);
    bottom: -100px;
    left: 30%;
    animation-duration: 25s;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(40px, 60px) scale(1.1);
    }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(7, 7, 14, 0.85);
    border-bottom: 1px solid var(--c-border);
    transition: background 0.35s ease, border-color 0.35s ease;
}

[data-theme="light"] .navbar {
    background: rgba(244, 244, 248, 0.88);
}

.navbar__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.navbar__logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--c-primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--c-primary-glow);
}

.logo-mark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
}

.navbar__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--c-text);
    letter-spacing: -0.02em;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.nav-link {
    padding: 0.4rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--c-text-muted);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--c-text);
    background: var(--c-surface-2);
    text-decoration: none;
}

.navbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-muted);
    border: 1px solid var(--c-border);
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--c-text);
    background: var(--c-surface-2);
    border-color: var(--c-border-hover);
}

.theme-icon {
    width: 16px;
    height: 16px;
    transition: opacity 0.2s, transform 0.3s;
}

.theme-icon--dark {
    display: block;
}

.theme-icon--light {
    display: none;
}

[data-theme="light"] .theme-icon--dark {
    display: none;
}

[data-theme="light"] .theme-icon--light {
    display: block;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge--live {
    background: var(--c-primary-glow);
    border: 1px solid rgba(124, 92, 252, 0.4);
    color: #b8a5fd;
}

[data-theme="light"] .badge--live {
    color: var(--c-primary);
}

.badge--live::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-primary);
    margin-right: 6px;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 7rem 2rem 5rem;
}

.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--c-accent);
    background: var(--c-accent-glow);
    border: 1px solid rgba(0, 212, 180, 0.3);
    margin-bottom: 1.5rem;
    width: fit-content;
}

.hero__headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--c-text);
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--c-primary) 30%, var(--c-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__sub {
    font-size: 1.05rem;
    color: var(--c-text-muted);
    line-height: 1.7;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero__stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.hero__stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-text);
    letter-spacing: -0.03em;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.hero__divider {
    width: 1px;
    height: 36px;
    background: var(--c-border);
}

.hero__visual {
    animation: float-card 6s ease-in-out infinite alternate;
}

@keyframes float-card {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-14px);
    }
}

.review-card--preview {
    background: var(--c-glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.review-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-card__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-negative), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.review-card__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--c-text);
}

.review-stars {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.star {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star--filled {
    background: #f59e0b;
}

.star--empty {
    background: var(--c-surface-3);
}

.review-card__platform {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--c-text-muted);
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--c-surface-3);
}

.review-card__text {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    font-style: italic;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--c-border);
}

.review-card__response {
    background: rgba(124, 92, 252, 0.08);
    border: 1px solid rgba(124, 92, 252, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.response-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-primary);
    margin-bottom: 0.5rem;
}

.response-text {
    font-size: 0.82rem;
    color: var(--c-text);
    line-height: 1.65;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section__header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section__tag {
    display: inline-flex;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-primary);
    background: var(--c-primary-glow);
    border: 1px solid rgba(124, 92, 252, 0.3);
    margin-bottom: 1rem;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--c-text);
    line-height: 1.2;
}

.section__sub {
    font-size: 1rem;
    color: var(--c-text-muted);
    margin-top: 0.75rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
    position: relative;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    background: rgba(15, 15, 26, 0.4);
}

[data-theme="light"] .how-it-works {
    background: rgba(107, 70, 245, 0.03);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.step-card {
    background: var(--c-glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    border-color: rgba(124, 92, 252, 0.4);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), 0 0 20px var(--c-primary-glow);
}

.step-card__number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1;
}

.step-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 0.5rem;
}

.step-card__desc {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    line-height: 1.6;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    border-radius: 2px;
    flex-shrink: 0;
    opacity: 0.4;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s var(--ease-out);
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.2s;
}

.btn:hover::after {
    background: rgba(255, 255, 255, 0.06);
}

.btn:active::after {
    background: rgba(255, 255, 255, 0.02);
}

.btn--primary {
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    color: #fff;
    box-shadow: 0 4px 14px var(--c-primary-glow);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--c-primary-glow);
}

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

.btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--ghost {
    background: transparent;
    color: var(--c-text-muted);
    border-color: var(--c-border);
}

.btn--ghost:hover {
    color: var(--c-text);
    border-color: var(--c-border-hover);
    background: var(--c-surface-2);
}

.btn--icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--c-text-muted);
    border: 1px solid var(--c-border);
    background: transparent;
}

.btn--icon:hover {
    color: var(--c-text);
    background: var(--c-surface-2);
    border-color: var(--c-border-hover);
}

.btn--icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn--icon svg {
    width: 16px;
    height: 16px;
}

.btn--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn--lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn--full {
    width: 100%;
}

.btn__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn__icon--left {
    margin-right: 2px;
}

.btn--loading {
    pointer-events: none;
}

.btn--loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin-left: 8px;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--c-glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.35s ease;
    box-shadow: var(--shadow-md);
}

.card:hover {
    border-color: var(--c-border-hover);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--c-border);
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .card__header {
    background: rgba(0, 0, 0, 0.02);
}

.card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.02em;
}

.card__badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    background: var(--c-surface-3);
    padding: 2px 8px;
    border-radius: 4px;
}

.card__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card__body {
    padding: 1.5rem;
}

.card--output .card__body {
    padding-bottom: 0.5rem;
}

/* ============================================================
   GENERATOR LAYOUT
   ============================================================ */
.generator {
    position: relative;
    z-index: 1;
}

.generator__layout {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 1.5rem;
    align-items: start;
}

.generator__left,
.generator__right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

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

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.label-optional {
    font-size: 0.7rem;
    color: var(--c-text-faint);
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
}

.label-value {
    color: var(--c-primary);
    text-transform: none;
    letter-spacing: 0;
}

.form-input {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--c-text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-glow);
    background: var(--c-surface-3);
}

.form-input::placeholder {
    color: var(--c-text-faint);
}

.form-select {
    cursor: pointer;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238888aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
}

.form-select option {
    background: var(--c-surface-3);
    color: var(--c-text);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
    max-height: 320px;
    line-height: 1.65;
}

.form-textarea--sm {
    min-height: 60px;
    max-height: 100px;
}

.input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--c-text-faint);
}

.char-count {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--c-text-faint);
    transition: color 0.2s;
}

.char-count.warning {
    color: var(--c-neutral);
}

.char-count.danger {
    color: var(--c-negative);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.generate-hint {
    font-size: 0.75rem;
    color: var(--c-text-faint);
    text-align: center;
    margin-top: 0.75rem;
    line-height: 1.45;
}

kbd {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-sans);
    background: var(--c-kbd-bg);
    border: 1px solid var(--c-kbd-border);
    color: var(--c-text-muted);
    line-height: 1.4;
}

/* ============================================================
   RANGE SLIDER
   ============================================================ */
.range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    background: linear-gradient(to right, var(--c-primary) var(--slider-pct, 50%), var(--c-surface-3) var(--slider-pct, 50%));
    border: none;
    transition: background 0.2s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--c-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--c-primary-glow);
    transition: transform 0.15s ease;
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--c-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--c-primary-glow);
}

.range-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.range-slider:focus {
    box-shadow: 0 0 0 3px var(--c-primary-glow);
    border-radius: 3px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
}

.range-labels span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--c-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   TONE SELECTOR
   ============================================================ */
.tone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.tone-card {
    cursor: pointer;
}

.tone-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tone-card__inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border);
    background: var(--c-surface-2);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tone-card__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--c-primary-glow), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.tone-card:hover .tone-card__inner {
    border-color: var(--c-border-hover);
    background: var(--c-surface-3);
}

.tone-card input:checked+.tone-card__inner {
    border-color: var(--c-primary);
    background: rgba(124, 92, 252, 0.1);
    box-shadow: 0 0 0 1px var(--c-primary);
}

.tone-card input:checked+.tone-card__inner::before {
    opacity: 1;
}

.tone-card__icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.tone-icon--professional {
    background: linear-gradient(135deg, #7c5cfc, #9b72ff);
}

.tone-icon--friendly {
    background: linear-gradient(135deg, #00d4b4, #0ea5e9);
}

.tone-icon--empathetic {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.tone-icon--formal {
    background: linear-gradient(135deg, #6b7280, #374151);
}

.tone-card__label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--c-text);
    position: relative;
    z-index: 1;
}

.tone-card__sub {
    font-size: 0.72rem;
    color: var(--c-text-muted);
    position: relative;
    z-index: 1;
}

/* ============================================================
   STAR RATING INPUT
   ============================================================ */
.star-rating-input {
    display: flex;
    gap: 6px;
    padding: 0.5rem 0;
}

.star-btn {
    width: 32px;
    height: 32px;
    color: var(--c-text-faint);
    border-radius: var(--radius-sm);
    transition: color 0.15s, transform 0.15s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-btn svg {
    width: 24px;
    height: 24px;
}

.star-btn:hover {
    transform: scale(1.15);
}

.star-btn.active {
    color: #f59e0b;
}

/* ============================================================
   OUTPUT PANEL STATES
   ============================================================ */
.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    gap: 0.75rem;
}

.placeholder-icon {
    width: 56px;
    height: 56px;
    color: var(--c-text-faint);
    margin-bottom: 0.5rem;
}

.placeholder-icon svg {
    width: 100%;
    height: 100%;
}

.placeholder-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-text-muted);
}

.placeholder-desc {
    font-size: 0.85rem;
    color: var(--c-text-faint);
    max-width: 340px;
    line-height: 1.6;
}

.output-loading {
    padding: 1.5rem 0 1rem;
}

.loading-bar {
    width: 100%;
    height: 3px;
    background: var(--c-surface-3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.loading-bar__fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent), var(--c-primary));
    background-size: 200% 100%;
    animation: shimmer-bar 1.4s ease-in-out infinite;
}

@keyframes shimmer-bar {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-line {
    height: 13px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--c-surface-2) 25%, var(--c-surface-3) 50%, var(--c-surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-line--full {
    width: 100%;
}

.skeleton-line--med {
    width: 75%;
}

.skeleton-line--short {
    width: 50%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading-label {
    text-align: center;
    font-size: 0.8rem;
    color: var(--c-text-faint);
    margin-top: 1.25rem;
    animation: pulse-opacity 1.6s ease-in-out infinite;
}

@keyframes pulse-opacity {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.output-response {
    padding-bottom: 1rem;
    animation: fade-in-up 0.4s var(--ease-out);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.response-sentiment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.response-sentiment.positive {
    background: rgba(34, 197, 94, 0.12);
    color: var(--c-positive);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.response-sentiment.negative {
    background: rgba(239, 68, 68, 0.12);
    color: var(--c-negative);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.response-sentiment.mixed {
    background: rgba(245, 158, 11, 0.12);
    color: var(--c-neutral);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.response-body {
    font-size: 0.925rem;
    line-height: 1.75;
    color: var(--c-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.response-meta {
    font-size: 0.72rem;
    color: var(--c-text-faint);
}

.response-actions-bottom {
    border-top: 1px solid var(--c-border);
    padding: 1rem 0 0.5rem;
    margin-top: 1.25rem;
    display: flex;
    gap: 0.5rem;
}

.output-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    gap: 0.5rem;
    animation: fade-in-up 0.3s ease;
}

.error-icon {
    width: 44px;
    height: 44px;
    color: var(--c-error);
    margin-bottom: 0.25rem;
}

.error-icon svg {
    width: 100%;
    height: 100%;
}

.error-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-text);
}

.error-desc {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    max-width: 320px;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

/* ============================================================
   FOLLOW-UP ACTION CARD
   ============================================================ */
.card--followup {
    border-color: rgba(0, 212, 180, 0.2);
}

.card--followup .card__header {
    border-bottom-color: rgba(0, 212, 180, 0.15);
}

.card--followup .card__title {
    color: var(--c-accent);
}

.followup-content {
    animation: fade-in-up 0.4s var(--ease-out);
}

.followup-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--c-text);
    padding: 1rem;
    background: rgba(0, 212, 180, 0.06);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--c-accent);
}

/* ============================================================
   INSIGHT CARD
   ============================================================ */
.insight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.insight-item {
    background: var(--c-surface-2);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    border: 1px solid var(--c-border);
}

.insight-item__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    margin-bottom: 4px;
}

.insight-item__value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-text);
}

/* ============================================================
   ANALYTICS DASHBOARD
   ============================================================ */
.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.analytics-stat {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.3s ease;
}

.analytics-stat:hover {
    border-color: rgba(124, 92, 252, 0.3);
}

.analytics-stat__value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--c-text);
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analytics-stat__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-text-faint);
}

/* Tone Breakdown Bars */
.tone-breakdown {
    margin-top: 0.25rem;
}

.tone-breakdown__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-text-faint);
    margin-bottom: 0.6rem;
}

.tone-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tone-bar-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tone-bar-row__name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-text-muted);
    width: 80px;
    flex-shrink: 0;
}

.tone-bar-track {
    flex: 1;
    height: 6px;
    background: var(--c-surface-3);
    border-radius: 3px;
    overflow: hidden;
}

.tone-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
}

.tone-bar-fill--professional {
    background: linear-gradient(90deg, #7c5cfc, #9b72ff);
}

.tone-bar-fill--friendly {
    background: linear-gradient(90deg, #00d4b4, #0ea5e9);
}

.tone-bar-fill--empathetic {
    background: linear-gradient(90deg, #f59e0b, #ea580c);
}

.tone-bar-fill--formal {
    background: linear-gradient(90deg, #6b7280, #374151);
}

.tone-bar-row__count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--c-text-muted);
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

/* ============================================================
   HISTORY
   ============================================================ */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 360px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.85rem;
    color: var(--c-text-faint);
}

.history-item {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: fade-in-up 0.3s ease;
}

.history-item:hover {
    border-color: rgba(124, 92, 252, 0.4);
    background: var(--c-surface-3);
}

.history-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.history-item__business {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--c-text);
}

.history-item__time {
    font-size: 0.7rem;
    color: var(--c-text-faint);
}

.history-item__preview {
    font-size: 0.78rem;
    color: var(--c-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item__tone {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-primary);
    background: var(--c-primary-glow);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
    position: relative;
    border-top: 1px solid var(--c-border);
    background: rgba(8, 8, 16, 0.5);
}

[data-theme="light"] .features {
    background: rgba(107, 70, 245, 0.03);
}

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

.feature-card {
    background: var(--c-glass-bg);
    border: 1px solid var(--c-glass-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(124, 92, 252, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
}

.feature-icon--speed {
    background: linear-gradient(135deg, #7c5cfc, #a78bfa);
}

.feature-icon--brand {
    background: linear-gradient(135deg, #00d4b4, #0284c7);
}

.feature-icon--sentiment {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.feature-icon--platform {
    background: linear-gradient(135deg, #a855f7, #ec4899);
}

.feature-icon--history {
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
}

.feature-icon--free {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.feature-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 0.5rem;
}

.feature-card__desc {
    font-size: 0.85rem;
    color: var(--c-text-muted);
    line-height: 1.65;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
    margin-top: auto;
}

.footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

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

.navbar__logo--sm {
    width: 28px;
    height: 28px;
}

.footer__name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--c-text);
}

.footer__nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    justify-content: center;
}

.footer__link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--c-text-faint);
    text-decoration: none;
    transition: color 0.2s;
}

.footer__link:hover {
    color: var(--c-text);
    text-decoration: none;
}

.footer__copy {
    font-size: 0.78rem;
    color: var(--c-text-faint);
    text-align: right;
    white-space: nowrap;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--c-surface-3);
    color: var(--c-text);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--c-border-hover);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: transform 0.4s var(--ease-out), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.toast.toast--show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast--success {
    border-color: rgba(34, 197, 94, 0.4);
    color: var(--c-positive);
}

.toast--error {
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--c-negative);
}

.toast--info {
    border-color: rgba(124, 92, 252, 0.4);
    color: #b8a5fd;
}

/* ============================================================
   HAMBURGER + MOBILE NAV
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    order: -1;
    transition: border-color 0.2s;
}

.hamburger:hover {
    border-color: var(--c-border-hover);
}

.hamburger__line {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--c-text-muted);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, width 0.2s ease;
}

.hamburger.is-open .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open .hamburger__line:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.is-open .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav[hidden] {
    display: none !important;
}

.mobile-nav__link {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.mobile-nav__link:hover {
    color: var(--c-text);
    background: var(--c-surface-2);
    text-decoration: none;
}

/* ============================================================
   AI CHATBOT WIDGET
   ============================================================ */
.chatbot-widget {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.chatbot-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    box-shadow: 0 8px 24px var(--c-primary-glow), 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
    flex-shrink: 0;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px var(--c-primary-glow);
}

.chatbot-toggle:active {
    transform: scale(0.96);
}

.chatbot-toggle__icon {
    width: 26px;
    height: 26px;
    color: #fff;
    transition: opacity 0.2s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
}

.chatbot-toggle__icon--chat {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.chatbot-toggle__icon--close {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.chatbot-widget.is-open .chatbot-toggle__icon--chat {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.chatbot-widget.is-open .chatbot-toggle__icon--close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.chatbot-unread {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-negative);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--c-bg);
    animation: bounce-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
    }

    70% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.chatbot-panel {
    width: 380px;
    max-height: 560px;
    display: flex;
    flex-direction: column;
    background: var(--c-glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--c-border-hover);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 92, 252, 0.12);
    overflow: hidden;
    animation: panel-open 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.chatbot-panel[hidden] {
    display: none !important;
}

@keyframes panel-open {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 1rem 1.25rem;
    border-bottom: 1px solid var(--c-border);
    background: linear-gradient(135deg, rgba(124, 92, 252, 0.08), transparent);
    flex-shrink: 0;
}

.chatbot-header__info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--c-primary-glow);
}

.chatbot-avatar svg {
    width: 18px;
    height: 18px;
    color: #fff;
}

.chatbot-header__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.2;
}

.chatbot-header__status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--c-text-faint);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-positive);
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--c-positive);
    animation: pulse-dot 2.5s infinite;
}

.chatbot-header__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
    min-height: 0;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--c-surface-3);
    border-radius: 2px;
}

.chatbot-msg {
    display: flex;
    gap: 8px;
    animation: msg-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-msg--user {
    flex-direction: row-reverse;
}

@keyframes msg-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-msg__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.chatbot-msg--bot .chatbot-msg__avatar {
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    color: #fff;
}

.chatbot-msg--user .chatbot-msg__avatar {
    background: var(--c-surface-3);
    color: var(--c-text-muted);
}

.chatbot-msg__bubble {
    max-width: 80%;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    line-height: 1.6;
    border-radius: 16px;
}

.chatbot-msg--bot .chatbot-msg__bubble {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    border-bottom-left-radius: 4px;
}

.chatbot-msg--user .chatbot-msg__bubble {
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-typing {
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

.chatbot-typing__bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.6rem 0.85rem;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--c-text-faint);
    animation: typing-bounce 1.2s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.chatbot-input-area {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--c-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--c-text);
    resize: none;
    outline: none;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chatbot-input:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-glow);
}

.chatbot-input::placeholder {
    color: var(--c-text-faint);
}

.chatbot-send {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary), #9b72ff);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.08);
}

.chatbot-send:active {
    transform: scale(0.94);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send svg {
    width: 16px;
    height: 16px;
}

.chatbot-footer {
    padding: 0.4rem 1rem 0.6rem;
    text-align: center;
    font-size: 0.65rem;
    color: var(--c-text-faint);
    border-top: 1px solid var(--c-border);
    flex-shrink: 0;
}

/* ============================================================
   UTILITIES
   ============================================================ */
[hidden] {
    display: none !important;
}

.accent {
    color: var(--c-primary);
}

/* ============================================================
   RESPONSIVE — 1024px (Tablet / Small Desktop)
   ============================================================ */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 5rem 2rem 4rem;
    }

    .hero__visual {
        display: none;
    }

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

    .step-connector {
        width: 2px;
        height: 24px;
        margin: 0 auto;
        background: linear-gradient(180deg, var(--c-primary), var(--c-accent));
    }

    .generator__layout {
        grid-template-columns: 1fr;
    }

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

    .analytics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   RESPONSIVE — 768px (Tablets / Large Phones)
   ============================================================ */
@media (max-width: 768px) {
    .navbar__links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .navbar__inner {
        padding: 0 1.25rem;
        gap: 0.75rem;
    }

    .navbar__badge {
        display: none;
    }

    .hero {
        padding: 4rem 1.25rem 3rem;
    }

    .hero__headline {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .hero__sub {
        font-size: 0.95rem;
    }

    .hero__stats {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .section__inner {
        padding: 3.5rem 1.25rem;
    }

    .section__title {
        font-size: clamp(1.6rem, 5vw, 2rem);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

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

    .analytics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .insight-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem 1.25rem;
        text-align: center;
    }

    .footer__brand {
        justify-content: center;
    }

    .footer__nav {
        gap: 1.25rem;
    }

    .footer__copy {
        text-align: center;
    }

    .chatbot-widget {
        bottom: 1.25rem;
        right: 1.25rem;
    }

    .chatbot-panel {
        width: 340px;
        max-height: 500px;
    }
}

/* ============================================================
   RESPONSIVE — 480px (Small Phones)
   ============================================================ */
@media (max-width: 480px) {
    .navbar__inner {
        height: 56px;
        padding: 0 1rem;
    }

    .navbar__title {
        font-size: 1rem;
    }

    .hero {
        padding: 3rem 1rem 2.5rem;
    }

    .hero__headline {
        font-size: clamp(1.75rem, 7vw, 2rem);
    }

    .hero__tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.75rem;
    }

    .hero__stats {
        gap: 0.75rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .hero__cta {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .section__inner {
        padding: 3rem 1rem;
    }

    .card__body {
        padding: 1.1rem;
    }

    .card__header {
        padding: 1rem 1.1rem;
    }

    .tone-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .tone-card__inner {
        padding: 0.7rem 0.75rem;
    }

    .tone-card__sub {
        display: none;
    }

    .analytics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .analytics-stat__value {
        font-size: 1.5rem;
    }

    .insight-grid {
        grid-template-columns: 1fr 1fr;
    }

    .steps-grid {
        gap: 0.75rem;
    }

    .step-card {
        padding: 1.4rem;
    }

    .step-card__number {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .feature-card {
        padding: 1.4rem;
    }

    .history-list {
        max-height: 280px;
    }

    /* Chatbot: full-width bottom sheet on small phones */
    .chatbot-widget {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        flex-direction: column-reverse;
        align-items: flex-end;
    }

    .chatbot-panel {
        width: 100%;
        max-height: calc(100vh - 100px);
        border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
    }

    .chatbot-toggle {
        align-self: flex-end;
    }
}

/* ============================================================
   RESPONSIVE — 360px (Very Small / Budget Phones)
   ============================================================ */
@media (max-width: 360px) {
    .navbar__inner {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .hero {
        padding: 2.5rem 0.75rem 2rem;
    }

    .section__inner {
        padding: 2.5rem 0.75rem;
    }

    .tone-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .insight-grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hero__divider {
        display: none;
    }
}