/*  Index of Movies — MovieBot AI Styles v2.0  */

/* ── CONTAINER ────────────────────────────────── */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* ── TOGGLE BUTTON ────────────────────────────── */
.chatbot-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 22px;
    position: relative;
    border: none;
}
.chatbot-toggle:hover {
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.7);
}
.bot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(244,63,94,.5);
}

/* ── WINDOW ───────────────────────────────────── */
.chatbot-window {
    position: absolute;
    bottom: 78px;
    right: 0;
    width: 390px;
    height: 540px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(10, 18, 35, 0.95) !important;
    backdrop-filter: blur(30px) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(56,189,248,.1) !important;
    animation: botSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes botSlideIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── HEADER ───────────────────────────────────── */
.chatbot-header {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.bot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

/* ── BODY ─────────────────────────────────────── */
.chatbot-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56,189,248,.2) transparent;
}
.chatbot-body::-webkit-scrollbar { width: 4px; }
.chatbot-body::-webkit-scrollbar-thumb { background: rgba(56,189,248,.2); border-radius: 4px; }

/* ── MESSAGES ─────────────────────────────────── */
.chat-message {
    padding: 11px 15px;
    border-radius: 18px;
    max-width: 88%;
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-word;
}
.message-bot {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.9);
    color: rgba(255,255,255,.92);
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255,255,255,.06);
}
.message-bot a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 700;
    transition: opacity .2s;
}
.message-bot a:hover { opacity: .75; text-decoration: underline; }
.message-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    border-bottom-right-radius: 5px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14,165,233,.3);
}

/* ── QUICK CHIPS ──────────────────────────────── */
.chatbot-chips {
    padding: 8px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    background: rgba(15,23,42,.7);
    border-top: 1px solid rgba(255,255,255,.05);
    flex-shrink: 0;
}
.bot-chip {
    padding: 5px 13px;
    border-radius: 50px;
    border: 1px solid rgba(56,189,248,.25);
    background: rgba(56,189,248,.07);
    color: #38bdf8;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}
.bot-chip:hover {
    background: rgba(56,189,248,.18);
    border-color: rgba(56,189,248,.5);
    transform: translateY(-1px);
}

/* ── INPUT AREA ───────────────────────────────── */
.chatbot-input-area {
    padding: 12px 14px;
    background: rgba(15,23,42,.9);
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.chatbot-input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50px;
    padding: 10px 18px;
    color: white;
    outline: none;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: border-color .2s;
}
.chatbot-input:focus { border-color: rgba(56,189,248,.4); }
.chatbot-input::placeholder { color: rgba(255,255,255,.3); }

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(14,165,233,.3);
}
.chatbot-send:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(14,165,233,.5); }

/* ── TYPING DOTS ──────────────────────────────── */
.typing { display: flex; align-items: center; gap: 5px; padding: 12px 15px; }
.dot {
    width: 7px; height: 7px;
    background: #38bdf8;
    border-radius: 50%;
    animation: botBounce 1.4s infinite ease-in-out both;
    opacity: 0.7;
}
.dot:nth-child(1) { animation-delay: -.32s; }
.dot:nth-child(2) { animation-delay: -.16s; }
@keyframes botBounce {
    0%, 80%, 100% { transform: scale(0); }
    40%           { transform: scale(1); }
}

/* ── MOBILE ───────────────────────────────────── */
@media (max-width: 768px) {
    .chatbot-container { bottom: 20px; right: 20px; }
    .chatbot-window { width: 340px; height: 500px; }
    .chatbot-toggle { width: 56px; height: 56px; font-size: 20px; }
}

@media (max-width: 480px) {
    .chatbot-container { bottom: 16px; right: 12px; }
    .chatbot-window { width: calc(100vw - 24px); right: -2px; height: 480px; }
    .chatbot-toggle { width: 52px; height: 52px; font-size: 18px; }
    .bot-chip { font-size: 0.72rem; padding: 4px 11px; }
    .chat-message { font-size: 0.82rem; max-width: 92%; }
    .chatbot-header { padding: 12px 16px; }
    .bot-avatar { width: 32px; height: 32px; font-size: 14px; }
}

@media (max-width: 360px) {
    .chatbot-container { bottom: 12px; right: 10px; }
    .chatbot-window { height: 440px; }
    .chatbot-toggle { width: 48px; height: 48px; font-size: 16px; }
}
