:root {
  --bg-primary: #080c14;
  --bg-secondary: #0e1526;
  --bg-card: rgba(18, 26, 44, 0.7);
  --bg-card-hover: rgba(25, 36, 62, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 240, 255, 0.4);
  --accent-cyan: #00f0ff;
  --accent-purple: #9d4edd;
  --accent-emerald: #10b981;
  --accent-pink: #ff007a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-neon: 0 0 25px rgba(0, 240, 255, 0.25);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(157, 78, 221, 0.08) 0%, transparent 40%);
}

/* Header */
.app-header {
  height: 70px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-neon);
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 0.65rem;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(157, 78, 221, 0.2));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.15);
}

.btn-icon-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
}

/* App Main Container */
.app-container {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

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

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

/* TRANSLATOR SCREEN */
.translator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.translation-controls-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.lang-selector-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
}

.lang-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-box label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lang-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.lang-select option {
  background: #0e1526;
  color: #fff;
}

.swap-lang-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swap-lang-btn:hover {
  transform: rotate(180deg);
  background: rgba(0, 240, 255, 0.15);
}

/* Audio Visualizer Stage */
.visualizer-stage {
  height: 140px;
  background: rgba(4, 7, 13, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#audioCanvas {
  width: 100%;
  height: 100%;
}

.visualizer-overlay {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 0, 122, 0.15);
  border: 1px solid rgba(255, 0, 122, 0.3);
  color: var(--accent-pink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-pink);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.voice-status-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Big Mic Button Section */
.mic-action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 20px 0;
}

.btn-giant-mic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-cyan), #0077b6);
  color: #04070d;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.4);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-giant-mic:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.6);
}

.btn-giant-mic.recording {
  background: linear-gradient(135deg, var(--accent-pink), #c1121f);
  color: #fff;
  box-shadow: 0 0 50px rgba(255, 0, 122, 0.7);
  animation: breathe 1.8s infinite;
}

@keyframes breathe {
  0% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 0, 122, 0.5); }
  50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(255, 0, 122, 0.9); }
  100% { transform: scale(1); box-shadow: 0 0 30px rgba(255, 0, 122, 0.5); }
}

.mic-hint {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Audio Output / Routing Card */
.audio-routing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.85rem;
}

.audio-routing-bar select {
  background: #0e1526;
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
}

/* Live Dual Transcript Feed */
.transcript-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.transcript-scroll {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.bubble-pair {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.bubble-original {
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bubble-translated {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--accent-cyan);
}

.lang-flag {
  font-size: 1rem;
}

/* HARDWARE DEVICE & BLUETOOTH TAB */
.hardware-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 850px) {
  .hardware-view { grid-template-columns: 1fr; }
}

.hw-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.hw-preview-box {
  width: 180px;
  height: 180px;
  border-radius: 30px;
  background: radial-gradient(circle at 30% 30%, #1e293b, #0f172a);
  border: 2px solid rgba(0, 240, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 240, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hw-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  position: absolute;
  top: 18px;
  right: 18px;
}

.hw-mic-grill {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.grill-hole {
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.btn-ble-pair {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-ble-pair:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 240, 255, 0.5);
}

/* HARDWARE STORE TAB */
.store-hero {
  text-align: center;
  margin-bottom: 32px;
}

.store-hero h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.product-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

@media (max-width: 850px) {
  .product-showcase-grid { grid-template-columns: 1fr; }
}

.prod-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(8, 12, 20, 0.5);
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px solid var(--border-subtle);
}

.big-gadget-render {
  width: 220px;
  height: 220px;
  border-radius: 36px;
  background: radial-gradient(circle at 35% 35%, #334155, #0f172a);
  border: 3px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.color-dots {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.c-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.c-dot.active {
  border-color: #fff;
  transform: scale(1.2);
}

.c-black { background: #0f172a; }
.c-silver { background: #94a3b8; }
.c-cyan { background: #00f0ff; }

.prod-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.prod-price-tag {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin: 16px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.prod-price-tag span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: line-through;
}

.prod-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.prod-specs-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.btn-buy-now {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  width: 100%;
}

.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.5);
}

/* SUBSCRIPTION PLANS TAB */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s ease;
}

.plan-card:hover {
  border-color: var(--border-active);
  transform: translateY(-5px);
}

.plan-card.featured {
  border-color: var(--accent-cyan);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.08), rgba(14, 21, 38, 0.8));
  box-shadow: var(--shadow-neon);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  color: #04070d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 16px 0;
}

.plan-price span {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-select-plan {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 24px;
  width: 100%;
  transition: all 0.2s ease;
}

.plan-card.featured .btn-select-plan {
  background: var(--accent-cyan);
  color: #04070d;
  border: none;
  font-weight: 700;
}

/* SETTINGS MODAL / VAULT */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 520px;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.api-key-input-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.api-key-input-box input {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.9rem;
  outline: none;
}

.api-key-input-box input:focus {
  border-color: var(--accent-cyan);
}

.free-tier-notice {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.85rem;
  color: #bae6fd;
  margin-bottom: 20px;
  line-height: 1.4;
}

.btn-save-key {
  background: var(--accent-cyan);
  color: #04070d;
  border: none;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
}
