/* Общие стили для демо-чат страниц */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #CDFF00;
    --bg: #0a0a0a;
    --bg-chat: #111111;
    --bg-bubble: #1a1a1a;
    --border: #222;
    --text: #e0e0e0;
    --text-muted: #666;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: #fff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.demo-wrapper {
    width: 100%;
    max-width: 480px;
    height: 90vh;
    height: 90dvh;
    max-height: 750px;
    display: flex;
    flex-direction: column;
    background: var(--bg-chat);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.demo-header {
    padding: 14px 20px;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.demo-header-left { display: flex; align-items: center; gap: 12px; }

.demo-avatar {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}

.demo-title { font-size: 15px; font-weight: 700; }
.demo-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.demo-badge {
    font-size: 10px; font-weight: 700; color: var(--bg); background: var(--accent);
    padding: 4px 10px; border-radius: 20px; letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
}

.demo-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--text-muted); text-decoration: none; font-size: 13px;
    padding: 10px 20px 0; transition: color 0.2s; flex-shrink: 0;
}
.demo-back:hover { color: var(--accent); }

.chat-area {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
}

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

.bubble {
    max-width: 80%; padding: 10px 14px; border-radius: 16px;
    font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}

.bubble.ai { background: var(--bg-bubble); color: var(--text); border-bottom-left-radius: 4px; }
.bubble.user { background: var(--accent); color: var(--bg); border-bottom-right-radius: 4px; font-weight: 500; }

.typing .dot {
    display: inline-block; animation: blink 1s infinite;
    color: #555; font-size: 10px; margin-right: 4px;
}
.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

.quick-row {
    padding: 8px 16px 4px; display: flex; flex-wrap: wrap;
    gap: 6px; flex-shrink: 0;
}

.quick-btn {
    background: transparent; border: 1px solid #333; color: var(--accent);
    padding: 6px 14px; border-radius: 20px; font-size: 12px; cursor: pointer;
    font-family: 'Inter', sans-serif; white-space: nowrap; transition: all 0.2s;
}
.quick-btn:hover { background: rgba(205,255,0,0.08); border-color: var(--accent); }

.input-row {
    padding: 12px 16px 16px; border-top: 1px solid #1a1a1a;
    display: flex; gap: 8px; flex-shrink: 0;
}

.input-row input {
    flex: 1; background: var(--bg-bubble); border: 1px solid var(--border);
    border-radius: 12px; padding: 10px 14px; color: #fff; font-size: 14px;
    font-family: 'Inter', sans-serif; outline: none;
}
.input-row input:focus { border-color: #444; }

.send-btn {
    width: 42px; height: 42px; border-radius: 12px; background: var(--accent);
    color: var(--bg); border: none; font-size: 18px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: opacity 0.2s;
}
.send-btn:disabled { opacity: 0.4; cursor: default; }

@media (max-width: 520px) {
    body { padding: 0; }
    .demo-wrapper {
        max-width: 100%; height: 100vh; height: 100dvh;
        max-height: none; border-radius: 0; border: none;
    }
}
