/* ==========================================================================
   TRANSELE - AI Voice & Translation Studio (Powered by SHONO)
   Charcoal Dark Theme + Signature Brand Pink (#FF1E56) Aesthetics
   ========================================================================== */

:root,
[data-theme="dark"] {
  /* ========================================================================
     Default Pure Charcoal Dark Palette (Carbon/Zinc Charcoal - No Blue Tint)
     ======================================================================== */
  --bg-primary: #121214;
  --bg-secondary: #18181B;
  --bg-sidebar: #141416;
  --bg-card: rgba(24, 24, 27, 0.94);
  --bg-card-hover: #222226;
  --bg-tertiary: #1D1D21;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: #FF1E56;
  
  --text-primary: #F4F4F6;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  
  /* Signature Brand Pink Palette (Exact match to Logo #FF1E56 / #FF004B) */
  --brand-pink: #FF1E56;
  --brand-pink-hover: #FF3D71;
  --brand-primary: #FF1E56;
  --brand-gradient: linear-gradient(135deg, #FF1E56 0%, #FF3366 50%, #FF5E85 100%);
  --brand-gradient-hover: linear-gradient(135deg, #E01046 0%, #FF1E56 50%, #FF4370 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(255, 30, 86, 0.16) 0%, rgba(255, 61, 113, 0.08) 100%);
  --brand-glow: rgba(255, 30, 86, 0.45);
  
  /* Status Accents */
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-blue: #3B82F6;
  --accent-rose: #FF1E56;
  
  /* Elevation & Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 45px -4px rgba(0, 0, 0, 0.8);
  --shadow-card: 0 14px 40px -6px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --shadow-glow: 0 0 25px rgba(255, 30, 86, 0.35);

  /* 40% Corner Radius Reduction */
  --radius-xs: 3.5px;
  --radius-sm: 5px;
  --radius-md: 8.5px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --font-bengali: 'Hind Siliguri', system-ui, -apple-system, sans-serif;
  --font-english: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
  /* Color Palette - Light Mode */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #F1F5F9;
  --bg-tertiary: #F1F5F9;
  --border-color: #E2E8F0;
  --border-active: #FF1E56;
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --brand-pink: #FF1E56;
  --brand-pink-hover: #E01046;
  --brand-gradient: linear-gradient(135deg, #FF1E56 0%, #FF3D71 50%, #FF6584 100%);
  --brand-gradient-hover: linear-gradient(135deg, #E01046 0%, #F42B60 50%, #FF4370 100%);
  --brand-gradient-subtle: linear-gradient(135deg, rgba(255, 30, 86, 0.08) 0%, rgba(255, 61, 113, 0.04) 100%);
  --brand-glow: rgba(255, 30, 86, 0.25);
  --brand-primary: #FF1E56;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 36px -4px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Base Reset & Smooth Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-english);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(255, 30, 86, 0.05) 0px, transparent 45%),
    radial-gradient(at 100% 100%, rgba(255, 30, 86, 0.03) 0px, transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Main App Layout */
.shono-app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   Left Navigation Sidebar
   ========================================================================== */

.shono-sidebar {
  width: 275px;
  min-width: 275px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  scrollbar-width: thin;
  font-family: 'Inter', 'Poppins', system-ui, sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shono-sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-right: none;
  opacity: 0;
  pointer-events: none;
}

/* Brand Header: TRANSELE Powered by SHONO */
.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 4px 6px;
}

.sidebar-close-btn {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.brand-app-icon {
  height: 42px;
  width: 42px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-link:hover .brand-app-icon {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  display: block;
}

.brand-powered-by {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.powered-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-shono-logo {
  height: 13px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  filter: none !important;
  box-shadow: none !important;
}

/* CTA: New Translation Button */
.sidebar-cta {
  width: 100%;
}

.btn-sidebar-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 30, 86, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-sidebar-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 30, 86, 0.5);
  filter: brightness(1.05);
}

.btn-sidebar-primary:active {
  transform: translateY(0);
}

/* Nav Links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-section-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.nav-link-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
  transform: translateX(2px);
}

.nav-link-btn.active {
  background: var(--brand-gradient-subtle);
  color: var(--brand-pink);
  font-weight: 700;
  border-color: rgba(255, 30, 86, 0.35);
  box-shadow: 0 2px 8px rgba(255, 30, 86, 0.12);
}

[data-theme="dark"] .nav-link-btn.active {
  color: #FFA3BA;
}

.nav-icon {
  font-size: 1.1rem;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  background: var(--brand-pink);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.nav-badge-pill {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Sidebar Controls Panel */
.sidebar-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
}

.sidebar-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
}

.control-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-left: 36px;
}

.sidebar-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.sidebar-select:focus {
  border-color: var(--brand-pink);
}

/* Toggle Switch with Pink Brand Accent */
.toggle-control {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-color);
  transition: .25s ease;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.toggle-control input:checked + .toggle-slider {
  background: var(--brand-gradient);
}

.toggle-control input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 10px;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--brand-pink);
}

/* ==========================================================================
   Main Studio Canvas (Right Side)
   ========================================================================== */

.shono-main-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 36px;
  gap: 20px;
  overflow-y: auto;
  width: calc(100% - 270px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.shono-main-canvas.expanded {
  width: 100%;
  padding: 24px 48px;
}

/* Top Language Navigation Bar */
.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  box-shadow: var(--shadow-sm);
}

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

.mobile-brand-title {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-brand-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--radius-xs);
}

