/* 🎨 Main Design System (Root Variables) */
:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* 🖱️ SCROLL TO BOTTOM BUTTON */
.scroll-bottom-btn {
    position: absolute; /* Thay đổi sang absolute để căn theo cha */
    bottom: 150px; 
    left: 50%;    
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-color); 
    color: #ffffff;                  
    border: none;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35); 
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 998;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%) translateY(20px) scale(0.8); 
    opacity: 0;
}

.scroll-bottom-btn.show {
    display: flex;
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
}

.scroll-bottom-btn:hover {
    background: var(--primary-hover);
    transform: translateX(-50%) translateY(-3px) scale(1.1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.45);
}

.scroll-bottom-btn i {
    font-size: 22px;
}

@media (max-width: 768px) {
    .scroll-bottom-btn {
        bottom: 110px;
        left: 50%;
        width: 38px;
        height: 38px;
    }
}

/* GLOBAL */

html, body {
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f8fafc;
  font-family: system-ui, -apple-system, Segoe UI, Roboto;
}

.main-app-wrapper {
  width: 100%;
  height: 100vh; /* Fallback */
  height: 100dvh;
  height: var(--app-height, 100dvh);
  display: flex;
  overflow: hidden;
}


/* CUSTOM SCROLLBAR - Minimalist & Subtle */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* LOGIN BOX */
#loginBox {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.auth-card {
  width: 360px;
  background: #fff;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.auth-title { font-size: 26px; font-weight: 700; text-align: center; margin-bottom: 20px; }
#loginMsg, #registerMsg { font-size: 14px; min-height: 18px; }

/* CHAT APP LAYOUT - PREMIUM REDESIGN */
#chatApp {
  display: none;
  width: 100%;
  height: 100vh;
  background: #fdfdff;
}
.sidebar {
  width: 290px;
  background: #ffffff;
  flex-shrink: 0;
  border-right: 1px solid #f1f5f9;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); width: 85%; }
  .sidebar.open { transform: translateX(0); box-shadow: 20px 0 60px rgba(0,0,0,0.15); }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); z-index: 999; backdrop-filter: blur(4px); }
  .sidebar.open + .sidebar-overlay { display: block; }
}

.sidebar-title {
  font-size: 14px;
  text-transform: none;
  font-weight: 750;
  color: #334155;
  padding: 20px 20px 8px;
}

.chat-history-item {
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  transition: all 0.2s ease;
  border-radius: 10px;
  margin: 2px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
.chat-history-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.chat-history-item.active {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 600;
}

.chat-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.history-action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  transition: all 0.2s;
  padding: 0;
  opacity: 0;
}

.chat-history-item:hover .history-action-btn {
  opacity: 0.7;
}

.history-action-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
  opacity: 1 !important;
}

.history-action-btn:active {
  transform: scale(0.9);
}

.dropdown-menu {
  border: 1px solid #f1f5f9;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 6px;
  min-width: 140px;
}

.dropdown-item {
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.dropdown-item.text-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}



.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 8px;
}
.new-chat-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}
.new-chat-wrapper:hover {
    background: #f1f5f9;
}
.new-chat-wrapper i { font-size: 16px; }

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* 🛡️ v11.0 Premium Utilities & Profile */
.sidebar-utils {
    padding: 0 12px 15px;
}
.util-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    margin-bottom: 2px;
    background: transparent;
    border: none;
}
.util-item:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: none;
    box-shadow: none;
}
.util-item i { font-size: 15px; width: 18px; text-align: center; }



.util-item[id="toggleHandMode"]:hover { border-color: #2b7cff; color: #2b7cff; }
.util-item[id="toggleNarutoMode"]:hover { border-color: #f97316; color: #f97316; }

/* 💎 Modern Corner Message Actions (ChatGPT Style) */

.assistant-corner-actions {
    position: absolute;
    bottom: 6px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    background: transparent;
    z-index: 10;
}
.bubble:hover .assistant-corner-actions {
    opacity: 1;
}
.corner-action-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.corner-action-btn:hover {
    background: #f1f5f9;
    color: #475569;
}
.corner-action-btn i { font-size: 14px; }

/* 🏠 Enhanced Chat Layout Width */
#chat {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.bot .bubble {
    max-width: 88%;
    width: fit-content;
    padding-bottom: 35px !important; /* Room for corner actions */
    position: relative;
    border-radius: 18px;
    min-width: 60px;
    background: #ffffff;
}

.me .bubble {
    max-width: 85%;
    background: var(--primary-color);
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
    margin-left: auto; /* Push to the right */
}


/* 📐 Professional Math & Markdown Rendering */
.message-content {
    line-height: 1.7;
    font-size: 14.5px;
    word-wrap: break-word;
    color: inherit;
}

.message-content p {
    margin-bottom: 0.8em;
    margin-top: 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* MathJax Specific Tweaks */
mjx-container {
    display: inline-block !important;
    margin: 0 2px !important;
    vertical-align: middle;
    max-width: 100%;
    outline: none;
}

mjx-container[display="true"] {
    display: block !important;
    margin: 1.5em auto !important;
    text-align: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 0;
}


/* Ensure math labels don't get squashed */
.bubble {
    word-break: break-word;
}

.topbar, .composer-inner, #attachments {
    max-width: 1200px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* 💻 Code Block Styles - Absolute Visibility */
pre {
  position: relative !important;
  margin: 15px 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important; 
  background: #0b1020 !important;
}

pre code {
  display: block !important;
  border-radius: 12px !important;
  padding: 1.5em !important;
  padding-top: 3em !important; 
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important; /* Ensure full length shows */
  min-height: 50px !important;
  width: 100% !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
}

.copy-code-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(4px);
}
.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}



