/* ============================================================
   JARVIS UZ — Global Styles
   Futuristic AI Assistant Interface
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  --bg-primary:    #06060e;
  --bg-secondary:  #0c0c1a;
  --bg-panel:      rgba(8, 18, 40, 0.15);

  --cyan:          #00e5ff;
  --cyan-dim:      #007a8a;
  --cyan-glow:     rgba(0, 229, 255, 0.35);
  --cyan-deep:     #004d5c;
  --blue:          #2979ff;
  --blue-glow:     rgba(41, 121, 255, 0.25);
  --magenta:       #ff00e5;
  --green-ok:      #00e676;
  --red-err:       #ff1744;
  --white:         #e0f0ff;
  --white-dim:     rgba(224, 240, 255, 0.5);
  --white-xdim:    rgba(224, 240, 255, 0.2);

  --font-display:  'Orbitron', sans-serif;
  --font-body:     'Rajdhani', sans-serif;

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     22px;
  --radius-full:   9999px;

  --glow-sm:       0 0 8px var(--cyan-glow);
  --glow-md:       0 0 20px var(--cyan-glow), 0 0 40px rgba(0, 229, 255, 0.12);
  --glow-lg:       0 0 30px var(--cyan-glow), 0 0 80px rgba(0, 229, 255, 0.1), 0 0 120px rgba(0, 229, 255, 0.05);

  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--white);
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Video Background ---------- */
.video-bg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: auto;
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  border-radius: 16px;
}

/* ---------- Background Canvas ---------- */
#particleBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Futuristic Cursor ---------- */
.cursor-glow,
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.3s ease;
}

/* Ambient glow — large, soft */
.cursor-glow {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Spinning ring */
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(0, 229, 255, 0.3);
  border-top-color: var(--cyan);
  border-right-color: transparent;
  animation: cursor-spin 3s linear infinite;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.3s ease, height 0.3s ease,
              border-color 0.3s ease;
}

.cursor-ring.hovering {
  width: 46px;
  height: 46px;
  border-color: rgba(0, 229, 255, 0.5);
  border-top-color: var(--cyan);
  border-right-color: transparent;
}

@keyframes cursor-spin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* Bright center dot */
.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan), 0 0 12px rgba(0, 229, 255, 0.4);
  transition: transform 0.08s linear,
              width 0.2s ease, height 0.2s ease;
}

.cursor-dot.clicking {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0, 229, 255, 0.6);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
  .cursor-glow, .cursor-ring, .cursor-dot { display: none; }
}

/* Hide default cursor when custom is active */
@media (hover: hover) {
  body { cursor: none; }
  a, button, .shortcut, .mic-btn { cursor: none; }
}

/* ---------- Scanlines ---------- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.015) 2px,
    rgba(0, 229, 255, 0.015) 4px
  );
}

/* ---------- Glass Utility ---------- */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  border: 1px solid rgba(0, 229, 255, 0.1);
}

/* ---------- App Container ---------- */
.app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 0 32px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   TOP STATUS BAR
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 4px 10px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan-dim);
  user-select: none;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.72rem;
  text-shadow: var(--glow-sm);
}

.topbar__dot {
  width: 4px;
  height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: var(--glow-sm);
  animation: pulse-dot 2s ease-in-out infinite;
}

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

.topbar__badge {
  padding: 2px 8px;
  border: 1px solid var(--cyan-dim);
  border-radius: var(--radius-sm);
  font-size: 0.58rem;
  color: var(--cyan);
}

.topbar__signal {
  display: flex;
  align-items: center;
  color: var(--cyan-dim);
  transition: color var(--transition);
}

.topbar__signal.active {
  color: var(--green-ok);
  filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.5));
}

/* ============================================================
   INFO DASHBOARD (Clock, Date, Weather) — Premium Design
   ============================================================ */
.info-dash {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 8px 0;
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.12);
  background: linear-gradient(135deg, rgba(8, 18, 40, 0.2) 0%, rgba(4, 30, 45, 0.15) 50%, rgba(8, 18, 40, 0.2) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(0, 229, 255, 0.08);
}

