:root {
    --umb-green: #0f766e;
    --umb-green-soft: #1da88f;
    --umb-orange: #f59e0b;
    --umb-orange-soft: #ffb938;
    --umb-dark: #081512;
    --umb-text: #edf7f3;
    --umb-muted: #b8d0ca;
}

body {
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--umb-text);
    background:
        radial-gradient(circle at top left, rgba(29, 168, 143, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 32%),
        linear-gradient(160deg, #040908 0%, var(--umb-dark) 45%, #07110f 100%);
}

.app-shell {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.app-shell::before,
.app-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(16px);
    opacity: 0.75;
    z-index: 0;
}

.app-shell::before {
    width: 220px;
    height: 220px;
    top: -70px;
    right: -80px;
    background: linear-gradient(135deg, rgba(29, 168, 143, 0.5), rgba(29, 168, 143, 0));
}

.app-shell::after {
    width: 180px;
    height: 180px;
    left: -60px;
    bottom: 80px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.32), rgba(245, 158, 11, 0));
}

.phone-stage {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
}

.hero-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(22, 40, 35, 0.92), rgba(10, 20, 17, 0.95));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    border-radius: 28px;
    backdrop-filter: blur(14px);
}

.brand-chip,
.menu-toggle {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--umb-text);
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--umb-orange-soft), var(--umb-green-soft));
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.logo-badge {
    width: 78px;
    height: 78px;
    padding: 10px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.app-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.accent-text {
    background: linear-gradient(90deg, var(--umb-orange-soft), #ffd27d 35%, #9ff3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead-copy {
    color: var(--umb-muted);
    font-size: 0.96rem;
    line-height: 1.7;
}

.mode-panel {
    padding: 0.9rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.mode-panel-header strong {
    font-size: 0.9rem;
}

.mode-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.mode-quick-preview {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.8rem;
}

.quick-action-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.quick-preview-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--umb-text);
}

.mode-chip {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--umb-text);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mode-chip:hover,
.mode-chip:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
}

.mode-chip.is-active {
    color: #102118;
    background: linear-gradient(135deg, var(--umb-orange-soft), var(--umb-green-soft));
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.16);
}

#chat-welcome {
    max-height: 420px;
    opacity: 1;
    overflow: hidden;
    transform: translateY(0);
    transition: max-height 0.45s ease, opacity 0.3s ease, margin 0.3s ease, transform 0.45s ease;
}

.conversation-started #chat-welcome {
    max-height: 0;
    opacity: 0;
    margin: 0;
    transform: translateY(-18px);
    pointer-events: none;
}

.chat-frame {
    border-radius: 24px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(6, 16, 13, 0.98), rgba(10, 24, 20, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.chat-status .status-light {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.8);
}

.chat-status small,
.chat-meta,
.mini-note {
    color: var(--umb-muted);
}

.chat-state-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.chat-state-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(29, 168, 143, 0.12);
    color: var(--umb-text);
}

.chat-state-badge.is-muted {
    background: rgba(255, 255, 255, 0.05);
    color: #d2e4df;
}

.chat-tools .dropdown-menu {
    min-width: 220px;
    border-radius: 16px;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 24, 20, 0.96);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.chat-tools .dropdown-item {
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    color: var(--umb-text);
    font-size: 0.88rem;
}

.chat-tools .dropdown-item-text {
    color: var(--umb-muted);
    padding: 0.45rem 0.85rem 0.15rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-tools .dropdown-item:hover,
.chat-tools .dropdown-item:focus {
    color: var(--umb-text);
    background: rgba(29, 168, 143, 0.16);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    padding: 0;
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle.show {
    color: var(--umb-text);
    background: rgba(255, 255, 255, 0.08);
}

#chat-responses {
    min-height: 220px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.2rem;
    transform: translateY(0);
    transition: transform 0.45s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.55) transparent;
}

#chat-responses::-webkit-scrollbar {
    width: 6px;
}

#chat-responses::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.55);
    border-radius: 999px;
}

.conversation-started #chat-responses {
    transform: translateY(-10px);
}

