@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #060913; 
    --bg-sidebar: #080c18;
    --panel-card: #0c1120;
    --border-light: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-muted: #8b98b0;
    
    --grad-orange: #f97316;
    --grad-pink: #ec4899;
    --grad-purple: #a855f7;
    --grad-blue: #3b82f6;
    --grad-cyan: #06b6d4;
}

html, body {
    height: 100%;
    width: 100vw;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

button, input, textarea {
    font: inherit;
    outline: none;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* APP CONTAINER */
.app-container {
    display: flex;
    height: 100%;
    width: 100%;
    background: 
        radial-gradient(circle at 50% 20%, rgba(236, 72, 153, 0.08) 0%, rgba(168, 85, 247, 0.05) 30%, transparent 60%),
        #060913;
    position: relative;
    overflow: hidden;
}

/* SIDEBAR DRAWER */
.sidebar {
    width: 290px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 100;
    flex-shrink: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-brand-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.sidebar-brand-text h3 {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
}

.sidebar-brand-text p {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

.close-sidebar-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 6px;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto; 
    overflow-x: visible !important; 
    padding: 16px;
    scrollbar-width: none;
}
.sidebar-content::-webkit-scrollbar { display: none; }

.new-chat-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 14px;
    color: #d8b4fe;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 16px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.new-chat-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
}

.history-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* SIDEBAR CHAT ITEM CARD DESIGN */
.history-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 16px;
    cursor: pointer;
    background: #0d1222;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 1;
}

.history-item.has-active-menu {
    z-index: 9999 !important;
}

.history-item:hover {
    background: #11182c;
    border-color: rgba(255, 255, 255, 0.08);
}

.history-item.active {
    background: #10162e;
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
}

.history-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c084fc;
    flex-shrink: 0;
}

.history-details-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.history-title-text {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item.active .history-title-text {
    color: #e9d5ff;
}

.history-time-tag {
    font-size: 10px;
    color: #64748b;
    flex-shrink: 0;
}

.history-sub-text {
    font-size: 11px;
    color: #8b98b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-menu-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 6px;
    opacity: 0.6;
    transition: all 0.15s ease;
}

.history-item:hover .chat-menu-btn { 
    opacity: 1; 
    color: #cbd5e1;
}

.chat-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* FLOATING ACTION POPUP MENU OVERLAY FIX */
.chat-action-menu {
    display: none;
    position: absolute;
    right: 10px;
    top: 100%;
    background: #0f1629;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    min-width: 130px;
    z-index: 100000 !important;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.9), 0 0 15px rgba(168, 85, 247, 0.15);
    overflow: hidden;
    padding: 5px;
    margin-top: 4px;
}