/* Subtle animated top border glow */
.info-dash::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: dash-glow-slide 4s ease-in-out infinite;
}

/* Faint scanline overlay */
.info-dash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 229, 255, 0.012) 3px,
    rgba(0, 229, 255, 0.012) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}

@keyframes dash-glow-slide {
  0%   { transform: translateX(-25%); }
  50%  { transform: translateX(25%); }
  100% { transform: translateX(-25%); }
}

/* ---- Clock Side ---- */
.info-dash__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  min-width: 120px;
  position: relative;
  z-index: 1;
}

.info-dash__time {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
  animation: time-pulse 2s ease-in-out infinite;
}

@keyframes time-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4)); }
  50%      { filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.6)); }
}

.info-dash__date {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--cyan-dim);
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-align: center;
  opacity: 0.85;
}

/* ---- Divider ---- */
.info-dash__divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent 10%, rgba(0, 229, 255, 0.25) 30%, var(--cyan-dim) 50%, rgba(0, 229, 255, 0.25) 70%, transparent 90%);
  flex-shrink: 0;
  position: relative;
}

.info-dash__divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan), 0 0 16px rgba(0, 229, 255, 0.3);
}

/* ---- Weather Side ---- */
.info-dash__right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px 14px 16px;
  position: relative;
  z-index: 1;
}

.info-dash__weather {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-dash__weather-icon {
  font-size: 2.2rem;
  line-height: 1;
  animation: weather-float 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

@keyframes weather-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.info-dash__weather-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.info-dash__temp {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff 30%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-dash__desc {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--white-dim);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.info-dash__location {
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: var(--cyan-dim);
  letter-spacing: 0.3px;
  margin-top: 2px;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.info-dash:hover .info-dash__location {
  opacity: 1;
}

/* ============================================================
   STATUS BAR (Battery, Network, Currency)
   ============================================================ */
.status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  margin: 4px 0;
  border: 1px solid rgba(0, 229, 255, 0.08);
  background: rgba(6, 6, 14, 0.15);
}

.status-bar__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar__icon {
  font-size: 0.85rem;
}

.status-bar__value {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.5px;
}

.status-bar__sep {
  width: 1px;
  height: 16px;
  background: rgba(0, 229, 255, 0.15);
}

/* Battery color states */
.status-bar__value.battery-high { color: #00e676; }
.status-bar__value.battery-mid { color: #ffab00; }
.status-bar__value.battery-low { color: #ff1744; animation: blink-warn 1s infinite; }

@keyframes blink-warn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   MUSIC PLAYER
   ============================================================ */
.music-player {
  max-width: 350px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  margin: 2px auto 2px 0;
  border: 1px solid rgba(0, 229, 255, 0.08);
  background: rgba(6, 6, 14, 0.15);
  gap: 8px;
}

.music-player__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.music-player__icon {
  font-size: 1.3rem;
  animation: music-bounce 2s ease-in-out infinite;
}

@keyframes music-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.music-player.playing .music-player__icon {
  animation: music-bounce 0.6s ease-in-out infinite;
}

.music-player__track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.music-player__title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--white-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player__progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.music-player__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), #00e5ff);
  border-radius: 2px;
  transition: width 0.3s linear;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
}

.music-player__controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.music-player__btn {
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: none;
  padding: 0;
}

.music-player__btn:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.music-player__btn--play {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
  border-color: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.2);
}

/* ============================================================
   AI CORE VISUALIZATION
   ============================================================ */
.core {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 12px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#coreCanvas {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.core__glow {
  position: absolute;
  width: 120px;
  height: 120px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.25) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 1;
  animation: core-breathe 3s ease-in-out infinite;
}

/* Rotating rings */
.core__rings {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.core__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.core__ring--1 {
  width: 110px;
  height: 110px;
  border-color: rgba(0, 229, 255, 0.15);
  animation: ring-spin 12s linear infinite;
  border-top-color: var(--cyan);
  border-right-color: transparent;
}

.core__ring--2 {
  width: 135px;
  height: 135px;
  border-color: rgba(41, 121, 255, 0.1);
  animation: ring-spin 18s linear infinite reverse;
  border-bottom-color: var(--blue);
  border-left-color: transparent;
}

.core__ring--3 {
  width: 155px;
  height: 155px;
  border-color: rgba(0, 229, 255, 0.06);
  animation: ring-spin 25s linear infinite;
  border-top-color: rgba(0, 229, 255, 0.2);
}

.core__label {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--cyan-dim);
  z-index: 4;
  text-shadow: var(--glow-sm);
  transition: color var(--transition);
}

/* Core states */
.core.listening .core__glow {
  animation: core-breathe-fast 1s ease-in-out infinite;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.3) 0%, transparent 70%);
}

