:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-subtle: #30363d;
  --border-accent: #58a6ff;
  --accent-cyan: #38bdf8;
  --accent-blue: #58a6ff;
  --accent-gold: #e3b341;
  --accent-gold-glow: #fbbf24;
  --text-main: #e6edf3;
  --text-muted: #8b949e;
  --badge-green: #238636;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

.preview-notice {
  position: relative;
  z-index: 60;
  padding: 14px 24px;
  background: #fff3cd;
  color: #302500;
  text-align: center;
  font: 600 15px system-ui, sans-serif;
}

/* Glassmorphism & Borders */
.glass-panel {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.glass-panel:hover {
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.accent-border-gold {
  border-top: 3px solid var(--accent-gold);
}

.accent-border-blue {
  border-top: 3px solid var(--accent-blue);
}

.accent-border-cyan {
  border-top: 3px solid var(--accent-cyan);
}

/* Kiu Architectural Orb Animations */
.kiu-orb-container {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kiu-halo {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(13, 17, 23, 0) 70%);
  animation: kiu-pulse 4s ease-in-out infinite;
}

.kiu-ring-1 {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 1.5px dashed rgba(56, 189, 248, 0.4);
  animation: kiu-spin 20s linear infinite;
}

.kiu-ring-2 {
  position: absolute;
  width: 85px;
  height: 85px;
  border-radius: 50%;
  border: 1px solid rgba(88, 166, 255, 0.6);
  border-top-color: var(--accent-gold);
  animation: kiu-spin-reverse 12s linear infinite;
}

.kiu-core {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #7dd3fc 0%, #0284c7 60%, #0369a1 100%);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.8), 0 0 40px rgba(14, 165, 233, 0.4);
  animation: kiu-breathe 4s ease-in-out infinite;
}

.kiu-orb-container.is-speaking .kiu-ring-1 {
  border-style: solid;
  animation-duration: 1.2s;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.7));
}

.kiu-orb-container.word-beat .kiu-ring-2 {
  border-top-color: var(--accent-cyan);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
}

@keyframes kiu-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

@keyframes kiu-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes kiu-spin-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

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

@media (prefers-reduced-motion: reduce) {
  .kiu-halo,
  .kiu-ring-1,
  .kiu-ring-2,
  .kiu-core {
    animation: none !important;
  }
}

/* File Drop Zone */
.dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: 8px;
  background: rgba(13, 17, 23, 0.6);
  transition: all 0.25s ease;
}

.dropzone.dragover {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.08);
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
