@import url('https://fonts.googleapis.com/css2?family=Tilt+Warp&display=swap');

:root {
  --nintendo-red: #E60012;
  --nintendo-red-dark: #C40010;
  --nintendo-blue: #0068D7;
  --nintendo-yellow: #FFD200;
  --nintendo-green: #00B83C;
  --nintendo-pink: #FF6B9D;
  --wonder-black: #1e281e;
  --wonder-yellow: #ffd200;
  --wonder-red: #e62d1e;
  --wonder-pink: #ff3d9e;
  --wonder-beige: #fffdf2;
  --wonder-blue: #004081;
  --wonder-bright-blue: #81e8ff;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --bg-surface: rgba(30, 42, 74, 0.92);
  --bg-surface-solid: #1e2a4a;
  --text-primary: #ffffff;
  --text-secondary: #b0b8d1;
  --text-accent: #FFD700;
  --border-color: rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 20px rgba(230, 0, 18, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-wonder: 3px 5px 0 2px var(--wonder-black);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 15px;
  --radius-xl: 28px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Tilt Warp', sans-serif;
  --font-game: 'Courier New', monospace;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--wonder-black);
  background-image: url('/assets/hero-header-layer-1-large-up-2x.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--text-primary);
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: layout style;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite ease-in-out;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.game-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--wonder-red), #c41a0e);
  border-bottom: 4px solid var(--wonder-black);
  box-shadow: 0 4px 0 0 var(--wonder-black);
  flex-shrink: 0;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
  animation: logoPulse 2s ease-in-out infinite;
}

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

.logo-text {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 var(--wonder-black);
  color: var(--wonder-yellow);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--wonder-black);
  border-radius: 50%;
  background: var(--wonder-yellow);
  color: var(--wonder-black);
  cursor: pointer;
  transition: var(--transition-normal);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.icon-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 5px 0 2px var(--wonder-black);
}

.icon-btn:active {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 0 var(--wonder-black);
}

.icon-btn.locked {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.game-main {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.character-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}

.character-avatar {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 4px;
}

.avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 210, 0, 0.4));
}

.avatar-img.glow {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.7; }
}

.avatar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--wonder-yellow);
  opacity: 0;
  animation: avatarPulse 2.5s ease-out infinite;
}

@keyframes avatarPulse {
  0% { width: 100px; height: 100px; opacity: 0.6; }
  100% { width: 140px; height: 140px; opacity: 0; }
}

.character-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--wonder-yellow);
  text-shadow: 1px 1px 0 var(--wonder-black), 0 0 10px rgba(255, 210, 0, 0.3);
}

.character-status {
  font-size: 12px;
  color: var(--wonder-beige);
  margin-top: 2px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.character-status.speaking {
  color: var(--nintendo-green);
  animation: statusBlink 1s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dialogue-panel {
  flex-shrink: 0;
  padding: 0 16px 10px;
}

.dialogue-box {
  position: relative;
  background: var(--wonder-beige);
  border: 4px solid var(--wonder-black);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  min-height: 56px;
  box-shadow: var(--shadow-wonder);
}

.dialogue-box::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid var(--wonder-black);
}

.dialogue-indicator {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nintendo-green);
  box-shadow: 0 0 8px var(--nintendo-green);
  animation: indicatorPulse 1.5s ease-in-out infinite;
}

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

.dialogue-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--wonder-black);
  word-break: break-word;
}

.dialogue-text .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--wonder-red);
  margin-left: 2px;
  animation: cursorBlink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.history-panel {
  flex: 1;
  overflow: hidden;
  padding: 0 16px 8px;
  position: relative;
  contain: layout style;
}

.history-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(26, 26, 46, 0.8), transparent);
  z-index: 2;
  pointer-events: none;
}

.history-scroll {
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.history-scroll::-webkit-scrollbar {
  width: 4px;
}

.history-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.history-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: historySlideIn 0.4s var(--transition-bounce);
  flex-shrink: 0;
}