.core.listening .core__ring--1 {
  border-top-color: var(--green-ok);
  animation-duration: 4s;
}

.core.listening .core__label {
  color: var(--green-ok);
}

.core.speaking .core__glow {
  animation: core-breathe-fast 0.6s ease-in-out infinite;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.4) 0%, transparent 70%);
}

.core.speaking .core__ring--1 {
  animation-duration: 3s;
  border-top-color: var(--magenta);
}

.core.speaking .core__label {
  color: var(--cyan);
}

/* ============================================================
   WAVEFORM BAR
   ============================================================ */
.waveform-bar {
  width: 100%;
  height: 48px;
  margin: 4px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.waveform-bar.active {
  opacity: 1;
}

#waveCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   PANELS
   ============================================================ */
.panel {
  width: 100%;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 6px 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.panel:hover {
  border-color: rgba(0, 229, 255, 0.2);
}

.panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.panel__icon {
  font-size: 0.9rem;
}

.panel__title {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 2.5px;
  color: var(--cyan-dim);
  font-weight: 600;
}

.panel__text {
  font-family: var(--font-body);
  font-size: 1.0rem;
  line-height: 1.5;
  color: var(--white);
  font-weight: 400;
  min-height: 24px;
}

.panel__text--user {
  color: var(--white-dim);
  font-style: italic;
}

.panel--response {
  border-left: 2px solid var(--cyan-deep);
}

.panel--response.active {
  border-left-color: var(--cyan);
  box-shadow: -4px 0 20px rgba(0, 229, 255, 0.08);
}

.panel--speech {
  border-left: 2px solid rgba(41, 121, 255, 0.2);
}

.panel--speech.active {
  border-left-color: var(--green-ok);
  box-shadow: -4px 0 20px rgba(0, 230, 118, 0.08);
}

/* Typing cursor animation */
.panel__text .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.8s step-end infinite;
}

/* ============================================================
   SHORTCUTS
   ============================================================ */
.shortcuts {
  display: flex;
  gap: 8px;
  width: 100%;
  margin: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
  -ms-overflow-style: none;
}

.shortcuts::-webkit-scrollbar {
  display: none;
}

.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--white-dim);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 70px;
  transition: all var(--transition);
  border: 1px solid rgba(0, 229, 255, 0.08);
  background: rgba(8, 18, 40, 0.4);
}

.shortcut:hover,
.shortcut:active {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: var(--glow-sm);
  transform: translateY(-2px);
}

.shortcut__icon {
  font-size: 1.3rem;
}

.shortcut__label {
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ============================================================
   MICROPHONE BUTTON
   ============================================================ */
.mic-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
}

.mic-btn {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--glow-md), inset 0 0 20px rgba(0, 229, 255, 0.05);
}

.mic-btn__icon {
  width: 28px;
  height: 28px;
  transition: all var(--transition);
}

.mic-btn__icon--stop {
  display: none;
}

.mic-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  transform: scale(1.06);
  box-shadow: var(--glow-lg);
}

.mic-btn:active {
  transform: scale(0.96);
}

/* Listening state */
.mic-area.listening .mic-btn {
  border-color: var(--green-ok);
  color: var(--green-ok);
  background: rgba(0, 230, 118, 0.1);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.3), 0 0 60px rgba(0, 230, 118, 0.1);
  animation: mic-pulse 1.5s ease-in-out infinite;
}

