.ark-assistant-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2200;
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.ark-assistant-button {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 22px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.28), transparent 1.8rem),
        linear-gradient(135deg, #0f172a 0%, #312e81 48%, #7c3aed 100%);
    box-shadow: 0 20px 45px rgba(49, 46, 129, 0.38);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ark-assistant-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 52px rgba(49, 46, 129, 0.46);
}

.ark-assistant-button i {
    font-size: 24px;
}

.ark-assistant-badge {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: #ef4444;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ark-assistant-panel {
    position: fixed;
    right: 24px;
    bottom: 104px;
    width: min(420px, calc(100vw - 32px));
    height: min(680px, calc(100vh - 128px));
    border: 1px solid rgba(226, 232, 240, 0.84);
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.32);
    display: none;
    flex-direction: column;
}

.ark-assistant-root.is-open .ark-assistant-panel {
    display: flex;
    animation: arkPanelIn 0.2s ease-out;
}

.ark-assistant-header {
    padding: 18px 20px;
    color: #ffffff;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.2), transparent 12rem),
        linear-gradient(135deg, #111827 0%, #312e81 52%, #6d28d9 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ark-assistant-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ark-assistant-avatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.16);
    display: inline-grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ark-assistant-title {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.ark-assistant-subtitle {
    margin: 2px 0 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 12px;
}

.ark-assistant-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.ark-assistant-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    background:
        radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.08), transparent 16rem),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    scrollbar-width: none;
}

.ark-assistant-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.ark-message {
    margin-bottom: 12px;
    display: flex;
}

.ark-message.user {
    justify-content: flex-end;
}

.ark-message-bubble {
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 16px;
    white-space: pre-wrap;
    line-height: 1.45;
    font-size: 13px;
}

.ark-message.assistant .ark-message-bubble {
    color: #1e293b;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ark-message.user .ark-message-bubble {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.2);
}

.ark-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 4px;
}

.ark-suggestion {
    border: 1px solid rgba(124, 58, 237, 0.24);
    border-radius: 999px;
    padding: 8px 11px;
    color: #5b21b6;
    background: rgba(124, 58, 237, 0.07);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.ark-assistant-footer {
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff;
}

.ark-assistant-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ark-assistant-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    border: 1px solid rgba(148, 163, 184, 0.36);
    border-radius: 16px;
    padding: 11px 12px;
    color: #0f172a;
    background: #f8fafc;
    outline: 0;
}

.ark-assistant-input:focus {
    border-color: #7c3aed;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.11);
}

.ark-assistant-send {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea, #4f46e5);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.ark-assistant-footnote {
    margin: 8px 4px 0;
    color: #64748b;
    font-size: 11px;
}

@keyframes arkPanelIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

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

@media (max-width: 640px) {
    .ark-assistant-root {
        right: 16px;
        bottom: 16px;
    }

    .ark-assistant-panel {
        right: 12px;
        bottom: 88px;
        width: calc(100vw - 24px);
        height: min(74vh, 640px);
        border-radius: 20px;
    }
}