.mobile-brand-name {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--brand-pink);
  background: var(--bg-card-hover);
}

.lang-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
}

.quick-lang-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-lang-tabs::-webkit-scrollbar { display: none; }

.quick-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.quick-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Pink Active State Matching Logo */
.quick-tab.active {
  background: var(--brand-gradient-subtle);
  color: var(--brand-pink);
  font-weight: 700;
  border: 1px solid rgba(255, 30, 86, 0.35);
  box-shadow: 0 2px 10px rgba(255, 30, 86, 0.15);
}

[data-theme="dark"] .quick-tab.active {
  color: #FFA3BA;
}

.studio-swap-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.studio-swap-btn:hover {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
  transform: rotate(180deg) scale(1.05);
  box-shadow: 0 4px 14px rgba(255, 30, 86, 0.4);
}

.dropdown-wrapper {
  position: relative;
  flex-shrink: 0;
}

.studio-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 7px 30px 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

.studio-select:focus {
  border-color: var(--brand-pink);
}

/* ==========================================================================
   Dual Translation Cards Grid
   ========================================================================== */

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  flex: 1;
  min-height: 540px;
}

.studio-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.studio-card:hover {
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--border-color);
}

.studio-card:focus-within {
  border-color: rgba(255, 30, 86, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 30, 86, 0.12), var(--shadow-card);
}

/* Clean Card Topbar */
.card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.015);
  min-height: 52px;
}

.card-lang-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Source Indicator Dot: Neutral/Gray when idle, Pulsing Red when recording */
.lang-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.55;
  transition: all 0.25s ease;
}

.lang-dot.recording,
.recording .lang-dot,
.source-card.recording .lang-dot {
  background: var(--brand-pink);
  opacity: 1;
  box-shadow: 0 0 12px rgba(255, 30, 86, 0.95);
  animation: dot-pulse 1.2s infinite ease-in-out;
}

@keyframes dot-pulse {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(255, 30, 86, 0.4); }
  50% { transform: scale(1.35); box-shadow: 0 0 14px rgba(255, 30, 86, 0.95); }
  100% { transform: scale(1); box-shadow: 0 0 4px rgba(255, 30, 86, 0.4); }
}

.lang-dot.emerald {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  opacity: 1;
}

.card-lang-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  color: #FFFFFF;
}

.auto-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10B981;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  user-select: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auto-copy-pill:hover {
  background: rgba(16, 185, 129, 0.22);
}

.card-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.icon-btn.active {
  color: var(--accent-amber);
}

