* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
}

button,
input,
select,
textarea {
    font: inherit;
}

img,
video {
    max-width: 100%;
}

footer {
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
    padding: 1.5rem;
}

.chat-message-row {
    display: flex;
    width: 100%;
}

.chat-message-row--mine {
    justify-content: flex-end;
}

.chat-message-row--other {
    justify-content: flex-start;
}

.chat-message-bubble {
    max-width: min(78%, 34rem);
    border-radius: 1rem;
    padding: 0.75rem 0.875rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.chat-message-bubble--mine {
    border-bottom-right-radius: 0.25rem;
    background: #2563eb;
    color: #ffffff;
}

.chat-message-bubble--other {
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.25rem;
    background: #ffffff;
    color: #0f172a;
}

.chat-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-message-meta--mine {
    color: rgba(255, 255, 255, 0.72);
}

.chat-message-meta--other {
    color: #64748b;
}

.chat-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.9375rem;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .chat-message-bubble {
        max-width: 92%;
    }
}

.demo-dialog { width: min(28rem, calc(100% - 2rem)); margin: auto; padding: 2rem; border: 1px solid #e2e8f0; border-radius: 1.75rem; background: #fff; color: #0f172a; box-shadow: 0 25px 50px #0f172a33; }
.demo-dialog::backdrop { background: #0f172a99; }
.demo-dialog h2 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.demo-dialog p { margin: 0 0 1.5rem; color: #475569; line-height: 1.7; }
.demo-dialog button { width: 100%; padding: .75rem 1.25rem; border: 0; border-radius: .75rem; background: #2563eb; color: #fff; font-weight: 600; cursor: pointer; }
.demo-dialog button:hover { background: #1d4ed8; }
.demo-dialog button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
