/* ============================================================
   AI Homework Solver — Dedicated Page Styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

:root {
    --bg: #0c0c0f;
    --surface-1: #131316;
    --surface-2: #19191e;
    --surface-3: #212127;
    --surface-4: #2a2a31;
    --surface-5: #36363f;
    --border: #27272f;
    --border-light: #353540;
    --text-1: #f0f0f3;
    --text-2: #9d9dab;
    --text-3: #65657a;
    --accent: #f0b232;
    --accent-hover: #f5c563;
    --accent-glow: rgba(240, 178, 50, .25);
    --accent-muted: rgba(240, 178, 50, .08);
    --danger: #ef4444;
    --font: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-1);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--surface-5);
    border-radius: 99px;
}

/* ---- SIDEBAR ---- */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform .3s var(--ease);
    z-index: 100;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px 12px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent);
    text-decoration: none;
}

.sidebar-logo svg {
    width: 22px;
    height: 22px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 1.4rem;
    padding: 4px;
}

.new-chat-btn {
    margin: 4px 14px 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-3);
    color: var(--text-1);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: .875rem;
    transition: all .2s var(--ease);
}

.new-chat-btn:hover {
    background: var(--surface-4);
    border-color: var(--accent);
    color: var(--accent);
}

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

.sidebar-section {
    padding: 0 14px;
}

.sidebar-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
    margin-bottom: 10px;
    font-weight: 600;
}

.demo-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: .82rem;
    cursor: pointer;
    text-align: left;
    transition: all .2s var(--ease);
    font-family: var(--font);
}

.demo-chip:hover {
    background: var(--surface-3);
    border-color: var(--border-light);
    color: var(--text-1);
}

.demo-chip .chip-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-spacer {
    flex: 1;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}

.trial-card {
    background: linear-gradient(135deg, var(--accent-muted), transparent);
    border: 1px solid rgba(240, 178, 50, .15);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}

.trial-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: .85rem;
    color: var(--accent);
    margin-bottom: 8px;
}

.trial-count {
    font-size: .78rem;
    color: var(--text-2);
    margin-bottom: 8px;
}

.trial-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-4);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 4px;
}

.trial-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #e8a020);
    border-radius: 99px;
    transition: width .5s var(--ease);
}

.upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    font-weight: 700;
    font-size: .85rem;
    background: linear-gradient(135deg, var(--accent), #d99a18);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .25s var(--ease);
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: .78rem;
    color: var(--text-3);
}

.back-link:hover {
    color: var(--text-2);
}

/* ---- SIDEBAR OVERLAY (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    z-index: 90;
}

.sidebar-overlay.open {
    display: block;
}

/* ---- MAIN CHAT ---- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    position: relative;
}

/* subtle gradient bg */
.chat-main::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(240, 178, 50, .03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.chat-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 12, 15, .8);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 4px;
}

.menu-btn svg {
    width: 22px;
    height: 22px;
}

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

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, .5);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, .5);
    }

    50% {
        box-shadow: 0 0 16px rgba(34, 197, 94, .8);
    }
}

.topbar-title {
    font-weight: 700;
    font-size: .95rem;
}

.model-badge {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--surface-3);
    color: var(--text-3);
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: .5px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all .15s;
}

.icon-btn:hover {
    color: var(--text-1);
    background: var(--surface-3);
}

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

/* ---- MESSAGES ---- */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    position: relative;
    z-index: 1;
    scroll-behavior: smooth;
}

.messages.drag-over {
    outline: 2px dashed var(--accent);
    outline-offset: -8px;
    border-radius: var(--radius);
}

/* ---- WELCOME SCREEN ---- */
.welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 40px 24px;
    text-align: center;
    animation: fadeUp .6s var(--ease) both;
}

.welcome-glyph {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent), #e89020);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 40px var(--accent-glow);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

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

    50% {
        transform: translateY(-8px);
    }
}

.welcome h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-1), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-sub {
    color: var(--text-2);
    font-size: 1rem;
    margin-bottom: 36px;
    max-width: 400px;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 520px;
    width: 100%;
    margin-bottom: 36px;
}

.feat-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px;
    text-align: left;
    transition: all .25s var(--ease);
}

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

.feat-card .feat-emoji {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.feat-card h3 {
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feat-card p {
    font-size: .75rem;
    color: var(--text-3);
    line-height: 1.4;
}

.try-label {
    font-size: .75rem;
    color: var(--text-3);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 28px;
}

.demo-pills button {
    padding: 8px 16px;
    font-size: .8rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 99px;
    color: var(--text-2);
    cursor: pointer;
    transition: all .2s var(--ease);
    font-family: var(--font);
}

.demo-pills button:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-muted);
}

