/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    font-family: 'Inter', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* ============================================================
   HOME BACKGROUND LAYER
============================================================ */
#bgLayer {
    position: fixed;
    inset: 0;
    z-index: -20;
    overflow: hidden;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.03);
    filter: brightness(0.78) saturate(1.2);
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,10,35,0.45);
}

.bg-soft-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 40% 30%, rgba(0,124,255,0.25), transparent 60%);
    mix-blend-mode: screen;
    animation: softGlow 12s ease-in-out infinite;
}

@keyframes softGlow {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
    100% { opacity: 0.4; transform: scale(1); }
}

/* ============================================================
   CHAT BACKGROUND (STATIC IMAGE ONLY)
============================================================ */
#chatScreen::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("waves-blur.jpg") center/cover no-repeat;
    filter: blur(26px) brightness(0.75);
    z-index: -1;
}

/* ============================================================
   CHAT SCREEN
============================================================ */
#chatScreen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;

    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.45s ease, transform 0.45s ease;

    backdrop-filter: blur(32px) saturate(1.3);
    background: rgba(0,0,0,0.35);

    pointer-events: none;
    z-index: 999999;
}

#chatScreen.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================================
   HEADER
============================================================ */
.chat-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.35);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chat-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(90deg,#9d4bff,#00eaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   MESSAGE AREA
============================================================ */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-msg .bubble {
    background: #008cff;
    color: #fff;
}

.ai-msg .bubble {
    background: rgba(20,25,50,0.75);
    color: #dff6ff;
}

.bubble {
    padding: 14px 18px;
    border-radius: 16px;
    max-width: 92%;
    word-break: break-word;
}

/* ============================================================
   INPUT BAR
============================================================ */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: rgba(0,0,0,0.45);
    border-top: 1px solid rgba(255,255,255,0.12);
}
/* ============================================================
   CHAT BUBBLE ANIMATION (FADE)
============================================================ */
@keyframes bubbleFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bubble,
.typing-holder {
    animation: bubbleFade 0.35s ease forwards;
}

/* ============================================================
   MODE PILL / BUTTON THEMES
============================================================ */
:root {
    --theme-glow: #9d4bff;
}

.mode-pill {
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.35);
    border: 2px solid var(--theme-glow);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-glow);
}

#sendBtn {
    background: var(--theme-glow);
    box-shadow: 0 0 12px var(--theme-glow);
}

/* ============================================================
   BACK / CLEAR BUTTON STYLES
============================================================ */
.back-btn,
.clear-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px 14px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.back-btn:active,
.clear-btn:active {
    transform: scale(0.9);
}