/* Format Button with Pink Gradient */
.punct-btn-action {
  background: var(--brand-gradient-subtle);
  border: 1px solid rgba(255, 30, 86, 0.3);
  color: var(--brand-pink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="dark"] .punct-btn-action {
  color: #FFA3BA;
}

.punct-btn-action:hover {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255, 30, 86, 0.35);
}

/* Card Body & Textareas */
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 16px;
  position: relative;
  gap: 12px;
}

.studio-textarea {
  width: 100%;
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-size: 1.18rem;
  color: var(--text-primary);
  line-height: 1.8;
  font-family: var(--font-bengali), var(--font-english);
  min-height: 220px;
}

.studio-textarea::placeholder {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.studio-output {
  flex: 1;
  font-size: 1.18rem;
  color: var(--text-primary);
  line-height: 1.8;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-english), var(--font-bengali);
  min-height: 220px;
}

.studio-output.placeholder {
  color: var(--text-muted);
  user-select: none;
}

/* Dedicated Sleek Punctuation Ribbon */
.quick-punct-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  width: fit-content;
  margin-top: auto;
}

.ribbon-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.punct-chips-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.punct-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 2px 10px;
  font-size: 0.95rem;
  font-family: var(--font-bengali), 'Hind Siliguri', sans-serif;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.3;
}

.punct-chip[data-punct="।"] {
  font-family: var(--font-bengali), 'Hind Siliguri', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  padding: 1px 11px;
}

.punct-chip:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
  background: var(--brand-gradient-subtle);
  transform: translateY(-1px);
}

/* Standardized Bengali Card */
.standard-form-card {
  margin: 12px 24px;
  padding: 14px 18px;
  background: var(--brand-gradient-subtle);
  border: 1px solid rgba(255, 30, 86, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeIn 0.25s ease;
}

.standard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.standard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-pink);
}

[data-theme="dark"] .standard-title {
  color: #FFA3BA;
}

.dialect-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 30, 86, 0.3);
  color: var(--brand-pink);
}

.standard-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sm:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
}

.btn-primary-sm {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border-color: transparent;
  font-weight: 700;
}

.btn-primary-sm:hover {
  filter: brightness(1.06);
  color: #FFFFFF;
}

.standard-text {
  font-size: 1.05rem;
  font-family: var(--font-bengali);
  color: var(--text-primary);
  line-height: 1.7;
}

/* Card Bottombar */
.card-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.015);
  min-height: 60px;
}

.bottombar-left, .bottombar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Glowing Microphone Button (Logo Pink Gradient) */
.studio-mic-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--brand-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 30, 86, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  flex-shrink: 0;
}

.studio-mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(255, 30, 86, 0.6);
}

.studio-mic-btn.listening {
  background: linear-gradient(135deg, #FF1E56 0%, #FF004B 50%, #D8003F 100%);
  animation: mic-pulse 1.6s infinite ease-in-out;
}

@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 30, 86, 0.75), 0 0 20px rgba(255, 30, 86, 0.5);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(255, 30, 86, 0), 0 0 30px rgba(255, 30, 86, 0.7);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 30, 86, 0), 0 0 20px rgba(255, 30, 86, 0.5);
  }
}

/* Audio Wave Visualizer & Status */
.mic-status-container {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(255, 30, 86, 0.08);
  border: 1px solid rgba(255, 30, 86, 0.3);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  animation: fadeIn 0.2s ease;
}

.mic-status-container.active {
  display: flex;
}

.audio-wave-container {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.wave-bar {
  width: 3px;
  height: 18px;
  background: var(--brand-pink);
  border-radius: 1px;
  transform-origin: bottom center;
  transform: scaleY(0.25);
  animation: wave-scale 0.8s ease-in-out infinite alternate;
  will-change: transform;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.6s; }

@keyframes wave-scale {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

.mic-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.listening-status-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-pink);
}

.mic-duration-badge {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-pink);
  background: rgba(255, 30, 86, 0.12);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.btn-stop-speech {
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 30, 86, 0.4);
}