.trial-banner {
    background: linear-gradient(135deg, var(--accent-muted), rgba(240, 178, 50, .02));
    border: 1px solid rgba(240, 178, 50, .15);
    border-radius: var(--radius);
    padding: 14px 22px;
    font-size: .85rem;
    color: var(--text-2);
}

.trial-banner strong {
    color: var(--accent);
}

.welcome-upsell {
    margin-top: 16px;
    font-size: .85rem;
    color: var(--text-3);
}

.inline-upgrade-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    font-size: .85rem;
    font-family: var(--font);
    text-decoration: underline;
    transition: color .15s;
}

.inline-upgrade-btn:hover {
    color: var(--accent-hover);
}

.upgrade-perks {
    text-align: center;
    font-size: .7rem;
    color: var(--text-3);
    margin-top: 8px;
}

/* ---- CHAT MESSAGES ---- */
.msg {
    display: flex;
    gap: 12px;
    padding: 8px 24px;
    animation: fadeUp .35s var(--ease) both;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.msg+.msg {
    margin-top: 4px;
}

.msg-user {
    justify-content: flex-end;
}

.msg-user .msg-bubble {
    background: #2c2517;
    border: 1px solid #3d3220;
    border-radius: var(--radius) var(--radius) 4px var(--radius);
    max-width: 75%;
}

.msg-assistant {
    justify-content: flex-start;
}

.msg-assistant .msg-bubble {
    background: #1a1a20;
    border: 1px solid #262630;
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    max-width: 85%;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #e89020);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    margin-top: 2px;
}

.msg-avatar svg {
    width: 16px;
    height: 16px;
    color: #000;
}

.msg-bubble {
    padding: 12px 16px;
}

.msg-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.msg-images img {
    max-width: 280px;
    max-height: 220px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .2s;
}

.msg-images img:hover {
    transform: scale(1.02);
}

.msg-content {
    font-size: .9rem;
    line-height: 1.65;
    color: var(--text-1);
}

.msg-content p {
    margin-bottom: 10px;
}

.msg-content p:last-child {
    margin-bottom: 0;
}

.msg-content strong {
    font-weight: 700;
}

.msg-content em {
    font-style: italic;
    color: var(--text-2);
}

.msg-content h1,
.msg-content h2,
.msg-content h3 {
    margin: 16px 0 8px;
    font-weight: 700;
}

.msg-content h1 {
    font-size: 1.2rem;
}

.msg-content h2 {
    font-size: 1.05rem;
}

.msg-content h3 {
    font-size: .95rem;
}

.msg-content ul,
.msg-content ol {
    margin: 8px 0;
    padding-left: 22px;
}

.msg-content li {
    margin-bottom: 4px;
}

.msg-content code {
    background: var(--surface-4);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: .82rem;
    font-family: 'Fira Code', monospace;
}

.msg-content pre {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 10px 0;
    overflow-x: auto;
}

.msg-content pre code {
    background: none;
    padding: 0;
    font-size: .82rem;
}

.msg-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 14px;
    color: var(--text-2);
    margin: 10px 0;
}

.msg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: .85rem;
}

.msg-content th,
.msg-content td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.msg-content th {
    background: var(--surface-3);
    font-weight: 600;
}

.msg-error .msg-bubble {
    background: #241414;
    border: 1px solid #3a1f1f;
    border-radius: var(--radius);
    color: var(--danger);
    max-width: 85%;
}

/* ---- CHAT HISTORY ---- */
.history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s;
    font-size: .82rem;
    color: var(--text-2);
}

.history-item:hover {
    background: var(--surface-3);
    color: var(--text-1);
}

.history-item.active {
    background: var(--surface-4);
    color: var(--accent);
    font-weight: 600;
}

.history-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-del {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0;
    transition: all .15s;
    line-height: 1;
}

.history-item:hover .history-del {
    opacity: 1;
}

.history-del:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, .12);
}

/* Typing indicator */
.typing {
    display: flex;
    gap: 12px;
    padding: 8px 24px;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    padding: 14px 20px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-3);
    border-radius: 50%;
    animation: bounce 1.4s infinite both;
}

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

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

