/* LexiGlobal Voice Translator — 100% True Full Screen Architecture for Phone & Tablet */
/* Zero Duplication Engine + Edge-TTS Neural Audio + iOS Tablet & Telegram Mini App Audio Support ($0.00 ZERO API Cost) */

/* Twemoji Country Flags — Vector color flags for Windows PC, Laptop, Tablet, Phone */
@font-face {
  font-family: 'Twemoji Country Flags';
  font-style: normal;
  font-weight: 400;
  src: url('../assets/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}

/* 1. HTML and BODY: Allow full natural vertical scrolling so user can scroll down to see full text */
html[data-route="translator"],
html:has(body[data-route="translator"]),
body[data-route="translator"] {
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

body[data-route="translator"] {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

/* Telegram Mini App Scroll Container */
html.tg body[data-route="translator"] {
  height: var(--tg-viewport-stable-height, 100%) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

body[data-route="translator"] #brandHeader { 
  display: none !important; 
}

body[data-route="translator"] .bottom-nav { 
  display: none !important; 
}

body[data-route="translator"] .credit { 
  display: none !important; 
}

body[data-route="translator"] .ambient {
  display: none !important;
}

/* 2. App root container allows natural expansion and scrolling */
body[data-route="translator"] .app { 
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  padding-top: max(4px, env(safe-area-inset-top, 0px)) !important;
  padding-bottom: max(96px, env(safe-area-inset-bottom, 36px)) !important;
  padding-left: max(6px, env(safe-area-inset-left, 0px)) !important;
  padding-right: max(6px, env(safe-area-inset-right, 0px)) !important;
  box-sizing: border-box !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Telegram Mini App Viewport & Safe Bottom Clearance */
html.tg body[data-route="translator"] .app {
  min-height: var(--tg-viewport-stable-height, 100%) !important;
  height: auto !important;
  padding-top: max(4px, var(--tg-safe-area-inset-top, 0px)) !important;
  padding-bottom: max(110px, var(--tg-safe-area-inset-bottom, 40px), env(safe-area-inset-bottom, 40px)) !important;
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

/* 3. main#main flexes and allows smooth vertical scrolling */
body[data-route="translator"] main#main {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  height: auto !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* 4. #v-translator view */
body[data-route="translator"] .view#v-translator {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
  height: auto !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

/* 5. Dynamic Container for Phone & Tablet */
.vt-container {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  padding: 4px 10px 48px !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  min-height: 100% !important;
  height: auto !important;
}

html.tg .vt-container {
  min-height: 100% !important;
  height: auto !important;
  padding: 2px 10px 64px !important;
  gap: 6px !important;
}

/* All children fill full width of the centered container */
.vt-header, .vt-card, .vt-swap-strip, .vt-telegram-banner {
  width: 100%;
  box-sizing: border-box;
}

/* Slim Compact Header */
.vt-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  min-height: 34px;
  width: 100%;
  box-sizing: border-box;
}

.vt-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.vt-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--head);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.vt-back-btn:active {
  transform: scale(0.92);
}

.vt-back-btn .ic {
  width: 16px;
  height: 16px;
}

.vt-header-title {
  font: 700 1.05rem/1.2 var(--serif);
  color: var(--head);
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-badge-free {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 6. 3-Row Cards Layout — Fills Vertical Screen Space & Expands With Content */
.vt-card {
  flex: 1 1 auto !important;
  min-height: 95px !important;
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface) 75%, color-mix(in srgb, var(--btn-b) 20%, var(--surface)) 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 8px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 5px;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Specific Row Accent Highlights */
.vt-row-1 {
  border-color: rgba(56, 189, 248, 0.45);
}
.vt-row-1.is-listening {
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35);
}

.vt-row-2 {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, #10b981 6%, var(--surface)) 100%);
}

.vt-row-3 {
  display: none !important;
}

.vt-upload-btn {
  cursor: pointer;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

.vt-upload-btn:hover {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
}

.vt-row-1.is-drag-over {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.08) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3) !important;
}

a.vt-btn-icon {
  text-decoration: none;
}

/* Card Header Bar (Single Compact Row) */
.vt-compact-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  width: 100%;
}

.vt-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.vt-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.vt-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 800;
  flex-shrink: 0;
}

.vt-pill-badge.num-1 { background: #38bdf8; color: #0c1a2e; }
.vt-pill-badge.num-2 { background: #10b981; color: #0c1a2e; }
.vt-pill-badge.num-3 { background: #f59e0b; color: #0c1a2e; }

.vt-row-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--head);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-label-short {
  display: none;
}

/* Flags with Twemoji color fallback */
.vt-flag, .vt-opt-flag {
  font-family: 'Twemoji Country Flags', 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', sans-serif !important;
  font-size: 1.15em;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Custom Language Picker Trigger (Displays Real Flags on Windows PC & All Devices) */
.vt-lang-trigger {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: 600 0.8125rem var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.vt-lang-trigger:hover {
  border-color: #38bdf8;
  background: color-mix(in srgb, var(--surface) 88%, var(--text) 12%);
}

.vt-lang-title {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vt-arrow {
  font-size: 0.7rem;
  opacity: 0.7;
  flex-shrink: 0;
}

/* Modal Picker (Shows real flags on Computer, Tablet, Phone) */
.vt-lang-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(4, 10, 24, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: vtFadeIn 0.15s ease-out;
}

.vt-lang-modal {
  width: 100%;
  max-width: 480px;
  max-height: 84vh;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: vtPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.vt-modal-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
}

.vt-modal-title {
  font: 700 1.05rem/1.2 var(--serif);
  color: var(--head);
  margin: 0;
}

.vt-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 90%, var(--text) 10%);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.12s ease;
}

.vt-modal-close:hover {
  background: var(--text-2);
  color: var(--surface);
}

.vt-modal-search-wrap {
  flex-shrink: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 95%, var(--text) 5%);
}

.vt-modal-search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: 500 0.875rem var(--sans);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.vt-modal-search:focus {
  border-color: #38bdf8;
}

.vt-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 18px;
  box-sizing: border-box;
}

.vt-opt-group {
  margin-top: 10px;
}

.vt-group-title {
  font: 700 0.72rem/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  padding: 4px 8px;
  margin: 0;
}

.vt-opt-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font: 500 0.9rem/1.3 var(--sans);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease;
  box-sizing: border-box;
}

.vt-opt-item:hover, .vt-opt-item:focus {
  background: color-mix(in srgb, var(--surface) 80%, #38bdf8 20%);
}

.vt-opt-item.is-selected {
  background: color-mix(in srgb, var(--surface) 75%, #10b981 25%);
  color: var(--head);
  font-weight: 700;
}

.vt-opt-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vt-opt-check {
  color: #10b981;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

@keyframes vtFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vtPopIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Compact Select Dropdown */
.vt-lang-select {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: 600 0.8125rem var(--sans);
  outline: none;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.vt-lang-select:focus {
  border-color: #38bdf8;
}

/* Control Bar (Speak & Translate in 1 row) */
.vt-ctrl-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.vt-mic-btn-compact {
  flex: 1.3;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  border: 1px solid #f87171;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font: 700 0.8125rem var(--sans);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
  user-select: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.vt-mic-btn-compact:active {
  transform: translateY(1px);
}

.vt-mic-btn-compact .ic {
  width: 16px;
  height: 16px;
}

.vt-mic-btn-compact.listening {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
  animation: vtMicPulse 1.5s infinite;
}

.vt-btn-compact {
  flex: 1;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font: 600 0.8125rem var(--sans);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.vt-btn-compact:active {
  transform: translateY(1px);
}

.vt-btn-compact .ic {
  width: 15px;
  height: 15px;
}

.vt-btn-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease, color 0.15s ease;
}

.vt-btn-icon:hover {
  color: var(--head);
}

.vt-btn-icon:active {
  transform: scale(0.92);
}

.vt-btn-icon .ic {
  width: 15px;
  height: 15px;
}

.vt-btn-voice-compact {
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  border: 1px solid #3b82f6;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font: 600 0.775rem var(--sans);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.vt-btn-voice-compact:active {
  transform: translateY(1px);
}

.vt-btn-voice-compact .ic {
  width: 14px;
  height: 14px;
}

.vt-btn-voice-compact.is-playing {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #34d399;
  animation: vtPulse 1.2s infinite ease-in-out;
}

/* Swap Strip (Slim Divider) */
.vt-swap-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -1px 0;
}

.vt-swap-pill {
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, #38bdf8 20%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font: 700 0.75rem var(--sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.vt-swap-pill:active {
  transform: scale(0.95);
}

.vt-swap-pill .ic {
  width: 13px;
  height: 13px;
}

/* Full-Height Flexible Textareas (Never Cuts Off or Hides Text!) */
.vt-textarea {
  width: 100% !important;
  min-height: 52px !important;
  height: auto;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 92%, var(--text) 8%);
  color: var(--text);
  font: 500 0.95rem/1.55 var(--sans);
  outline: none;
  resize: none;
  box-sizing: border-box !important;
  overflow-y: hidden;
  transition: border-color 0.15s ease;
}

.vt-textarea:focus {
  border-color: #38bdf8;
}

.vt-textarea.is-target {
  color: color-mix(in srgb, #10b981 85%, var(--text) 15%);
}

/* Micro-Status Bar */
.vt-micro-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.725rem;
  color: var(--text-2);
  padding: 0 2px;
  min-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vt-time-track {
  flex-shrink: 0;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 2px;
}

.vt-time-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  transition: width 0.3s linear;
}

/* Pulse animation */
.vt-pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: vtDot 1.2s infinite ease-in-out;
}

@keyframes vtMicPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes vtPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes vtDot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Telegram banner */
.vt-telegram-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(36, 161, 222, 0.12);
  border: 1px solid rgba(36, 161, 222, 0.3);
  color: #38bdf8;
  font-size: 0.725rem;
  line-height: 1.3;
}

.vt-btn-open-browser {
  padding: 3px 8px;
  border-radius: 6px;
  background: #24a1de;
  color: #fff;
  border: none;
  font: 700 0.7rem var(--sans);
  cursor: pointer;
  white-space: nowrap;
}

/* ============================================================ NARROW PHONES (< 440px): Compact buttons so labels fit */
@media (max-width: 440px) {
  .vt-btn-voice-compact {
    padding: 0 8px;
    height: 30px;
  }
  .vt-btn-voice-compact .lbl {
    display: none;
  }
  .vt-row-label {
    font-size: 0.8125rem;
  }
  .vt-label-long {
    display: none;
  }
  .vt-label-short {
    display: inline;
  }
}

/* ============================================================ TABLETS & DESKTOPS (Expands into Grand Full-Screen Studio) */
@media (min-width: 500px) {
  .vt-container {
    max-width: 920px !important;
    width: 96% !important;
    padding: 10px 18px 30px !important;
    gap: 12px !important;
    min-height: 100% !important;
    height: auto !important;
  }
  .vt-card {
    flex: 1 1 auto !important;
    min-height: 120px !important;
    padding: 14px 18px !important;
    border-radius: 18px !important;
    gap: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14) !important;
  }
  .vt-textarea {
    flex: 1 1 auto !important;
    min-height: 80px !important;
    font-size: 1.15rem !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
  }
  .vt-header-title {
    font-size: 1.45rem !important;
  }
  .vt-lang-select, .vt-lang-trigger {
    height: 38px !important;
    font-size: 0.9375rem !important;
    padding: 0 12px !important;
  }
  .vt-mic-btn-compact, .vt-btn-compact {
    height: 42px !important;
    font-size: 0.9375rem !important;
  }
  .vt-btn-voice-compact {
    height: 36px !important;
    font-size: 0.875rem !important;
    padding: 0 14px !important;
  }
  .vt-btn-icon {
    width: 36px !important;
    height: 36px !important;
  }
  .vt-swap-pill {
    height: 32px !important;
    font-size: 0.8125rem !important;
    padding: 0 16px !important;
  }
}


/* AUTO AI ENGINE & API KEY SWITCHER (Luxury Gold Button matching wr-lux-btn) */
.vt-api-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 12px;
  width: 100%;
}

.vt-lux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 580px;
  min-height: 44px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid #A67C2E;
  color: #2A1E08;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #B88636 0%, #FFE5A3 50%, #C59645 100%);
  box-shadow: 0 4px 14px rgba(166, 124, 46, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.vt-lux-btn:hover {
  background: linear-gradient(135deg, #C59645 0%, #FFF0C2 50%, #CFA253 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(166, 124, 46, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.vt-lux-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(166, 124, 46, 0.3);
}

.vt-lux-btn .icon {
  width: 16px;
  height: 16px;
  color: #2A1E08;
}

/* API KEY SWITCHER MODAL */
.vt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.vt-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.vt-modal-dialog {
  background: #0D1526;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #F8FAFC;
  padding: 22px;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.vt-modal-backdrop.is-open .vt-modal-dialog {
  transform: scale(1);
}

.vt-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.vt-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vt-modal-close {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.vt-modal-close:hover {
  color: #FFF;
  background: rgba(255, 255, 255, 0.1);
}

.vt-api-desc {
  font-size: 0.83rem;
  color: #94A3B8;
  margin-bottom: 16px;
  line-height: 1.45;
}

.vt-api-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.vt-api-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vt-api-card.is-active, .vt-api-card:hover {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
}

.vt-api-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #F1F5F9;
}

.vt-api-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
  margin-left: auto;
}

.vt-api-card-sub {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-top: 4px;
  margin-left: 26px;
}

.vt-api-input-wrap {
  margin-top: 10px;
  margin-left: 26px;
}

.vt-api-input {
  width: 100%;
  height: 38px;
  background: #090E1A;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0 12px;
  color: #F8FAFC;
  font-size: 0.82rem;
  font-family: monospace;
  box-sizing: border-box;
}

.vt-api-input:focus {
  border-color: #38BDF8;
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.vt-api-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #38BDF8;
  text-decoration: underline;
}

.vt-test-status {
  font-size: 0.82rem;
  margin-top: 10px;
  min-height: 20px;
}

.vt-test-status.ok { color: #34D399; font-weight: 600; }
.vt-test-status.err { color: #F87171; font-weight: 600; }

.vt-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

.vt-btn-modal-test {
  height: 38px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #F8FAFC;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.vt-btn-modal-test:hover { background: rgba(255, 255, 255, 0.15); }

.vt-btn-modal-save {
  height: 38px;
  padding: 0 20px;
  background: linear-gradient(135deg, #0284C7, #0369A1);
  border: 1px solid #38BDF8;
  border-radius: 8px;
  color: #FFF;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.vt-btn-modal-save:hover {
  background: linear-gradient(135deg, #0369A1, #075985);
}