.btn-stop-speech:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.studio-counter {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.studio-status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.studio-shortcut-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.modal-input:focus {
  border-color: var(--brand-pink);
}

.modal-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease;
}

.modal-textarea:focus {
  border-color: var(--brand-pink);
}

.modal-btn-primary {
  padding: 11px 22px;
  background: var(--brand-gradient);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 30, 86, 0.4);
  transition: all 0.2s ease;
}

.modal-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.modal-btn-secondary {
  padding: 11px 18px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn-secondary:hover {
  background: var(--bg-card-hover);
}

/* Tone Chips Grid */
.tone-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tone-chip {
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s ease;
}

.tone-chip:hover {
  border-color: var(--brand-pink);
  background: var(--bg-card-hover);
}

.tone-chip.selected {
  border-color: var(--brand-pink);
  background: var(--brand-gradient-subtle);
}

.tone-chip-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tone-chip-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* History Drawer */
.history-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  max-width: 100vw;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.drawer-search-bar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-item:hover {
  border-color: var(--brand-pink);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.history-source {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-bengali);
}

.history-target {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-danger {
  color: #FF1E56;
}

.btn-danger:hover {
  background: #FF1E56;
  color: #FFFFFF;
  border-color: #FF1E56;
}

/* Floating Word Voice-Replace Tooltip */
.word-replace-tooltip {
  position: absolute;
  z-index: 1000;
  background: var(--bg-secondary);
  border: 1px solid var(--border-active);
  box-shadow: var(--shadow-lg), 0 0 20px var(--brand-glow);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: none;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.word-replace-tooltip.show {
  display: flex;
}

.selected-word-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: var(--brand-gradient-subtle);
  color: var(--brand-pink);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replace-mic-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--brand-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.replace-input-field {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  outline: none;
  width: 110px;
}

.replace-apply-btn {
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  border: none;
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #18181B;
  color: #F4F4F6;
  border: 1px solid rgba(255, 30, 86, 0.4);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 30, 86, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Architecture
   ========================================================================== */

@media (max-width: 960px) {
  /* Layout: Sidebar converts into high-performance Off-Canvas Drawer */
  .shono-app-layout {
    position: relative;
    width: 100%;
    overflow-x: hidden;
  }

  .shono-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1050;
    transform: translateX(-100%);
    box-shadow: none !important;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease, box-shadow 0.3s ease;
    border-right: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .shono-sidebar.mobile-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.8) !important;
  }

  .shono-sidebar.collapsed {
    transform: translateX(-100%);
    box-shadow: none !important;
    visibility: hidden;
    pointer-events: none;
    width: 290px;
    min-width: 290px;
    padding: 20px 16px;
  }

  .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .sidebar-close-btn:hover {
    color: var(--text-primary);
    border-color: var(--brand-pink);
    background: var(--bg-card-hover);
  }

  /* Main Canvas full width on mobile */
  .shono-main-canvas {
    width: 100% !important;
    padding: 14px 12px 28px !important;
    gap: 14px;
    min-height: 100vh;
  }

  .shono-main-canvas.expanded {
    padding: 14px 12px 28px !important;
  }

  /* Show mobile brand in topbar */
  .mobile-brand-title {
    display: flex;
  }

  /* Topbar Mobile Layout */
  .studio-topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }

  .topbar-left-cluster {
    width: 100%;
    justify-content: flex-start;
  }

  .lang-panel {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .lang-panel::-webkit-scrollbar { display: none; }

  .quick-lang-tabs {
    flex-shrink: 0;
  }

  .studio-swap-btn {
    align-self: center;
    transform: rotate(90deg);
  }

  .studio-swap-btn:hover {
    transform: rotate(270deg) scale(1.05);
  }

  /* Translation Studio Grid: Stack vertically on mobile */
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: auto;
  }

  .studio-card {
    border-radius: var(--radius-md);
  }

  .card-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
    min-height: auto;
  }

  .card-actions-right {
    flex-wrap: wrap;
    gap: 4px;
  }

  .card-body {
    padding: 14px 16px 12px;
  }

  .studio-textarea,
  .studio-output {
    font-size: 1.05rem;
    line-height: 1.65;
    min-height: 150px;
  }

  .quick-punct-ribbon {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 6px 10px;
    scrollbar-width: none;
  }
  .quick-punct-ribbon::-webkit-scrollbar { display: none; }

  .standard-form-card {
    margin: 10px 14px;
    padding: 12px 14px;
  }

  .card-bottombar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
  }

  .bottombar-left {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .bottombar-right {
    width: 100%;
    justify-content: space-between;
  }

  .studio-shortcut-hint {
    display: none;
  }

  /* Modals */
  .modal-overlay {
    padding: 12px;
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 14px 18px;
  }

  .modal-body {
    padding: 16px 18px;
    gap: 12px;
    overflow-y: auto;
  }

  /* History Drawer on mobile */
  .history-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  /* Split Screen Conversation Mode Mobile */
  .conv-split-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .vocab-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .shono-main-canvas {
    padding: 10px 8px 24px !important;
    gap: 10px;
  }

  .studio-topbar {
    padding: 10px 10px;
  }

  .quick-tab {
    padding: 5px 9px;
    font-size: 0.8rem;
  }

  .studio-select {
    font-size: 0.78rem;
    padding: 6px 24px 6px 8px;
  }

  .btn-tool-pill {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  .badge-shortcut {
    display: none;
  }

  .punct-btn-action {
    padding: 4px 10px;
    font-size: 0.75rem;
  }

  .studio-mic-btn {
    width: 42px;
    height: 42px;
  }

  .mic-status-container {
    padding: 4px 10px;
    gap: 8px;
  }

  .tone-chips-grid {
    grid-template-columns: 1fr;
  }

  .toast-notification {
    width: 90vw;
    font-size: 0.82rem;
    padding: 10px 16px;
    text-align: center;
    justify-content: center;
  }
}

/* ========================================================
   NEW FEATURES STYLING (Conversation Mode, Avro, Export, Vocabulary)
   ======================================================== */

/* Sidebar Feature Card (Conversation Mode Switch) */
.sidebar-feature-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 30, 86, 0.08), rgba(20, 20, 24, 0.95));
  border: 1px solid rgba(255, 30, 86, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: all 0.25s ease;
}