.copy-code-btn i { font-size: 12px; }

/* 👤 User Message Copy Button */
.copy-btn-msg {
    position: absolute;
    bottom: -10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    opacity: 0;
}
.bubble:hover .copy-btn-msg {
    opacity: 1;
}
.copy-btn-msg:hover {
    color: #2b7cff;
    border-color: #2b7cff;
    transform: scale(1.1);
}



.topbar {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f1f5f9;
  position: sticky; top: 0; z-index: 10;
}
.brand-text {
  font-size: 16px;
  font-weight: 650;
  color: #1e293b;
  letter-spacing: -0.2px;
}

#chat { overflow: auto; }

/* COMPONENTS & UI */
.user-info { display: flex; align-items: center; gap: 10px; cursor: pointer; max-width: 220px; padding: 5px 10px; border-radius: 20px; transition: background 0.2s; }
.avatar { width: 35px !important; height: 35px !important; border-radius: 50% !important; object-fit: cover !important; }
#msg { border-radius: 24px; padding: 10px 20px; background: #f1f5f9; border: 1px solid transparent; transition: all 0.2s; }
.send-btn { 
    width: 32px; 
    height: 32px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-left: 8px; 
    background: #1e293b; 
    border: none;
    color: #fff;
    transition: all 0.2s;
}
.send-btn:hover {
    background: #000;
}
.send-btn i { font-size: 14px; }


/* MODALS */
.profile-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.profile-card { background: #fff; width: 380px; padding: 30px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.avatar-preview { width: 80px; height: 80px; background: #2b7cff; color: #fff; font-size: 32px; font-weight: bold; display: flex; align-items: center; justify-content: center; border-radius: 50%; margin: 0 auto; object-fit: cover; }

/* FACEID */
@keyframes scanAnim { 0% { top: 0%; } 100% { top: 100%; } }
.btn-danger { border-radius: 12px; color: #fff; border: none; font-weight: 600; cursor: pointer; transition: .3s; }

/* HAND & NARUTO FX */
#hand-cursor { box-shadow: 0 0 15px rgba(255, 0, 255, 0.5); background: rgba(255, 0, 255, 0.1); }
#toggleHandMode.active { background: #2b7cff !important; color: #fff !important; }
#toggleNarutoMode.naruto-active { background: #f97316 !important; color: #fff !important; }

@keyframes shuriken-fly {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); opacity:1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(1440deg) scale(0.3); opacity:0; }
}

/* 💎 Premium Menu Items & Footer */
.sidebar-footer {
    padding: 20px 14px;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
}
.logout-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}
.logout-wrapper:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.logout-wrapper svg {
    color: #94a3b8;
}
.logout-wrapper:hover svg {
    color: #ef4444;
}


.user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    z-index: 1000;
}
.menu-item-premium {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 2px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.menu-item-premium:hover {
    background: #f8fafc;
    color: #0f172a;
}
.menu-item-premium.text-danger {
    color: #ef4444;
}
.menu-item-premium.text-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}
.menu-item-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 8px;
}
.menu-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}


@keyframes boom-anim { 0% { transform: scale(0.5); opacity:1; } 100% { transform: scale(2.5); opacity:0; } }
/* 🔘 Lightweight Icon Controls (ChatGPT Style) */
.icon-toggle-btn, .action-icon-btn {
    background: transparent;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}
.icon-toggle-btn:hover, .action-icon-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}
.icon-toggle-btn:active, .action-icon-btn:active {
    transform: scale(0.95);
}

