* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top, rgba(196, 224, 211, 0.55), transparent 30%),
        linear-gradient(180deg, #eef4ef, #f7f9fb 45%, #eef3f7);
    color: #1f2937;
}

.app {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px 32px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #ffffff, #eef4f7);
    border: 1px solid #dde5ea;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

.hero-copy {
    flex: 1;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #54727f;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
}

.subtitle {
    margin: 12px 0 0;
    font-size: 18px;
    color: #4b5563;
}

.status-panel {
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(18, 63, 82, 0.06);
    border: 1px solid rgba(18, 63, 82, 0.08);
}

.status-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #54727f;
    margin-bottom: 8px;
}

.model-badge {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 999px;
    background: #123f52;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
    word-break: break-word;
}

.quick-prompts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0;
}

.quick-prompts button,
.composer button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: #123f52;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.quick-prompts button:hover,
.composer button:hover {
    background: #0f3444;
}

.chat {
    min-height: 420px;
    background: #fff;
    border: 1px solid #dde5ea;
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
    overflow-y: auto;
}

.status-message {
    margin: 12px 6px 0;
    font-size: 14px;
    color: #35505b;
}

.status-message.is-error {
    color: #b42318;
}

.status-message.is-success {
    color: #0f7a45;
}

.message {
    max-width: 78%;
    padding: 14px 16px;
    border-radius: 18px;
    margin: 10px 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.message.user {
    margin-left: auto;
    background: #123f52;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.message.bot {
    background: #eef4f7;
    color: #1f2937;
    border-bottom-left-radius: 6px;
}

.message.pending {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 74px;
}

.message.pending span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #54727f;
    animation: pulse 1.2s infinite ease-in-out;
}

.message.pending span:nth-child(2) {
    animation-delay: 0.15s;
}

.message.pending span:nth-child(3) {
    animation-delay: 0.3s;
}

.composer {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.composer input {
    flex: 1;
    border: 1px solid #cfd8de;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 16px;
    background: #fff;
}

.composer input:focus {
    outline: none;
    border-color: #123f52;
    box-shadow: 0 0 0 4px rgba(18,63,82,0.12);
}

.composer button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .hero {
        flex-direction: column;
    }
    .hero { padding: 22px; }
    h1 { font-size: 28px; }
    .subtitle { font-size: 16px; }
    .chat { min-height: 360px; }
    .message { max-width: 90%; }
    .composer { flex-direction: column; }
    .status-panel {
        width: 100%;
        min-width: 0;
    }
}