.sidebar-feature-card:hover {
  border-color: var(--brand-pink);
  box-shadow: 0 4px 16px rgba(255, 30, 86, 0.15);
}

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

.feature-icon {
  font-size: 1.3rem;
}

.feature-title-wrap {
  display: flex;
  flex-direction: column;
}

.feature-main-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-bengali);
}

.feature-sub-title {
  font-size: 0.7rem;
  color: var(--brand-pink);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Avro Banglish & Upload Buttons in Topbar */
.btn-tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-tool-pill:hover {
  background: var(--bg-card);
  border-color: var(--brand-pink);
  color: var(--text-primary);
}

.btn-tool-pill.active {
  background: rgba(255, 30, 86, 0.15);
  border-color: var(--brand-pink);
  color: #FFFFFF;
}

.avro-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.2s ease;
}

.btn-tool-pill.active .avro-indicator {
  background: var(--brand-pink);
  box-shadow: 0 0 8px var(--brand-pink);
}

.badge-shortcut {
  font-size: 0.68rem;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Export Dropdown Menu */
.dropdown-export-wrapper {
  position: relative;
  display: inline-block;
}

.export-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #18181B;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  min-width: 190px;
  z-index: 50;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.export-item {
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.export-item:last-child {
  border-bottom: none;
}

.export-item:hover {
  background: rgba(255, 30, 86, 0.12);
  color: var(--brand-pink);
}

/* ========================================================
   FACE-TO-FACE SPLIT SCREEN CONVERSATION MODE
   ======================================================== */
.conversation-mode-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: calc(100vh - 120px);
  gap: 16px;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.conv-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #18181B;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.conv-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conv-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 30, 86, 0.15);
  border: 1px solid rgba(255, 30, 86, 0.35);
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.conv-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  flex: 1;
}

.conv-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #18181B);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  transition: all 0.3s ease;
}

