/* =========================================================================
   VNSHOW-CHAT — MINIMALIST DARK THEME & INLINE ACTION LIST CARDS
   ========================================================================= */
:root {
  --bg-primary: #171717;
  --bg-secondary: #212121;
  --bg-tertiary: #2f2f2f;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text-main: #ececec;
  --text-muted: #b4b4b4;
  --text-faint: #737373;
  --accent-gold: #fde047;
  --accent-pink: #fe2c55;
  --accent-blue: #38bdf8;
  --accent-tele: #0ea5e9;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* TOP HEADER (MINIMALIST DARK) */
.chat-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(23, 23, 23, 0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.icon-btn:hover {
  background: var(--bg-tertiary);
  color: #fff;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.logo-title {
  font-size: 16px;
  font-weight: 600;
  color: #ececec;
  letter-spacing: -0.2px;
}

/* WHITE PILL AUTH BUTTON */
.auth-btn-pill {
  background: #ffffff;
  color: #000000;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.auth-btn-pill:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* SIDEBAR HOSTESS & WALLET SECTIONS */
.sidebar-section {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-hostess-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.sidebar-hostess-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  width: 100%;
}
.sidebar-hostess-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.sidebar-hostess-btn .sh-info strong {
  display: block;
  font-size: 13px;
  color: #fff;
}
.sidebar-hostess-btn .sh-info span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}
.sidebar-hostess-btn:hover {
  background: var(--bg-secondary);
}
.sidebar-hostess-btn.active {
  background: var(--bg-tertiary);
  border-color: var(--accent-pink);
}

.sidebar-wallet-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.wallet-balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wallet-balance-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
}
.wallet-vnc-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.btn-wallet-action {
  background: var(--accent-gold);
  color: #000;
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn-wallet-action:hover {
  opacity: 0.85;
}

.input-actions-right {
  display: flex;
  align-items: center;
  gap: 4px;
}
.input-voice-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.15s ease;
}
.input-voice-btn:hover {
  background: var(--bg-tertiary);
  color: #fff;
}
.fn-link {
  color: #9ca3af;
  text-decoration: underline;
}
.fn-link:hover {
  color: #fff;
}

/* MAIN CHAT AREA */
.chat-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 16px 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  scroll-behavior: smooth;
}

/* MINIMALIST LANDING HERO */
.landing-hero-center {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 20px 10px;
  animation: fadeIn 0.3s ease-out;
  user-select: none;
}
.landing-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.landing-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.landing-pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}
.landing-pill-btn:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}
.landing-pill-btn:active {
  transform: scale(0.98);
}

.chat-messages {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* CHAT BUBBLES */
.chat-row {
  display: flex;
  gap: 12px;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}
.chat-row.user {
  justify-content: flex-end;
}
.chat-row.ai {
  justify-content: flex-start;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid var(--border-subtle);
}

.chat-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 88%;
}

.user-bubble {
  background: var(--bg-tertiary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  border-top-right-radius: 4px;
  font-size: 14.5px;
  line-height: 1.5;
  word-break: break-word;
}

.ai-bubble {
  color: var(--text-main);
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
}
.ai-sender-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* INLINED ACTION LIST CARD (MATCHING USER SCREENSHOT) */
.action-list-card {
  background: #000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 10px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.action-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-size: 14px;
  font-weight: 500;
  gap: 12px;
}
.action-item-btn:last-child {
  border-bottom: none;
}
.action-item-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}
.action-item-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.action-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.action-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}
.action-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.35;
}
.action-arrow {
  color: var(--text-faint);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease;
}
.action-item-btn:hover .action-arrow {
  color: #fff;
  transform: translateX(3px);
}

.ai-action-footnote {
  margin-top: 10px;
  font-size: 13.5px;
  color: #d1d5db;
  line-height: 1.45;
  animation: fadeIn 0.3s ease;
}