.mic-area.listening .mic-btn__icon:not(.mic-btn__icon--stop) {
  display: none;
}

.mic-area.listening .mic-btn__icon--stop {
  display: block;
}

/* Ripples */
.mic-area__ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.15);
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.mic-area.listening .mic-area__ripple {
  animation: ripple-out 2s ease-out infinite;
  border-color: rgba(0, 230, 118, 0.2);
}

.mic-area.listening #micRipple2 {
  animation-delay: 0.5s;
}

.mic-area.listening #micRipple3 {
  animation-delay: 1s;
}

.mic-area__label {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--cyan-dim);
  text-transform: uppercase;
  transition: color var(--transition);
}

.mic-area.listening .mic-area__label {
  color: var(--green-ok);
}

/* ============================================================
   TEXT INPUT BAR
   ============================================================ */
.text-input {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius-full);
  margin: 8px 0 12px;
  border: 1px solid rgba(0, 229, 255, 0.15);
  background: rgba(6, 6, 14, 0.2);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.text-input:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.text-input__field {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  caret-color: var(--cyan);
}

.text-input__field::placeholder {
  color: var(--white-xdim);
  font-size: 0.78rem;
}

.text-input__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.text-input__btn:hover {
  background: rgba(0, 229, 255, 0.25);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  transform: scale(1.05);
}

.text-input__btn:active {
  transform: scale(0.95);
}

/* ============================================================
   PERMISSION MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 12, 0.85);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: 88%;
  max-width: 360px;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  border: 1px solid rgba(0, 229, 255, 0.15);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.visible .modal {
  transform: translateY(0) scale(1);
}

.modal__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  animation: float-bounce 2s ease-in-out infinite;
}

.modal__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: var(--glow-sm);
}

.modal__desc {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--white-dim);
  line-height: 1.6;
  margin-bottom: 28px;
}

.modal__btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--cyan);
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 10px;
}

.modal__btn:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: var(--glow-md);
}

.modal__btn--skip {
  border-color: var(--white-xdim);
  background: transparent;
  color: var(--white-dim);
  font-size: 0.65rem;
}

.modal__btn--skip:hover {
  border-color: var(--white-dim);
  box-shadow: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes core-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes core-breathe-fast {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%      { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@keyframes ripple-out {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}

@keyframes mic-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

@keyframes float-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-height: 680px) {
  .core {
    width: 170px;
    height: 170px;
    margin: 6px auto 4px;
  }

  .core__ring--1 { width: 125px; height: 125px; }
  .core__ring--2 { width: 148px; height: 148px; }
  .core__ring--3 { width: 168px; height: 168px; }

  .panel { padding: 10px 14px; margin: 4px 0; }
  .mic-btn { width: 62px; height: 62px; }
  .mic-area__ripple { width: 62px; height: 62px; }
}

/* ============================================================
   DESKTOP LAYOUT (monitors)
   ============================================================ */