.chat-bubbles {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.bubble {
    max-width: 88%;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.6;
    position: relative;
    animation: floatUp 0.55s ease both;
}

.bubble-ai {
    align-self: flex-start;
    color: #eefaf6;
    background: linear-gradient(145deg, rgba(25, 92, 81, 0.95), rgba(18, 65, 57, 0.95));
    border-top-left-radius: 8px;
    border: 1px solid rgba(94, 234, 212, 0.18);
}

.bubble-user {
    align-self: flex-end;
    color: #1f1704;
    background: linear-gradient(145deg, rgba(255, 201, 98, 0.98), rgba(245, 158, 11, 0.95));
    border-top-right-radius: 8px;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.15);
}

.bubble-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.75;
}

.bubble-message {
    display: block;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: normal;
    line-break: auto;
}

.bubble-word {
    display: inline-block;
    white-space: nowrap;
}

.bubble-letter {
    display: inline-block;
    white-space: pre;
    opacity: 0;
    transform: translateY(0.28rem);
    animation: bubbleLetterReveal 0.24s ease forwards;
}

.bubble-message.is-typing::after {
    content: "";
    display: inline-block;
    width: 0.56rem;
    height: 1.05rem;
    margin-left: 0.18rem;
    vertical-align: text-bottom;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
    animation: blinkCursor 0.85s infinite;
}

.bubble-after {
    display: contents;
}

.bubble-meta {
    margin-top: 0.7rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.bubble-meta-chip,
.bubble-source-chip {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1.15;
    color: inherit;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bubble-source-chip {
    align-items: flex-start;
    gap: 0.15rem;
    text-decoration: none;
}

.bubble-source-chip.is-link:hover,
.bubble-source-chip.is-link:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.bubble-source-name {
    font-weight: 700;
}

.bubble-source-detail {
    opacity: 0.8;
    font-size: 0.64rem;
}

.bubble-sources {
    margin-top: 0.7rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bubble-sources-title {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.bubble-sources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.bubble-loading {
    border-style: dashed;
    opacity: 0.88;
}

.chat-dot-flow {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.chat-dot-flow span {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(237, 247, 243, 0.75);
    animation: pulseDot 1.2s infinite ease-in-out;
}

.chat-dot-flow span:nth-child(2) {
    animation-delay: 0.15s;
}

.chat-dot-flow span:nth-child(3) {
    animation-delay: 0.3s;
}

.composer {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.composer .form-control {
    min-height: 52px;
    color: var(--umb-text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: none;
}

.composer .form-control::placeholder {
    color: rgba(237, 247, 243, 0.45);
}

.composer .form-control:focus {
    border-color: rgba(29, 168, 143, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(29, 168, 143, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.send-btn {
    min-width: 120px;
    min-height: 52px;
    border: none;
    border-radius: 16px;
    color: #102118;
    font-weight: 700;
    background: linear-gradient(135deg, var(--umb-orange-soft), var(--umb-green-soft));
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.18);
}

.send-btn:hover,
.send-btn:focus {
    color: #102118;
    transform: translateY(-1px);
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.feature-card {
    padding: 0.95rem 0.85rem;
    border-radius: 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-card strong {
    display: block;
    font-size: 0.82rem;
    margin-bottom: 0.2rem;
}

.feature-card span {
    color: var(--umb-muted);
    font-size: 0.74rem;
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseDot {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes blinkCursor {
    0%, 45% {
        opacity: 0.15;
    }
    55%, 100% {
        opacity: 0.82;
    }
}

@keyframes bubbleLetterReveal {
    0% {
        opacity: 0;
        transform: translateY(0.28rem);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .hero-card {
        border-radius: 24px;
    }

    .feature-strip {
        grid-template-columns: 1fr;
    }

    .bubble {
        max-width: 94%;
    }

    .send-btn {
        width: 100%;
    }

    .chat-header {
        align-items: center;
        flex-wrap: wrap;
    }

    .chat-state-badges {
        width: 100%;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bubble,
    .bubble-letter,
    .bubble-message.is-typing::after,
    .chat-dot-flow span {
        animation: none !important;
        transition: none !important;
        filter: none !important;
        transform: none !important;
    }
}