#openSidebarBtn {
    opacity: 0;
    visibility: hidden;
    width: 0;
    padding: 0;
    overflow: hidden;
    display: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* HIỆN NÚT KHI SIDEBAR ĐÃ ĐÓNG (TRÊN PC) */
.sidebar-collapsed #openSidebarBtn {
    opacity: 1;
    visibility: visible;
    width: 40px;
    height: 40px;
    display: flex !important; /* Ép hiển thị */
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    color: var(--primary-color);
    margin-right: 12px;
}

.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed {
    width: 0 !important;
    border: none !important;
}

/* 🖼️ Premium Image Card Styles */
.image-bubble-premium {
    padding: 10px !important;
    max-width: 88%;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.image-wrapper-premium {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}
.image-wrapper-premium img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}
.image-wrapper-premium:hover img {
    transform: scale(1.02);
}
.image-download-btn-premium {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.image-wrapper-premium:hover .image-download-btn-premium {
    opacity: 1;
    transform: translateY(0);
}
.image-download-btn-premium:hover {
    background: #fff;
    color: #2b7cff;
    transform: scale(1.1) !important;
}
.image-caption-premium {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

/* 📸 Image Preview Modal (Lightbox) */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 10000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}
.preview-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation: zoom-in 0.3s ease;
    cursor: default;
}
@keyframes zoom-in {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.close-preview {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}
.close-preview:hover {
    color: #bbb;
    transform: scale(1.1);
}
@media only screen and (max-width: 700px){
    .preview-content { width: 95%; }
}

/* 📱 Mobile Responsive Professional Fixes */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        z-index: 10000 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-right: 1px solid #e2e8f0;
    }
    .sidebar.open {
        left: 0 !important;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        z-index: 9999;
    }
    .sidebar.open + .sidebar-overlay {
        display: block !important;
    }
    
    #openSidebarBtn {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 34px !important;
        padding: 8px !important;
        overflow: visible !important;
        margin-right: 8px;
    }


    
    .topbar {
        padding: 10px 14px;
    }
    .topbar .brand-text {
        font-size: 16px;
    }
    
    #chat {
        padding: 12px !important;
    }
}

/* Desktop Defaults */
@media (min-width: 769px) {
    #openSidebarBtn {
        display: none !important; /* Ẩn trên desktop vì sidebar thường mở */
    }
    .sidebar-overlay {
        display: none !important;
    }
}

/* 💎 Premium Menu & Icons styling */
.profile-menu-premium {
    padding: 8px;
    border-radius: 16px !important;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--shadow-md) !important;
}

.profile-menu-premium .dropdown-item {
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--text-main);
}

.profile-menu-premium .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
    color: var(--primary-color);
}

.profile-menu-premium .dropdown-item i {
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.text-purp {
    color: #8b5cf6 !important; /* Premium Purple for Thinking */
}

/* Fix for mobile keyboard push-up */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        bottom: 70px !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
    }
}

/* 🎬 Cinematic Video Output Styling */
.video-bubble-premium {
    padding: 12px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #f1f5f9 !important;
    max-width: 90% !important;
    margin-bottom: 20px;
    animation: slideUpFade 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.video-container-premium {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
}

.video-player-premium {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.video-actions-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px;
}

.status-badge-premium {
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.download-btn-premium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.download-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.download-btn-premium:active {
    transform: translateY(0);
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .video-bubble-premium {
        max-width: 100% !important;
    }
}

/* 🌀 Video Processing Card Styling */
.video-processing-card {
    background: #ffffff !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.08) !important;
    min-width: 280px;
}

.processing-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    animation: rotateGlow 4s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.video-processing-card .progress-bar {
    background-color: var(--primary-color) !important;
}

/* 🎵 AI MUSIC CARD STYLES */
.music-card {
    padding: 16px !important;
    background: #ffffff !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    max-width: 400px !important;
}

.music-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #ef4444;
    font-weight: 700;
    font-size: 15px;
}

.music-header i {
    font-size: 18px;
}

.music-prompt {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.4;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.music-card audio {
    height: 36px;
    border-radius: 10px;
}

.music-footer {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.music-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s;
}

.music-action-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.music-action-btn:active {
    transform: translateY(0);
}

.music-action-btn i {
    font-size: 14px;
}

@media (max-width: 768px) {
    .music-card {
        max-width: 100% !important;
        margin: 0 5px;
    }
}

/* 🎨 PROFESSIONAL MODE LOGO CSS */
.mode-logo-css {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 900;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    user-select: none;
}

.mode-logo-css.fast {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.mode-logo-css.thinking {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.badge .mode-logo-css {
    width: 16px;
    height: 16px;
    font-size: 9px;
    margin-right: 6px;
}
