/* ==========================================================================
   Azure AI Talking Avatar & Real-Time Speech Translator - Stylesheet
   Modern Glassmorphic Dark UI
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-app: #070b12;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(22, 33, 62, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-glow: rgba(79, 172, 254, 0.35);

  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --grad-accent: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --grad-dark: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(7, 11, 18, 0.95) 100%);

  /* Text colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Fonts */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: floatOrb 16s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, var(--accent-blue) 0%, rgba(99, 102, 241, 0) 70%);
}

.orb-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, var(--accent-purple) 0%, rgba(236, 72, 153, 0) 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  top: 40%;
  left: 45%;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(16, 185, 129, 0) 70%);
  animation-delay: -10s;
  opacity: 0.15;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(7, 11, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #031124;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

/* Status Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
}

.status-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.status-pill.status-live .status-dot {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.status-pill.status-live {
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.status-pill.status-demo {
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

/* Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--bg-card-border-glow);
  transform: translateY(-1px);
}

/* Main Layout: 2 Columns */
.app-main {
  position: relative;
  z-index: 10;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

/* Left Column: Avatar Section */
.avatar-section {
  display: flex;
  flex-direction: column;
}

.avatar-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #030712;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#avatarVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback avatar preview */
.avatar-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #172554 0%, #030712 100%);
  overflow: hidden;
}

.avatar-fallback.active {
  display: flex;
}

.avatar-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Lip sync ripple effects during mock or speaking */
.lip-sync-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lip-sync-overlay.speaking {
  opacity: 1;
}

.voice-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: rippleGlow 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.voice-ripple.r2 {
  animation-delay: -0.6s;
  border-color: var(--accent-indigo);
}

.voice-ripple.r3 {
  animation-delay: -1.2s;
  border-color: var(--accent-pink);
}

@keyframes rippleGlow {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Video Overlay Elements */
.video-overlay-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.avatar-meta-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card-border);
  font-size: 0.8rem;
}

.avatar-name {
  font-weight: 600;
  color: #ffffff;
}