@keyframes bounce {

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

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

/* ---- INPUT AREA ---- */
.input-area {
    padding: 0 24px 16px;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.image-preview-strip {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow-x: auto;
}

.img-preview {
    position: relative;
    flex-shrink: 0;
}

.img-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.img-preview .img-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    font-size: .7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s;
}

.img-preview .img-remove:hover {
    transform: scale(1.15);
}

.input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    transition: border-color .2s;
}

.input-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.has-previews .input-row {
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: none;
}

.attach-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}

.attach-btn:hover {
    color: var(--accent);
    background: var(--accent-muted);
}

.attach-btn svg {
    width: 20px;
    height: 20px;
}

.textarea-wrap {
    flex: 1;
}

.textarea-wrap textarea {
    width: 100%;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-1);
    font-family: var(--font);
    font-size: .9rem;
    line-height: 1.5;
    max-height: 160px;
    padding: 6px 0;
}

.textarea-wrap textarea::placeholder {
    color: var(--text-3);
}

.send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    cursor: pointer;
    transition: all .2s var(--ease);
    flex-shrink: 0;
}

.send-btn:disabled {
    opacity: .3;
    cursor: default;
}

.send-btn:not(:disabled):hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.send-btn svg {
    width: 18px;
    height: 18px;
}

.input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px 0;
    font-size: .72rem;
    color: var(--text-3);
}

.input-meta kbd {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: .65rem;
    font-family: var(--font);
}

.trial-inline {
    color: var(--accent);
    font-weight: 600;
}

.trial-inline.exhausted {
    color: var(--danger);
}

/* ---- PAYWALL MODAL ---- */
.paywall-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn .25s var(--ease);
}

.paywall {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    padding: 32px;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    animation: scaleUp .35s var(--ease);
    max-height: 90vh;
    overflow-y: auto;
}

.paywall-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.paywall-close:hover {
    color: var(--text-1);
    background: var(--surface-3);
}

.paywall-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--accent-muted), rgba(240, 178, 50, .02));
    border: 1px solid rgba(240, 178, 50, .2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.paywall h2 {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.paywall-sub {
    text-align: center;
    color: var(--text-2);
    font-size: .9rem;
    margin-bottom: 24px;
}

.paywall-feats {
    margin-bottom: 24px;
}

.paywall-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: .88rem;
    color: var(--text-2);
}

.paywall-feat .check {
    color: var(--accent);
    font-weight: 700;
}

.paywall-price {
    text-align: center;
    margin-bottom: 4px;
}

.price-big {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent);
}

.price-per {
    font-size: .9rem;
    color: var(--text-3);
}

.paywall-cancel {
    text-align: center;
    font-size: .78rem;
    color: var(--text-3);
    margin-bottom: 20px;
}

.paywall-stripe {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.paywall-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}

.paywall-divider span {
    font-size: .7rem;
    color: var(--text-3);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.paywall-divider::before,
.paywall-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.paywall-qr {
    text-align: center;
    margin: 12px 0;
}

.paywall-qr p {
    font-size: .78rem;
    color: var(--text-3);
    margin-bottom: 8px;
}

.paywall-qr-img {
    display: inline-block;
    background: #fff;
    padding: 10px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.paywall-qr-img img {
    width: 130px;
    height: 130px;
    display: block;
}

.paywall-note {
    text-align: center;
    font-size: .75rem;
    color: var(--text-3);
    margin-top: 16px;
}

.paywall-note a {
    color: var(--accent);
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(.92);
    }

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

/* stagger welcome items */
.welcome>*:nth-child(1) {
    animation-delay: 0s;
}

.welcome>*:nth-child(2) {
    animation-delay: .08s;
}

.welcome>*:nth-child(3) {
    animation-delay: .14s;
}

.welcome>*:nth-child(4) {
    animation-delay: .2s;
}

.welcome>*:nth-child(5) {
    animation-delay: .28s;
}

.welcome>*:nth-child(6) {
    animation-delay: .34s;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .menu-btn {
        display: flex;
    }

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

    .msg {
        padding: 8px 16px;
    }

    .input-area {
        padding: 0 12px 12px;
    }

    .welcome h1 {
        font-size: 1.8rem;
    }

    .welcome-glyph {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .demo-pills button {
        font-size: .72rem;
        padding: 6px 12px;
    }

    .feat-card h3 {
        font-size: .78rem;
    }

    .feat-card p {
        font-size: .7rem;
    }

    .msg-user .msg-bubble,
    .msg-assistant .msg-bubble {
        max-width: 92%;
    }
}