.gitemania-chatbot-root {
    --gcb-accent: #e50914;
    --gcb-dark: #111827;
    --gcb-soft: #fff7f7;
    --gcb-border: rgba(17, 24, 39, .12);
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--gcb-dark);
}

.gcb-launcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px 10px 10px;
    background: linear-gradient(135deg, var(--gcb-accent), #b9000a);
    color: #fff;
    box-shadow: 0 18px 36px rgba(229, 9, 20, .34), 0 6px 16px rgba(17, 24, 39, .18);
    cursor: pointer;
    overflow: hidden;
    transform: translateZ(0);
    transition: transform .22s ease, box-shadow .22s ease;
}

.gcb-launcher:hover,
.gitemania-chatbot-root.is-peeking .gcb-launcher {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 22px 44px rgba(229, 9, 20, .42), 0 10px 22px rgba(17, 24, 39, .22);
}

.gcb-launcher-glow {
    position: absolute;
    inset: -80% auto auto -40%;
    width: 120px;
    height: 180px;
    background: rgba(255, 255, 255, .22);
    animation: gcb-shine 4.6s ease-in-out infinite;
}

.gcb-launcher-mark,
.gcb-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    color: var(--gcb-accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}

.gcb-launcher-text {
    position: relative;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.gcb-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 380px;
    max-width: calc(100vw - 28px);
    height: 620px;
    max-height: calc(100vh - 110px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--gcb-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(17, 24, 39, .22);
    transform-origin: bottom right;
    animation: gcb-panel-in .24s ease both;
}

.gcb-panel[hidden] {
    display: none !important;
}

.gcb-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255,255,255,.32), transparent 30%),
        linear-gradient(135deg, var(--gcb-accent), #b9000a);
    color: #fff;
}

.gcb-header strong {
    display: block;
    line-height: 1.15;
    font-size: 16px;
}

.gcb-header span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    opacity: .88;
}

.gcb-close {
    margin-left: auto;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.gcb-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(255,247,247,.9), rgba(255,255,255,.9)),
        repeating-linear-gradient(135deg, rgba(229,9,20,.04), rgba(229,9,20,.04) 1px, transparent 1px, transparent 14px);
}

.gcb-message {
    display: flex;
    margin: 0 0 10px;
    animation: gcb-message-in .18s ease both;
}

.gcb-user {
    justify-content: flex-end;
}

.gcb-bubble {
    max-width: 82%;
    border-radius: 15px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.42;
    box-shadow: 0 3px 10px rgba(17, 24, 39, .07);
}

.gcb-bot .gcb-bubble {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, .08);
    border-top-left-radius: 5px;
}

.gcb-user .gcb-bubble {
    background: var(--gcb-accent);
    color: #fff;
    border-top-right-radius: 5px;
}

.gcb-typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    min-width: 48px;
}

.gcb-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gcb-accent);
    opacity: .42;
    animation: gcb-dot 1s infinite ease-in-out;
}

.gcb-typing span:nth-child(2) { animation-delay: .15s; }
.gcb-typing span:nth-child(3) { animation-delay: .3s; }

.gcb-card {
    margin: 10px 0 12px 0;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, .1);
    box-shadow: 0 8px 20px rgba(17, 24, 39, .08);
    animation: gcb-message-in .18s ease both;
}

.gcb-card-title {
    display: block;
    font-size: 13px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.gcb-card dl {
    margin: 0;
}

.gcb-card dl div {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
    padding: 7px 0;
    border-top: 1px solid rgba(17, 24, 39, .07);
}

.gcb-card dt {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #6b7280;
}

.gcb-card dd {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.gcb-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.gcb-card-button,
.gcb-handoff a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 8px;
    padding: 0 12px;
    background: var(--gcb-dark);
    color: #fff !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.gcb-handoff {
    margin: 10px 0;
}

.gcb-handoff a {
    width: 100%;
    background: #0866ff;
}

.gcb-quick {
    display: flex;
    gap: 7px;
    padding: 10px 12px;
    overflow-x: auto;
    background: #fff;
    border-top: 1px solid rgba(17, 24, 39, .08);
}

.gcb-chip {
    flex: 0 0 auto;
    min-height: 34px;
    border: 1px solid rgba(229, 9, 20, .22);
    border-radius: 999px;
    background: #fff;
    color: var(--gcb-accent);
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.gcb-chip:hover {
    background: var(--gcb-accent);
    color: #fff;
    transform: translateY(-1px);
}

.gcb-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid rgba(17, 24, 39, .08);
}

.gcb-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    border: 1px solid rgba(17, 24, 39, .16);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}

.gcb-input:focus {
    border-color: var(--gcb-accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, .12);
}

.gcb-send {
    height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    background: var(--gcb-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

@keyframes gcb-panel-in {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gcb-message-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gcb-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes gcb-shine {
    0%, 55% { transform: rotate(24deg) translateX(-150%); opacity: 0; }
    68% { opacity: 1; transform: rotate(24deg) translateX(-20%); }
    100% { transform: rotate(24deg) translateX(150%); opacity: 0; }
}

@media (max-width: 600px) {
    .gitemania-chatbot-root {
        right: 14px;
        bottom: 14px;
    }

    .gcb-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 84px;
        width: auto;
        height: min(620px, calc(100vh - 104px));
        max-width: none;
    }

    .gcb-launcher-text {
        max-width: 118px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gcb-launcher-glow,
    .gcb-typing span,
    .gcb-panel,
    .gcb-message,
    .gcb-card {
        animation: none !important;
    }
}