:root {
    --nova-primary: #F5B40D;
    --nova-primary-dark: #d99e00;
    --nova-secondary: #fff8e7;
    --nova-white: #ffffff;
    --nova-bg: #f7f8fa;
    --nova-text: #1a1a1a;
    --nova-text-muted: #6b7280;
    --nova-border: #e5e7eb;
    --nova-bubble-user: #FFF3CC;
    --nova-bubble-bot: #ffffff;
    --nova-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --nova-radius: 20px;
    --nova-radius-sm: 12px;
    --nova-zindex: 9999;
    --nova-width: 400px;
    --nova-height: 560px;
}

#nova-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--nova-zindex);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--nova-primary);
    box-shadow: 0 4px 20px rgba(245, 180, 13, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    outline: none;
    padding: 0;
    overflow: visible;
}

#nova-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(245, 180, 13, 0.55);
}

#nova-bubble:active {
    transform: scale(0.96);
}

#nova-bubble svg,
#nova-bubble img {
    width: 44px;
    height: 44px;
    pointer-events: none;
}

#nova-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #ef4444;
    border-radius: 50%;
    border: 2.5px solid #fff;
    display: block;
    pointer-events: none;
}

#nova-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: var(--nova-zindex);
    width: var(--nova-width);
    height: var(--nova-height);
    background: var(--nova-white);
    border-radius: var(--nova-radius);
    box-shadow: var(--nova-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s cubic-bezier(.4, 0, .2, 1),
        opacity 0.22s ease;
}

#nova-window.nova-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

#nova-header {
    background: var(--nova-primary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

#nova-header-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

#nova-header-info {
    flex: 1;
    min-width: 0;
}

#nova-header-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

#nova-header-name span.nova-highlight {
    color: #1a1a1a;
}

#nova-header-subtitle {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.55);
    margin-top: 1px;
}

#nova-close-btn {
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
    transition: background 0.15s;
    flex-shrink: 0;
}

#nova-close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

#nova-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--nova-bg);
    scroll-behavior: smooth;
}

#nova-messages::-webkit-scrollbar {
    width: 4px;
}

#nova-messages::-webkit-scrollbar-track {
    background: transparent;
}

#nova-messages::-webkit-scrollbar-thumb {
    background: var(--nova-border);
    border-radius: 2px;
}

.nova-greeting {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 8px 8px;
    gap: 8px;
}

.nova-greeting-avatar {
    width: 60px;
    height: 60px;
    background: var(--nova-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(245, 180, 13, 0.3);
}

.nova-greeting-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--nova-text);
}

.nova-greeting-text {
    font-size: 13px;
    color: var(--nova-text-muted);
    line-height: 1.5;
}

.nova-msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    animation: novaFadeIn 0.2s ease;
}

.nova-msg-row.user {
    flex-direction: row-reverse;
}

.nova-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--nova-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.nova-bubble-bot {
    background: var(--nova-bubble-bot);
    color: var(--nova-text);
    border-radius: 18px 18px 18px 4px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
    max-width: 82%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    white-space: pre-line;
}

.nova-bubble-user {
    background: var(--nova-primary);
    color: #1a1a1a;
    border-radius: 18px 18px 4px 18px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
    max-width: 82%;
    font-weight: 500;
}

.nova-options-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
    animation: novaFadeIn 0.2s ease;
}

.nova-options-label {
    font-size: 11px;
    color: var(--nova-text-muted);
    font-weight: 500;
    padding-left: 2px;
}

.nova-option-btn {
    background: var(--nova-white);
    border: 1.5px solid var(--nova-border);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--nova-text);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    line-height: 1.4;
}

.nova-option-btn:hover {
    background: var(--nova-secondary);
    border-color: var(--nova-primary);
    transform: translateX(2px);
}

.nova-option-btn:active {
    transform: scale(0.98);
}

.nova-option-btn .nova-arrow {
    font-size: 11px;
    color: var(--nova-primary);
    flex-shrink: 0;
}

.nova-cat-btn {
    background: var(--nova-white);
    border: 1.5px solid var(--nova-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--nova-text);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    width: 100%;
    line-height: 1.4;
}

.nova-cat-btn:hover {
    background: var(--nova-secondary);
    border-color: var(--nova-primary);
    transform: translateX(2px);
}

.nova-cat-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nova-cat-label {
    flex: 1;
}

.nova-cat-arrow {
    font-size: 11px;
    color: var(--nova-primary);
    flex-shrink: 0;
}

.nova-rating-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 8px;
    animation: novaFadeIn 0.2s ease;
}

.nova-rating-pill {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--nova-primary);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.nova-rating-divider {
    width: 1.5px;
    height: 28px;
    background: var(--nova-primary);
    flex-shrink: 0;
}

.nova-rating-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    color: var(--nova-primary);
    transition: background 0.15s, color 0.1s;
    padding: 0;
}

.nova-rating-btn:hover {
    background: var(--nova-secondary);
}

.nova-rating-btn:active {
    transform: scale(0.92);
}

.nova-rating-btn.active-positive {
    background: #dcfce7;
    color: #22c55e;
}

.nova-rating-btn.active-negative {
    background: #fee2e2;
    color: #ef4444;
}

.nova-back-btn {
    background: none;
    border: none;
    color: var(--nova-primary-dark);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    font-weight: 600;
    transition: opacity 0.15s;
}

.nova-back-btn:hover {
    opacity: 0.75;
}

#nova-footer {
    background: var(--nova-white);
    border-top: 1px solid var(--nova-border);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#nova-input {
    flex: 1;
    border: 1.5px solid var(--nova-border);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
    color: var(--nova-text);
    background: var(--nova-bg);
    transition: border-color 0.15s;
    resize: none;
    height: 40px;
    line-height: 1.4;
}

#nova-input::placeholder {
    color: #b0b7c0;
}

#nova-input:focus {
    border-color: var(--nova-primary);
    background: var(--nova-white);
}

#nova-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--nova-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, transform 0.1s;
    color: #1a1a1a;
}

#nova-send-btn:hover {
    background: var(--nova-primary-dark);
}

#nova-send-btn:active {
    transform: scale(0.94);
}

.nova-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: novaFadeIn 0.2s ease;
}

.nova-typing-dots {
    background: var(--nova-bubble-bot);
    border-radius: 18px 18px 18px 4px;
    padding: 10px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.nova-typing-dot {
    width: 6px;
    height: 6px;
    background: #d1d5db;
    border-radius: 50%;
    animation: novaTyping 1.2s infinite;
}

.nova-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.nova-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes novaFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

@keyframes novaTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
        background: #d1d5db;
    }

    30% {
        transform: translateY(-5px);
        background: var(--nova-primary);
    }
}

@media (max-width: 480px) {
    #nova-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 10px;
        left: 10px;
        border-radius: 16px;
    }

    #nova-bubble {
        bottom: 16px;
        right: 16px;
    }
}