@keyframes historySlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.history-item.user {
  flex-direction: row-reverse;
}

.history-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.history-item.user .history-avatar {
  background: var(--wonder-blue);
  border: 2px solid var(--wonder-black);
}

.history-item.bot .history-avatar {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: 0;
}

.history-item.bot .history-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.history-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.history-item.user .history-bubble {
  background: var(--wonder-blue);
  color: white;
  border: 3px solid var(--wonder-black);
  border-bottom-right-radius: 4px;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.history-item.bot .history-bubble {
  background: var(--wonder-beige);
  color: var(--wonder-black);
  border: 3px solid var(--wonder-black);
  border-bottom-left-radius: 4px;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.history-bubble-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 75%;
}

.history-bubble-wrapper .history-bubble {
  max-width: none;
  flex: 1;
}

.replay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 3px solid var(--wonder-black);
  border-radius: 50%;
  background: var(--wonder-yellow);
  color: var(--wonder-black);
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition-fast);
  box-shadow: 1px 2px 0 1px var(--wonder-black);
}

.replay-btn:hover {
  background: var(--wonder-pink);
  color: white;
  border-color: var(--wonder-black);
  transform: translate(-1px, -1px);
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.replay-btn:active {
  transform: translate(1px, 2px);
  box-shadow: 0 0 0 0 var(--wonder-black);
}

.input-bar {
  position: relative;
  z-index: 10;
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: rgba(22, 33, 62, 0.95);
  border-top: 4px solid var(--wonder-black);
  flex-shrink: 0;
}

.input-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--wonder-beige);
  border: 3px solid var(--wonder-black);
  border-radius: var(--radius-xl);
  padding: 4px 4px 4px 16px;
  transition: var(--transition-normal);
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.input-wrapper:focus-within {
  border-color: var(--wonder-pink);
  box-shadow: 2px 3px 0 1px var(--wonder-black), 0 0 0 3px rgba(255, 61, 158, 0.2);
}

.text-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--wonder-black);
  font-size: 15px;
  line-height: 1.5;
  padding: 8px 0;
  resize: none;
  outline: none;
  font-family: var(--font-main);
  max-height: 100px;
  overflow-y: auto;
}

.text-input::placeholder {
  color: rgba(30, 40, 30, 0.4);
}

.voice-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--wonder-blue);
  color: white;
  border: 2px solid var(--wonder-black);
}

.voice-btn.recording {
  background: var(--wonder-red);
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 2px 3px 0 1px var(--wonder-black), 0 0 0 0 rgba(230, 0, 18, 0.4); }
  50% { box-shadow: 2px 3px 0 1px var(--wonder-black), 0 0 0 8px rgba(230, 0, 18, 0); }
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 3px solid var(--wonder-black);
  border-radius: 50%;
  background: var(--wonder-yellow);
  color: var(--wonder-black);
  cursor: pointer;
  transition: var(--transition-normal);
  flex-shrink: 0;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
  -webkit-tap-highlight-color: transparent;
}

.send-btn:hover {
  background: #f5a200;
  transform: translate(-1px, -1px);
  box-shadow: 3px 5px 0 2px var(--wonder-black);
}

.send-btn:active {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 0 var(--wonder-black);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.voice-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 0;
}

.voice-indicator.active {
  display: flex;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.voice-wave span {
  display: block;
  width: 3px;
  height: 8px;
  background: var(--wonder-red);
  border-radius: 2px;
  animation: voiceWave 0.8s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; }
.voice-wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes voiceWave {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

.voice-text {
  font-size: 13px;
  color: var(--wonder-red);
  font-weight: 600;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.settings-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: calc(100% - 32px);
  max-width: 420px;
  max-height: 85vh;
  background: var(--wonder-beige);
  border: 4px solid var(--wonder-black);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 4px 6px 0 2px var(--wonder-black);
  animation: modalSlideUp 0.4s var(--transition-bounce);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--wonder-red), #c41a0e);
  border-bottom: 4px solid var(--wonder-black);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--wonder-yellow);
  text-shadow: 2px 2px 0 var(--wonder-black);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
  color: var(--wonder-black);
}