.avatar-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: rgba(79, 172, 254, 0.2);
  color: var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.avatar-state-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card-border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.avatar-state-tag.speaking {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

.avatar-state-tag.speaking .pulse-ring {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.pulse-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

/* Subtitle / Caption Bar */
.video-caption-bar {
  position: absolute;
  bottom: 3.5rem;
  left: 1rem;
  right: 1rem;
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(12px);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: var(--transition-base);
}

.caption-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.caption-text {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 500;
  line-height: 1.4;
}

.video-overlay-bottom {
  position: absolute;
  bottom: 0.85rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.control-btn-mini {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.control-btn-mini:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Quick Avatar Selector Bar */
.avatar-quick-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem 0.25rem 0.5rem;
}

.selector-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.avatar-thumbnails {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.thumb-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.thumb-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 172, 254, 0.4);
}

.thumb-card.active {
  background: rgba(79, 172, 254, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.thumb-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.thumb-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Right Column: Translation & Control Section */
.translation-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Language Selection Card */
.language-bar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

.lang-selector-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.lang-select {
  width: 100%;
  background: rgba(7, 11, 18, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.lang-swap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-blue);
  margin-top: 1rem;
}

/* Audio Visualizer Card */
.audio-visualizer-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.visualizer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.viz-title {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.viz-status {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.viz-status.active {
  color: var(--accent-emerald);
}

.viz-canvas {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-sm);
  background: rgba(3, 7, 18, 0.5);
}

/* Transcript Cards (Source & Target) */
.transcript-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 140px;
  transition: var(--transition-fast);
}

.transcript-card.source-card {
  border-left: 3px solid var(--accent-blue);
}

.transcript-card.target-card {
  border-left: 3px solid var(--accent-cyan);
  background: rgba(14, 28, 55, 0.65);
}

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

.transcript-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot-source {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

.dot-target {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-code-pill {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.lang-code-pill.target {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
}

.btn-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.transcript-body {
  flex: 1;
}

.transcript-content {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  word-break: break-word;
}

.transcript-content.target {
  font-size: 1.05rem;
  font-weight: 500;
  color: #f1f5f9;
}

.transcript-content.placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* Action Control Deck */
.action-deck {
  display: flex;
  gap: 1rem;
}

.btn-primary-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.1rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  background: var(--grad-primary);
  color: #031124;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 242, 254, 0.5);
}

.btn-primary-action.active {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  box-shadow: 0 4px 25px rgba(244, 63, 94, 0.4);
  color: #ffffff;
}

.btn-primary-action.active:hover {
  box-shadow: 0 8px 35px rgba(244, 63, 94, 0.6);
}

.btn-mic-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--bg-card-border-glow);
  transform: translateY(-2px);
}

/* Modals & Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-panel {
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-panel-lg {
  max-width: 750px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-card-border);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

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

/* Form Controls in Modal */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-select, .form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-half {
  flex: 1;
}

.form-range {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.avatar-card-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-card-border);
  cursor: pointer;
  transition: var(--transition-fast);
}

.avatar-card-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(79, 172, 254, 0.3);
}

.avatar-card-option.selected {
  background: rgba(79, 172, 254, 0.15);
  border-color: var(--accent-cyan);
}

.avatar-card-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-card-info {
  display: flex;
  flex-direction: column;
}

.avatar-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.avatar-card-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.background-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.bg-preset-btn {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.bg-preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bg-preset-btn.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.12);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.color-input {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
}

/* Azure info card in modal */
.azure-info-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.info-label {
  color: var(--text-secondary);
}

.info-value {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-primary);
}

.notice-box {
  background: rgba(79, 172, 254, 0.08);
  border: 1px solid rgba(79, 172, 254, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.notice-box h4 {
  font-size: 0.9rem;
  color: var(--accent-cyan);
}

.notice-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.code-box {
  background: #030712;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  overflow-x: auto;
}

.notice-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--bg-card-border);
  display: flex;
  justify-content: flex-end;
}

.btn-primary-modal {
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  color: #031124;
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary-modal:hover {
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.4);
}

/* FAQ Modal Content */
.faq-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item h3 {
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.faq-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.faq-item ul {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.faq-highlight {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--accent-indigo);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-main {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
}

@media (max-width: 640px) {
  .app-header {
    padding: 0.85rem 1rem;
  }
  .brand-subtitle {
    display: none;
  }
  .action-deck {
    flex-direction: column;
  }
  .language-bar-card {
    flex-direction: column;
    align-items: stretch;
  }
  .lang-swap-icon {
    align-self: center;
    margin-top: 0;
  }
  .avatar-grid, .background-grid {
    grid-template-columns: 1fr;
  }
}

/* Session Timer Pill */
.status-pill.status-timer {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.1);
  color: #c7d2fe;
  font-family: var(--font-mono);
}

.status-pill.status-timer .timer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-indigo);
  box-shadow: 0 0 8px var(--accent-indigo);
}

.status-pill.status-timer.warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.15);
  color: #fde68a;
}

.status-pill.status-timer.warning .timer-dot {
  background-color: var(--accent-amber);
  box-shadow: 0 0 10px var(--accent-amber);
  animation: pulseWarning 1s infinite alternate;
}

@keyframes pulseWarning {
  from { transform: scale(0.8); opacity: 0.6; }
  to { transform: scale(1.3); opacity: 1; }
}

.timer-max {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #0f172a;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: #ffffff;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast-warning {
  border-left: 4px solid var(--accent-amber);
}

.toast.toast-danger {
  border-left: 4px solid var(--accent-rose);
}

.toast.toast-success {
  border-left: 4px solid var(--accent-emerald);
}

.toast.toast-info {
  border-left: 4px solid var(--accent-cyan);
}

.toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.toast-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@keyframes slideInToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