@media (min-width: 768px) {
  html { font-size: 18px; }

  .app {
    padding: 20px 48px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }

  /* Full width items */
  .topbar,
  .panel--response,
  .dictation-panel,
  .camera-panel,
  .yt-player,
  .mic-area,
  .text-input,
  .waveform-bar,
  .music-player {
    grid-column: 1 / -1;
  }

  /* Info dash + status bar side by side */
  .info-dash { grid-column: 1; }
  .status-bar { grid-column: 2; align-self: stretch; }

  /* Core section */
  .core {
    grid-column: 1 / -1;
    width: 180px;
    height: 180px;
    margin: 8px auto;
  }
  .core__ring--1 { width: 130px; height: 130px; }
  .core__ring--2 { width: 155px; height: 155px; }
  .core__ring--3 { width: 175px; height: 175px; }

  .topbar {
    padding: 18px 12px 14px;
    font-size: 0.7rem;
    letter-spacing: 3px;
  }

  .panel {
    padding: 16px 22px;
    margin: 0;
  }

  .panel__text {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .mic-btn {
    width: 80px;
    height: 80px;
  }
  .mic-btn__icon { width: 32px; height: 32px; }
  .mic-area__ripple { width: 80px; height: 80px; }

  .text-input {
    max-width: 700px;
    margin: 12px auto;
  }

  .text-input__field {
    font-size: 1rem;
    padding: 4px 0;
  }

  .status-bar {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
  }
  .status-bar__sep { width: 100%; height: 1px; }

  .info-dash {
    padding: 16px 20px;
  }

  .info-dash__time { font-size: 2.2rem; }
  .info-dash__date { font-size: 0.8rem; }
  .info-dash__temp { font-size: 1.1rem; }

  .music-player {
    padding: 6px 10px;
    justify-self: start;
  }

  .yt-player__frame {
    max-height: 400px;
  }

  .dictation-panel__text {
    min-height: 120px;
    max-height: 300px;
    font-size: 0.95rem;
  }

  .camera-panel video {
    max-height: 400px;
    object-fit: contain;
  }
}

@media (min-width: 1200px) {
  .app {
    padding: 24px 64px 48px;
    gap: 20px;
  }

  .core {
    width: 200px;
    height: 200px;
  }
  .core__ring--1 { width: 145px; height: 145px; }
  .core__ring--2 { width: 170px; height: 170px; }
  .core__ring--3 { width: 195px; height: 195px; }

  .text-input { max-width: 800px; }

  .panel__text { font-size: 1rem; }
}

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
.app > * {
  animation: fadeInUp 0.6s ease backwards;
}

.topbar         { animation-delay: 0.0s; }
.core           { animation-delay: 0.1s; }
.waveform-bar   { animation-delay: 0.2s; }
.panel--response{ animation-delay: 0.3s; }
.mic-area       { animation-delay: 0.5s; }

/* ============================================================
   YOUTUBE PLAYER
   ============================================================ */
.yt-player {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 6px 0;
  border: 1px solid rgba(0, 229, 255, 0.1);
  background: rgba(6, 6, 14, 0.2);
  overflow: hidden;
}

.yt-player__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.yt-player__title {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  color: var(--cyan);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-player__close {
  background: none;
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: all 0.2s ease;
}

.yt-player__close:hover {
  background: rgba(255, 50, 50, 0.2);
  border-color: #ff5555;
  color: #ff5555;
}

.yt-player__frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.yt-player__frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   DICTATION PANEL
   ============================================================ */
.dictation-panel {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 6px 0;
  border: 1px solid rgba(0, 229, 255, 0.15);
  background: rgba(6, 6, 14, 0.2);
  overflow: hidden;
}

.dictation-panel__text {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--white);
  line-height: 1.6;
  outline: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
}

.dictation-panel__text:empty::before {
  content: 'Gapiring, matn shu yerda paydo bo\'ladi...';
  color: var(--white-xdim);
}

.dictation-panel__actions {
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  justify-content: flex-end;
}

/* ============================================================
   CAMERA PANEL
   ============================================================ */
.camera-panel {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 6px 0;
  border: 1px solid rgba(0, 229, 255, 0.15);
  background: rgba(6, 6, 14, 0.2);
  overflow: hidden;
}

.camera-panel video {
  display: block;
  width: 100%;
  border-radius: 0;
}

/* ============================================================
   MINI MODE (Electron - always-on-top widget)
   ============================================================ */
.mini-mode .app,
.mini-mode .video-bg,
.mini-mode #particleBg,
.mini-mode .cursor-glow,
.mini-mode .cursor-ring,
.mini-mode .cursor-dot {
  display: none !important;
}

.mini-mode {
  background: rgba(6, 6, 14, 0.95) !important;
  overflow: hidden;
  cursor: pointer;
}

.mini-mode .mini-overlay {
  display: flex !important;
}

.mini-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 9999;
  padding: 0 16px;
}

.mini-overlay__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 16px rgba(0, 229, 255, 0.3);
  animation: mini-pulse 2s ease-in-out infinite;
}

.mini-overlay__text {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--cyan);
  text-transform: uppercase;
}

.mini-overlay__status {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--white-dim);
  letter-spacing: 1px;
}

@keyframes mini-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