[data-theme="light"] .conv-card {
  background: #ffffff;
  border-color: #e4e4e7;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.conv-card.active-speaking {
  border-color: var(--brand-pink);
  box-shadow: 0 0 28px rgba(255, 30, 86, 0.25);
}

.conv-card.flipped {
  transform: rotate(180deg);
}

.conv-person-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.conv-person-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.conv-bubbles-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  min-height: 200px;
  padding: 10px 0;
}

.conv-bubble {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-size: 1.12rem;
  line-height: 1.65;
  position: relative;
}

.conv-bubble.source-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
}

[data-theme="dark"] .conv-bubble.source-bubble {
  background: #232328;
  color: #f4f4f5;
}

[data-theme="light"] .conv-bubble.source-bubble {
  background: #f4f4f5;
  color: #18181b;
}

.conv-bubble.target-bubble {
  background: rgba(255, 30, 86, 0.12);
  border: 1.5px solid rgba(255, 30, 86, 0.35);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.18rem;
}

[data-theme="dark"] .conv-bubble.target-bubble {
  background: rgba(255, 30, 86, 0.15);
  color: #ffffff;
}

[data-theme="light"] .conv-bubble.target-bubble {
  background: #fff1f4;
  color: #9f1239;
  border-color: rgba(255, 30, 86, 0.4);
}

.conv-bubble-meta {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conv-controls-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.conv-mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-pink), var(--brand-crimson));
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 22px rgba(255, 30, 86, 0.4);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.conv-mic-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(255, 30, 86, 0.6);
}

.conv-mic-btn.listening {
  animation: pulseMic 1.4s infinite;
  background: #E11D48;
}

.conv-status-indicator {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-height: 20px;
}

/* Flip Card Button */
.btn-flip-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-flip-card:hover {
  border-color: var(--brand-pink);
  color: var(--text-primary);
}

/* Multi-tab Settings Modal */
.settings-tabs-header {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
  padding-bottom: 2px;
}

.settings-tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-tab-btn:hover {
  color: var(--text-primary);
}

.settings-tab-btn.active {
  color: var(--brand-pink);
  border-bottom-color: var(--brand-pink);
}

.settings-tab-content {
  display: none;
  animation: fadeIn 0.2s ease;
}

.settings-tab-content.active {
  display: block;
}

/* Custom Vocabulary Table & Form */
.vocab-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 120px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.vocab-table-container {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.vocab-table th, .vocab-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.vocab-table th {
  background: #141416;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 2;
}

.vocab-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.vocab-del-btn {
  background: transparent;
  border: none;
  color: #EF4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.vocab-del-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* History Filter Pills */
.history-filter-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
}

.history-filter-pill {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-filter-pill.active {
  background: var(--brand-pink);
  border-color: var(--brand-pink);
  color: #FFFFFF;
}

.btn-star-fav {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-star-fav.favorited {
  color: #F59E0B;
}

/* ========================================================
   App Footer & Privacy Modal Trigger
   ======================================================== */
.app-footer {
  margin-top: auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  width: 100%;
  box-sizing: border-box;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.privacy-modal-trigger {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.privacy-modal-trigger:hover {
  color: var(--brand-pink);
  text-decoration: underline;
}

/* ========================================================
   Sidebar Footer & UI Language Toggle Button
   ======================================================== */
.sidebar-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
}

.ui-lang-toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ui-lang-toggle-btn:hover {
  border-color: var(--brand-pink);
  color: var(--brand-pink);
}

/* ========================================================
   Auto-Copy Options Select Responsive Fix
   ======================================================== */
.auto-copy-options-panel {
  width: 100%;
  box-sizing: border-box;
}

.auto-copy-options-panel select {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}