/* PARSED VIDEO PREVIEW CARD */
.video-preview-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 10px 0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}
.video-preview-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.video-preview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play-overlay-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease;
}
.video-preview-thumb-wrap:hover .video-play-overlay-icon {
  background: rgba(0, 0, 0, 0.15);
}
.video-play-overlay-icon svg {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.8));
}
.video-duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.video-platform-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(254, 44, 85, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-preview-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.video-preview-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}
.video-preview-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* MATCHED VIDEOS HORIZONTAL SCROLL */
.matched-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.matched-video-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.matched-video-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-pink);
}
.matched-video-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.matched-video-details {
  padding: 8px 10px;
}
.matched-video-details strong {
  display: block;
  font-size: 12.5px;
  color: #fff;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.matched-video-details span {
  font-size: 11px;
  color: var(--text-muted);
}

/* BOTTOM INPUT DOCK */
.chat-input-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--bg-primary) 70%, transparent);
  padding: 8px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 40;
}

.input-card {
  width: 100%;
  max-width: 760px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: border-color 0.2s ease;
}
.input-card:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
}

.input-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.input-tool-btn:hover {
  background: var(--bg-tertiary);
  color: #fff;
}

#chat-input-text {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  padding: 4px 0;
}
#chat-input-text::placeholder {
  color: var(--text-faint);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.send-btn:active {
  transform: scale(0.95);
}
.send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.input-footnote {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

/* SIDEBAR DRAWER */
.sidebar-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-subtle);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 16px;
  box-shadow: 20px 0 50px rgba(0,0,0,0.7);
  animation: slideDrawer 0.25s ease-out;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex: 1;
  margin-right: 8px;
  transition: background 0.15s ease;
}
.new-chat-btn:hover {
  background: var(--bg-tertiary);
}

.sidebar-sec-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.sidebar-history {
  flex: 1;
  overflow-y: auto;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-item-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}
.history-item-btn:hover {
  background: var(--bg-secondary);
  color: #fff;
}
.empty-history-hint {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
  padding: 8px;
}

.sidebar-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.sidebar-link-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.sidebar-link-item:hover {
  background: var(--bg-secondary);
  color: #fff;
}
.sidebar-link-item.highlight-tele {
  color: var(--accent-tele);
}
.sidebar-link-item.danger {
  color: #f87171;
}

.sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.user-chip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.user-chip .user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.user-chip strong {
  font-size: 13px;
  color: #fff;
}
.user-chip span {
  font-size: 11px;
  color: var(--text-muted);
}

/* PANIC SCREEN OVERLAY */
.panic-screen-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  color: #1a1a1a;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.panic-header {
  height: 52px;
  background: #f7f7f8;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.panic-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.panic-exit-btn {
  background: #000;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.panic-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.panic-chat-bubble {
  max-width: 680px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.panic-card {
  background: #f9f9fb;
  border: 1px solid #e2e2e8;
  border-radius: 8px;
  padding: 12px 14px;
}
.panic-card h4 {
  font-size: 13.5px;
  margin-bottom: 6px;
  color: #0f172a;
}
.panic-hint {
  margin-top: 30px;
  font-size: 12px;
  color: #94a3b8;
}

/* MODALS */
.video-modal-overlay, .auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.video-modal-card, .auth-card {
  width: 100%;
  max-width: 540px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
}
.video-modal-header, .auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.video-modal-header h4, .auth-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.video-modal-body video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.video-modal-footer, .auth-btn-row {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
}

.primary-pill-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-pink), #db2777);
  color: #fff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(254, 44, 85, 0.4);
}
.secondary-pill-btn {
  flex: 1;
  background: var(--bg-tertiary);
  color: #fff;
  border: 1px solid var(--border-subtle);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* AUTH FORM */
.auth-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.auth-form input {
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}
.auth-form input:focus {
  border-color: var(--accent-pink);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border-strong);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 10000;
  pointer-events: none;
  animation: toastFade 0.25s ease-out;
}

/* UTILS & ANIMATIONS */
.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDrawer {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 600px) {
  .chat-header { padding: 0 10px; }
  .chat-main { padding: 16px 10px 96px; }
  .action-item-btn { padding: 12px 14px; font-size: 13.5px; }
  .action-text { font-size: 13px; }
  .matched-videos-grid { grid-template-columns: 1fr 1fr; }
}