.chat-action-menu.active { 
    display: block; 
    animation: dropdownFadeUp 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-action-menu button { 
    width: 100%; 
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px; 
    background: none; 
    border: none; 
    color: #cbd5e1; 
    text-align: left; 
    font-size: 12px; 
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.chat-action-menu button:hover { 
    background: rgba(255, 255, 255, 0.08); 
    color: #ffffff; 
}

.chat-action-menu button svg {
    color: #94a3b8;
    transition: color 0.15s ease;
}

.chat-action-menu button:hover svg {
    color: #a855f7;
}

.chat-action-menu button.delete-option { 
    color: #f87171; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); 
    margin-top: 3px;
    padding-top: 8px;
}

.chat-action-menu button.delete-option:hover { 
    background: rgba(239, 68, 68, 0.12); 
    color: #ef4444; 
}

.chat-action-menu button.delete-option svg {
    color: #f87171;
}

.chat-action-menu button.delete-option:hover svg {
    color: #ef4444;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    background: #080c18;
    position: relative;
}

.loginBtn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    color: #fff;
    background: linear-gradient(135deg, var(--grad-purple), var(--grad-blue));
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    padding: 6px;
    border-radius: 12px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--grad-purple), var(--grad-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.user-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.userPill { font-weight: 600; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-rts-id { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.account-dropdown {
    position: absolute;
    bottom: 80px; left: 15px; width: 250px;
    background: #0c1120;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    display: none; flex-direction: column; z-index: 99999; overflow: hidden;
}

.account-dropdown.show { display: flex; }
.dropdown-header { display: flex; align-items: center; gap: 10px; padding: 14px; background: rgba(255, 255, 255, 0.02); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.dropdown-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--grad-purple), var(--grad-blue)); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.dropdown-user-details { display: flex; flex-direction: column; min-width: 0; }
.dropdown-name { font-size: 13px; font-weight: 600; color: #fff; }
.dropdown-rts { font-size: 10px; color: var(--text-muted); }
.dropdown-body { padding: 6px; }
.dropdown-body a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: #cbd5e1; text-decoration: none; font-size: 12.5px; border-radius: 8px; }
.dropdown-body a.logout-link { color: #f87171; border-top: 1px solid rgba(255, 255, 255, 0.04); margin-top: 4px; }

/* MAIN WORKSPACE */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    height: 100%;
    overflow: hidden;
}

/* MODERN GLASSMORPHIC 2-BAR HEADER */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(10, 15, 29, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 50;
    flex-shrink: 0;
}

.hamburger-btn.modern-bars {
    width: 38px;
    height: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    padding: 8px;
    transition: background 0.2s ease;
}

.hamburger-btn.modern-bars:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hamburger-btn.modern-bars .bar {
    display: block;
    height: 2px;
    background: #f1f5f9;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.hamburger-btn.modern-bars .top-bar { width: 20px; }
.hamburger-btn.modern-bars .bottom-bar { width: 13px; }

.new-chat-btn-mobile {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f5f9;
    transition: background 0.2s ease;
}

.new-chat-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-brand {
    font-weight: 800;
    font-size: 17.5px;
    letter-spacing: -0.2px;
}

/* SIDEBAR BACKDROP */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* CHAT WRAPPER */
.chat-wrapper {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 125px !important; 
    will-change: scroll-position;
}
.chat-wrapper::-webkit-scrollbar { display: none; }

.hero {
    width: 100%;
    max-width: 680px; 
    margin: auto 0; 
    text-align: center;
    padding: 20px 0;
}

.brandWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.logoImg {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.logoText {
    font-size: clamp(34px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
}

.yagya {
    background: linear-gradient(90deg, #f97316 0%, #ec4899 55%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tag-sub {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 24px;
    padding: 6px 20px;
    border-radius: 30px;
    background: rgba(12, 17, 32, 0.7);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

/* FEATURE CARDS */
.feature-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 840px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: var(--panel-card);
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

.card-ask::after { content: ''; position: absolute; right: 0; top: 12px; bottom: 12px; width: 3.5px; border-radius: 4px; background: linear-gradient(180deg, #8b5cf6, #3b82f6); }
.card-rooms::after { content: ''; position: absolute; right: 0; top: 12px; bottom: 12px; width: 3.5px; border-radius: 4px; background: linear-gradient(180deg, #f97316, #ef4444); }
.card-art::after { content: ''; position: absolute; right: 0; top: 12px; bottom: 12px; width: 3.5px; border-radius: 4px; background: linear-gradient(180deg, #06b6d4, #3b82f6); }

.feature-card:hover { transform: translateY(-3px); background: #10162a; }

.feature-icon-box { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.icon-purple { background: linear-gradient(135deg, #6366f1, #d946ef); }
.icon-orange { background: linear-gradient(135deg, #f97316, #ec4899); }
.icon-cyan { background: linear-gradient(135deg, #0284c7, #3b82f6); }

.feature-info h3 { font-size: 15px; font-weight: 700; color: #ffffff; margin-bottom: 4px; }
.feature-info p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.feature-arrow { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.4); }

/* CHAT MESSAGES */
#chat {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.msg-user-wrapper {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 78%;
    animation: msgFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.user-msg-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #11172e;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 10px 16px;
}

.user-msg-text { font-size: 14px; color: #ffffff; font-weight: 500; word-break: break-word; }
.user-avatar-circle { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.user-msg-meta { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 10px; color: #64748b; }

.msg-bot-wrapper { 
    align-self: flex-start; 
    width: 100%; 
    animation: msgFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes msgFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.typing { display: flex; gap: 6px; padding: 12px; }
.dot { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: blink 1.4s infinite both; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

/* BRANDING CARD */
.yagya-card-response {
    width: 100%;
    background: #080c18;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 22px;
    padding: 18px;
    position: relative;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), inset 0 0 20px rgba(168, 85, 247, 0.05);
}

.yagya-card-response::before {
    content: '';
    position: absolute;
    left: 0; top: 20px; bottom: 20px; width: 3px;
    background: linear-gradient(180deg, #f97316, #ec4899, #8b5cf6);
    border-radius: 0 4px 4px 0;
}

.bot-header-info { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.bot-avatar-mini { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5)); }
.bot-name-gradient { font-size: 14px; font-weight: 800; background: linear-gradient(90deg, #f97316, #ec4899, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.card-content-body { font-size: 14px; color: #cbd5e1; line-height: 1.6; word-break: break-word; }

/* CODE PANEL */
.code-panel-wrapper {
    position: relative;
    margin: 14px 0;
    border-radius: 12px;
    background: #0d111c !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.code-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-lang-tag {
    font-size: 11.5px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
}

.code-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.code-panel-wrapper pre {
    margin: 0 !important;
    padding: 14px 16px !important;
    background: transparent !important;
    overflow-x: auto !important;
    scrollbar-width: thin;
}

.code-panel-wrapper code {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: #f1f5f9 !important;
}

/* SQUIRCLE POINTS */
.points-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0;
}

.point-item-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 10px 14px;
}

.point-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    margin-top: 2px;
}

.point-icon-box.icon-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.point-icon-box.icon-blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.point-icon-box.icon-cyan { background: linear-gradient(135deg, #0284c7, #06b6d4); }
.point-icon-box.icon-green { background: linear-gradient(135deg, #059669, #10b981); }
.point-icon-box.icon-orange { background: linear-gradient(135deg, #ea580c, #f97316); }

.point-text-box { flex: 1; }
.point-title { font-size: 13px; font-weight: 700; color: #ffffff; margin-bottom: 2px; }
.point-desc { font-size: 11.5px; color: #8b98b0; line-height: 1.35; }

/* SINGLE-LINE SIMPLE RESPONSE */
.single-line-msg {
    padding: 6px 0;
}

.single-line-msg .bot-text {
    font-size: 14.5px;
    color: #ffffff;
    font-weight: 500;
}

/* IMAGE GENERATION LOADER */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.yagya-card-response.image-gen-card {
    position: relative;
    border: 1px solid transparent !important;
    background: linear-gradient(#080c18, #080c18) padding-box,
                conic-gradient(from var(--angle), #f97316, #ec4899, #a855f7, #3b82f6, #06b6d4, #f97316) border-box !important;
    animation: rotateCardBorder 3.5s linear infinite !important;
}

@keyframes rotateCardBorder {
    to { --angle: 360deg; }
}

.image-loading-hero-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.12), rgba(8, 12, 24, 0.8) 70%), #0c1120;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 24px 16px;
    margin: 12px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.flame-glow-icon {
    position: relative;
    width: 76px;
    height: 76px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flame-glow-icon::before {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: conic-gradient(from var(--angle), #f97316, #ec4899, #a855f7, #06b6d4, #f97316);
    filter: blur(18px);
    opacity: 0.85;
    animation: rotateCardBorder 2.5s linear infinite, fluidPulse 2s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes fluidPulse {
    0% { transform: scale(0.88); filter: blur(14px); }
    100% { transform: scale(1.15); filter: blur(22px); }
}

.flame-glow-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.8));
}

.loading-title { font-size: 15px; font-weight: 800; color: #ffffff; margin-bottom: 4px; }
.loading-sub { font-size: 12px; color: #8b98b0; margin-bottom: 16px; }

.progress-bar-wrap {
    width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    width: 72%;
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ec4899, #a855f7);
    border-radius: 10px;
    animation: fillAnimate 2s infinite ease-in-out alternate;
}

@keyframes fillAnimate {
    0% { width: 25%; }
    100% { width: 85%; }
}

/* GENERATED IMAGE CARD */
.generated-image-box {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin: 12px 0 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.generated-main-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.image-download-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(12, 17, 32, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.image-download-overlay:hover {
    background: rgba(168, 85, 247, 0.85);
    border-color: rgba(168, 85, 247, 0.4);
}

/* FOOTER ACTIONS */
.chat-msg-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.action-icons, .action-time-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.action-btn.active-like {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12);
}
.action-btn.active-like svg {
    fill: #38bdf8;
}

.action-btn.active-dislike {
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.12);
}
.action-btn.active-dislike svg {
    fill: #f87171;
}

.action-btn.copied {
    color: #10b981 !important;
}

/* AUDIO LOADING CIRCULAR SPINNER */
.tts-loader-ring {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(168, 85, 247, 0.25);
    border-top: 2px solid #a855f7;
    border-radius: 50%;
    animation: rotateSpinner 0.8s linear infinite;
    display: inline-block;
}

@keyframes rotateSpinner {
    100% { transform: rotate(360deg); }
}

.msg-timestamp {
    font-size: 10.5px;
    color: #64748b;
}

/* STAYBIX CARD */
.staybix-response-container {
    width: 100%;
    background: #080c18;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 22px;
    padding: 18px;
    position: relative;
}

.staybix-response-container::before {
    content: '';
    position: absolute;
    left: 0; top: 20px; bottom: 20px; width: 3px;
    background: linear-gradient(180deg, #f97316, #ec4899, #8b5cf6);
}

.staybix-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.staybix-room-card {
    display: flex;
    gap: 14px;
    background: #0c1122;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
}
.staybix-room-card:hover {
    background: #10162c;
    border-color: rgba(168, 85, 247, 0.35);
}

.room-card-media {
    position: relative;
    width: 130px;
    height: 110px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}
.room-card-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    border-radius: 12px !important;
}

.room-card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.room-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.room-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.verified-badge {
    background: rgba(139, 92, 246, 0.25);
    border: 1px solid rgba(139, 92, 246, 0.45);
    color: #c084fc;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}

.room-type { font-size: 11px; color: #94a3b8; }
.room-location { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #cbd5e1; }
.room-footer-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 4px; }
.room-price { font-size: 13.5px; font-weight: 800; color: #38bdf8; }
.room-price span { font-size: 10px; color: #64748b; }

.view-details-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border: none;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

/* COMPOSER CONTAINER (CENTERED & SQUISH-FREE) */
.composer-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px 16px;
    background: linear-gradient(transparent, var(--bg-main) 50%);
    z-index: 20;
    transition: transform 0.15s ease-out;
}

.searchBox {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #080c17;
    border: 1.5px solid transparent;
    background-image: linear-gradient(#080c17, #080c17), linear-gradient(135deg, var(--grad-orange), var(--grad-pink), var(--grad-purple));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 28px;
    padding: 6px 8px 6px 12px;
}

.searchBox textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14.5px;
    line-height: 20px;
    padding: 4px 4px;
    resize: none;
    max-height: 140px;
    min-height: 20px;
    height: 20px;
    overflow-y: auto;
    scrollbar-width: none;
    display: block;
}
.searchBox textarea::-webkit-scrollbar { display: none; }
.searchBox textarea::placeholder { color: #4b5563; }

.micBtn, .attachBtn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #a0aec0;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.micBtn.active {
    background: rgba(236, 72, 153, 0.25);
    color: #ec4899;
}

/* DYNAMIC SEND / STOP BUTTON */
.sendBtn { 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border: none; 
    background: linear-gradient(135deg, #d946ef 0%, #ec4899 50%, #f43f5e 100%); 
    color: #fff; 
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sendBtn .stop-icon { display: none; }

.sendBtn.is-generating {
    background: #ef4444 !important;
}
.sendBtn.is-generating .send-icon { display: none; }
.sendBtn.is-generating .stop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.stop-square {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 2.5px;
}

.footer { text-align: center; padding-top: 6px; }
.powered { font-size: 11px; color: #8b98b0; }
.staybix { color: #d946ef; text-decoration: none; font-weight: 700; }

@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@keyframes dropdownFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* LIGHTWEIGHT MOBILE RESPONSIVE OPTIMIZATION */
@media (max-width: 768px) {
    .mobile-header { display: flex; }
    
    .sidebar {
        position: fixed;
        top: 0; left: 0; height: 100%;
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0,0,0,.6);
        z-index: 1000;
        will-change: transform;
    }
    .sidebar.active { transform: translateX(0); }
    .close-sidebar-btn { display: block; }

    .feature-cards-container {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .feature-card {
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
    }

    .feature-arrow { position: relative; top: auto; right: auto; }
    .composer-container { max-width: 100%; padding: 0 10px 10px; }

    .app-container, .staybix-response-container, .sidebar, .user-msg-bubble {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* MODALS & POPUPS */
.custom-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.custom-modal.open { opacity: 1; pointer-events: auto; }
.modal-overlay { position: absolute; width: 100%; height: 100%; background: rgba(4, 7, 12, 0.7); }
.modal-content { position: relative; background: #0f1523; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; width: 90%; max-width: 420px; padding: 24px; z-index: 10; }
.modal-content h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.modal-content p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.modal-content input[type="text"] { width: 100%; padding: 12px 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-light); border-radius: 12px; color: #fff; font-size: 14px; margin-bottom: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
.modal-btn { padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; border: none; }
.cancel-btn { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); border: 1px solid var(--border-light); }
.blue-btn { background: var(--grad-blue); color: #fff; }
.red-btn { background: #ef4444; color: #fff; }

.imageModal { position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; }
.imageModal.show { display: flex; }
.imageModalBg { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.imageModalBox { position: relative; max-width: 90vw; max-height: 90vh; z-index: 2; }
.imageModalBox img { max-width: 90vw; max-height: 90vh; border-radius: 18px; display: block; }
.closeImageBtn { position: absolute; top: -15px; right: -15px; width: 42px; height: 42px; border: none; border-radius: 50%; background: #111827; color: #fff; font-size: 18px; cursor: pointer; }

.login-popup { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; justify-content: center; align-items: center; z-index: 99999; }
.login-popup-box { width: 90%; max-width: 420px; background: #111827; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 28px; text-align: center; }
.login-popup-box img { width: 70px; margin-bottom: 15px; }
.login-popup-box h2 { color: #fff; margin-bottom: 10px; }
.login-popup-box p { color: #b8bcc8; line-height: 1.6; }
.popup-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.popup-login-btn { background: #2563eb; color: #fff; padding: 14px; border-radius: 12px; text-decoration: none; font-weight: 600; }
.popup-skip-btn { background: transparent; border: 1px solid rgba(255,255,255,.15); color: #fff; padding: 14px; border-radius: 12px; cursor: pointer; }