.setting-group {
  margin-bottom: 16px;
}

.setting-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wonder-black);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setting-input,
.setting-select {
  width: 100%;
  padding: 10px 14px;
  background: white;
  border: 3px solid var(--wonder-black);
  border-radius: var(--radius-sm);
  color: var(--wonder-black);
  font-size: 14px;
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition-fast);
  box-shadow: 2px 3px 0 1px rgba(30, 40, 30, 0.15);
}

.setting-input:focus,
.setting-select:focus {
  border-color: var(--wonder-pink);
  box-shadow: 2px 3px 0 1px rgba(30, 40, 30, 0.15), 0 0 0 3px rgba(255, 61, 158, 0.15);
}

.setting-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231e281e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.setting-hint {
  font-size: 11px;
  color: rgba(30, 40, 30, 0.5);
  margin-top: 4px;
}

.save-btn {
  width: 100%;
  padding: 12px;
  border: 3px solid var(--wonder-black);
  border-radius: var(--radius-sm);
  background: var(--wonder-yellow);
  color: var(--wonder-black);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-normal);
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.save-btn:hover {
  background: #f5a200;
  transform: translate(-1px, -1px);
  box-shadow: 3px 5px 0 2px var(--wonder-black);
}

.save-btn:active {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 0 var(--wonder-black);
}

.test-btn {
  width: 100%;
  padding: 10px;
  border: 3px solid var(--wonder-black);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--wonder-black);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.test-btn:hover {
  background: var(--wonder-bright-blue);
  transform: translate(-1px, -1px);
  box-shadow: 3px 5px 0 2px var(--wonder-black);
}

.test-btn:active {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 0 var(--wonder-black);
}

.test-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  display: flex;
  gap: 6px;
}

.spinner-block {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--wonder-yellow);
  border: 2px solid var(--wonder-black);
  animation: spinnerBounce 1.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

@keyframes spinnerBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.loading-text {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--wonder-beige);
  font-weight: 600;
  text-shadow: 1px 1px 0 var(--wonder-black);
}

.toast-container {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  padding: 12px 16px;
  border: 3px solid var(--wonder-black);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  animation: toastIn 0.4s var(--transition-bounce);
  pointer-events: auto;
  box-shadow: 2px 3px 0 1px var(--wonder-black);
}

.toast.error {
  background: var(--wonder-red);
  color: white;
}

.toast.success {
  background: var(--nintendo-green);
  color: white;
}

.toast.info {
  background: var(--wonder-blue);
  color: white;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

@media (min-width: 481px) {
  #app {
    border-left: 4px solid var(--wonder-black);
    border-right: 4px solid var(--wonder-black);
  }
}

@media (max-width: 360px) {
  .character-avatar {
    width: 80px;
    height: 80px;
  }
  .avatar-ring {
    width: 80px;
    height: 80px;
  }
  .logo-text {
    font-size: 17px;
  }
}

.dialogue-box.speaking {
  border-color: var(--nintendo-green);
  box-shadow: 3px 5px 0 2px var(--nintendo-green);
}

.dialogue-box.speaking .dialogue-indicator {
  background: var(--wonder-yellow);
  box-shadow: 0 0 8px var(--wonder-yellow);
}

.character-avatar.speaking .avatar-ring {
  animation: speakBounce 0.6s ease-in-out infinite;
}

@keyframes speakBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.send-btn.ready {
  animation: sendReady 1.5s ease-in-out infinite;
}

@keyframes sendReady {
  0%, 100% { box-shadow: 2px 3px 0 1px var(--wonder-black); }
  50% { box-shadow: 2px 3px 0 1px var(--wonder-black), 0 0 16px rgba(255, 210, 0, 0.5); }
}

.history-bubble:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

.input-bar::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(22, 33, 62, 0.95), transparent);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
