/* ==========================================================================
   ✨ Gal AI VTuber Luna - Control Deck Stylesheet (Neon Cyber Gal Aesthetic) ✨
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Google Fonts & CSS Custom Properties
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800;900&family=Noto+Sans+JP:wght@400;500;700;900&family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  /* Color Palette */
  --color-bg: #0a0b16;
  --color-bg-darker: #05060d;
  --color-surface: rgba(20, 22, 40, 0.75);
  --color-surface-card: rgba(20, 22, 40, 0.85);
  --color-surface-hover: rgba(32, 38, 70, 0.85);
  --color-surface-input: rgba(12, 14, 28, 0.9);

  /* Neon Colors */
  --color-pink: #ff2a85;
  --color-pink-light: #ff66aa;
  --color-purple: #8a2be2;
  --color-purple-light: #a855f7;
  --color-cyan: #00f0ff;
  --color-cyan-light: #70f3ff;
  --color-gold: #ffd700;
  --color-gold-light: #ffe066;
  --color-red: #ff1744;
  --color-green: #00ff88;

  /* Glow Effects */
  --glow-pink: 0 0 15px rgba(255, 42, 133, 0.5), 0 0 30px rgba(255, 42, 133, 0.25);
  --glow-purple: 0 0 15px rgba(138, 43, 226, 0.45), 0 0 30px rgba(138, 43, 226, 0.2);
  --glow-cyan: 0 0 15px rgba(0, 240, 255, 0.4), 0 0 30px rgba(0, 240, 255, 0.2);
  --glow-gold: 0 0 15px rgba(255, 215, 0, 0.45), 0 0 30px rgba(255, 215, 0, 0.2);
  --glow-red: 0 0 15px rgba(255, 23, 68, 0.5), 0 0 30px rgba(255, 23, 68, 0.25);

  /* Borders */
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --border-glass-pink: 1px solid rgba(255, 42, 133, 0.35);
  --border-glass-cyan: 1px solid rgba(0, 240, 255, 0.35);
  --border-glass-purple: 1px solid rgba(138, 43, 226, 0.35);
  --border-glass-gold: 1px solid rgba(255, 215, 0, 0.4);

  /* Typography */
  --text-main: #ffffff;
  --text-sub: #cbd5e1;
  --text-muted: #8e9bb0;
  --text-pink: #ff80bf;
  --text-cyan: #70f3ff;
  --text-gold: #ffe066;

  /* Emotion Badges */
  --emotion-happy: #ff2a85;
  --emotion-teasing: #8a2be2;
  --emotion-surprised: #00f0ff;
  --emotion-embarrassed: #ff1493;
  --emotion-thinking: #f59e0b;
  --emotion-sad: #60a5fa;

  /* SuperChat Tiers */
  --sc-tier-1-border: #00f0ff;
  --sc-tier-1-bg: rgba(0, 240, 255, 0.1);
  --sc-tier-2-border: #00ff88;
  --sc-tier-2-bg: rgba(0, 255, 136, 0.1);
  --sc-tier-3-border: #ffd700;
  --sc-tier-3-bg: rgba(255, 215, 0, 0.12);
  --sc-tier-4-border: #ff1744;
  --sc-tier-4-bg: linear-gradient(135deg, rgba(255, 23, 68, 0.18), rgba(255, 42, 133, 0.18));

  /* Radii & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: 'Outfit', 'M PLUS Rounded 1c', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--color-bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   3. Cyber Background & Animated Visual Effects
   -------------------------------------------------------------------------- */
.cyber-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background: 
    radial-gradient(circle at 15% 20%, rgba(255, 42, 133, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(138, 43, 226, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 40%, rgba(0, 240, 255, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, #0a0b16 0%, #05060d 100%);
  pointer-events: none;
}

.cyber-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   4. Glassmorphism Card System
   -------------------------------------------------------------------------- */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 42, 133, 0.3);
}

/* --------------------------------------------------------------------------
   5. App Container Layout
   -------------------------------------------------------------------------- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  flex-wrap: wrap;
  gap: 16px;
  border-color: rgba(255, 42, 133, 0.35);
  box-shadow: 0 4px 24px -2px rgba(255, 42, 133, 0.18);
}

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

.brand-badge {
  background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 1.8px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: var(--glow-pink);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
}

.brand-title .sparkle {
  animation: pulse-glow 2s infinite ease-in-out;
}

.brand-subtitle {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-cyan);
  opacity: 0.85;
}

/* Status Badges Group */
.header-center {
  display: flex;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(10, 14, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  transition: all var(--transition-fast);
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

/* Status variants */
.status-badge.status-ok, .status-badge.status-online {
  border-color: rgba(0, 255, 136, 0.4);
  color: #e2e8f0;
}
.status-badge.status-ok .status-dot, .status-badge.status-online .status-dot {
  background: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
}

.status-badge.status-mock {
  border-color: rgba(0, 240, 255, 0.4);
  color: #e2e8f0;
}
.status-badge.status-mock .status-dot {
  background: var(--color-cyan);
  box-shadow: 0 0 8px var(--color-cyan);
}

.status-badge.status-ng, .status-badge.status-offline {
  border-color: rgba(255, 23, 68, 0.4);
  color: #fca5a5;
}
.status-badge.status-ng .status-dot, .status-badge.status-offline .status-dot {
  background: var(--color-red);
  box-shadow: 0 0 8px var(--color-red);
}

.status-badge.status-checking, .status-badge.status-reconnecting {
  border-color: rgba(255, 215, 0, 0.4);
  color: #fef08a;
}
.status-badge.status-checking .status-dot, .status-badge.status-reconnecting .status-dot {
  background: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold);
  animation: blink 1s infinite alternate;
}

.status-badge.status-info {
  border-color: rgba(138, 43, 226, 0.35);
  color: #e2e8f0;
}
.status-badge.status-info .status-icon {
  font-size: 0.9rem;
}

/* Header Buttons */
.btn-overlay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(138, 43, 226, 0.2));
  border: 1px solid var(--color-cyan);
  border-radius: var(--radius-md);
  color: var(--color-cyan);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.18);
}

.btn-overlay:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.3), rgba(138, 43, 226, 0.4));
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-overlay .external-icon {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   6. Main Deck 2-Column Grid Layout
   -------------------------------------------------------------------------- */
.deck-main-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   7. Left Column: Post Deck & Controls
   -------------------------------------------------------------------------- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-tag.mode-normal {
  background: rgba(0, 240, 255, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.mode-tag.mode-superchat {
  background: rgba(255, 42, 133, 0.25);
  color: #ff80bf;
  border: 1px solid var(--color-pink);
  box-shadow: var(--glow-pink);
  animation: pulse-border 1.5s infinite alternate;
}

.post-card {
  padding-bottom: 24px;
}

.cyber-input, .cyber-textarea {
  width: 100%;
  background: var(--color-surface-input);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  outline: none;
}

.cyber-input:focus, .cyber-textarea:focus {
  border-color: var(--color-pink);
  box-shadow: var(--glow-pink);
  background: rgba(16, 20, 44, 0.95);
}

.cyber-textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.5;
}

/* SuperChat Toggle Switch */
.toggle-group {
  background: rgba(10, 14, 30, 0.6);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-container {
  display: flex;
  align-items: center;
}

.toggle-text.active {
  color: #ffffff;
}

.toggle-text.right-text.active {
  color: var(--color-pink);
  text-shadow: 0 0 8px rgba(255, 42, 133, 0.6);
}

.switch {
  position: relative;
  display: inline-block;
}

.slider.round:before {
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(90deg, var(--color-pink), var(--color-purple));
  border-color: var(--color-pink);
  box-shadow: 0 0 12px rgba(255, 42, 133, 0.6);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: #ffffff;
}

.superchat-section {
  border: 1px solid rgba(255, 42, 133, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: all var(--transition-normal);
  max-height: 500px;
  opacity: 1;
}

.sc-badge {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--color-gold);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.sc-tip {
  font-size: 0.72rem;
  color: var(--text-pink);
}

.currency-symbol {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-gold);
}

.sc-amount-input {
  padding-left: 32px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-gold);
  border-color: rgba(255, 215, 0, 0.3);
}

.sc-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.sc-chip {
  background: rgba(15, 20, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-main);
  text-align: left;
}

.sc-chip .chip-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
}

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

.sc-chip:hover {
  background: rgba(30, 40, 80, 0.85);
  border-color: var(--color-gold);
  transform: translateY(-1px);
}

.sc-chip.active {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.25), rgba(255, 215, 0, 0.2));
  border-color: var(--color-gold);
  box-shadow: var(--glow-gold);
}

.sc-chip.chip-10000.active {
  border-color: var(--color-red);
  box-shadow: var(--glow-red);
}

/* Neon Send Button */
.btn-send-neon {
  position: relative;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-pink), #d90060);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--glow-pink);
  transition: all var(--transition-normal);
}

.btn-send-neon:hover {
  background: linear-gradient(135deg, #ff4d99, #ff0077);
  box-shadow: 0 0 25px rgba(255, 42, 133, 0.7), 0 0 50px rgba(255, 42, 133, 0.35);
  transform: translateY(-2px);
}

.btn-send-neon:active {
  transform: translateY(1px);
}

.btn-send-neon:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-send-neon .btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-send-neon:hover .btn-glow {
  opacity: 1;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

/* Quick Comments Card */
.quick-card {
  padding-bottom: 20px;
}

.quick-buttons-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.btn-quick {
  background: rgba(14, 19, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-sub);
  font-family: inherit;
  transition: all var(--transition-fast);
  text-align: left;
}

.btn-quick:hover {
  background: rgba(255, 42, 133, 0.18);
  border-color: var(--color-pink);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 42, 133, 0.25);
}

.btn-quick:active {
  transform: scale(0.97);
}

.btn-quick .emoji {
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   8. Right Column: Live Interaction Log Viewer
   -------------------------------------------------------------------------- */
.log-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 170px);
  min-height: 600px;
}

.log-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-count {
  background: rgba(0, 240, 255, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
}

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

.auto-scroll-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  user-select: none;
}

.auto-scroll-label input {
  display: none;
}

.auto-scroll-custom-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 14, 30, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.auto-scroll-custom-check::after {
  content: "✓";
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffffff;
  display: none;
}

.auto-scroll-label input:checked + .auto-scroll-custom-check {
  background: var(--color-cyan);
  border-color: var(--color-cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.auto-scroll-label input:checked + .auto-scroll-custom-check::after {
  display: block;
  color: #05060d;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: var(--color-red);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 23, 68, 0.35);
}

.log-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.log-timeline::-webkit-scrollbar {
  width: 7px;
}

.log-timeline::-webkit-scrollbar-track {
  background: rgba(10, 14, 30, 0.5);
  border-radius: 4px;
}

.log-timeline::-webkit-scrollbar-thumb {
  background: rgba(255, 42, 133, 0.3);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.log-timeline::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 42, 133, 0.6);
  box-shadow: 0 0 8px rgba(255, 42, 133, 0.5);
}

.timeline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 350px;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.timeline-empty .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 42, 133, 0.4));
}

.timeline-empty .empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.timeline-empty .empty-desc {
  font-size: 0.85rem;
  max-width: 360px;
  line-height: 1.5;
  color: var(--text-sub);
}

/* --------------------------------------------------------------------------
   9. Timeline Interaction Item Cards
   -------------------------------------------------------------------------- */
.interaction-item {
  background: var(--color-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.interaction-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.interaction-item.is-superchat {
  border-width: 1.5px;
}

.interaction-item.tier-1 {
  border-color: var(--sc-tier-1-border);
  background: linear-gradient(135deg, rgba(20, 22, 40, 0.9), var(--sc-tier-1-bg));
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
}

.interaction-item.tier-2 {
  border-color: var(--sc-tier-2-border);
  background: linear-gradient(135deg, rgba(20, 22, 40, 0.9), var(--sc-tier-2-bg));
  box-shadow: 0 4px 20px rgba(0, 255, 136, 0.15);
}

.interaction-item.tier-3 {
  border-color: var(--sc-tier-3-border);
  background: linear-gradient(135deg, rgba(20, 22, 40, 0.9), var(--sc-tier-3-bg));
  box-shadow: 0 4px 24px rgba(255, 215, 0, 0.2);
}

.interaction-item.tier-4 {
  border-color: var(--sc-tier-4-border);
  background: linear-gradient(135deg, rgba(20, 22, 40, 0.88), rgba(255, 23, 68, 0.2), rgba(255, 42, 133, 0.2));
  box-shadow: 0 6px 30px rgba(255, 23, 68, 0.3);
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards, pulse-border-red 2s infinite alternate;
}

.superchat-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.superchat-badge.tier-1 {
  background: rgba(0, 240, 255, 0.2);
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
}

.superchat-badge.tier-2 {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}

.superchat-badge.tier-3 {
  background: rgba(255, 215, 0, 0.2);
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}

.superchat-badge.tier-4 {
  background: linear-gradient(90deg, #ff1744, #ff2a85);
  color: #ffffff;
  border: 1px solid var(--color-red);
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.5);
}

.interaction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
}

.item-timestamp {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.user-message-body {
  font-size: 0.94rem;
  color: var(--text-main);
  padding: 8px 12px;
  background: rgba(10, 14, 30, 0.5);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-cyan);
  word-break: break-word;
  white-space: pre-wrap;
}

/* Luna Reply Box (Neon Speech Bubble) */
.luna-reply-box {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.08), rgba(138, 43, 226, 0.08));
  border: 1px solid rgba(255, 42, 133, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.luna-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.luna-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.luna-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-pink);
  display: flex;
  align-items: center;
  gap: 4px;
}

.emotion-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: capitalize;
}

.emotion-badge.happy {
  background: rgba(255, 42, 133, 0.2);
  color: #ff80bf;
  border: 1px solid var(--color-pink);
}

.emotion-badge.teasing {
  background: rgba(138, 43, 226, 0.2);
  color: #c084fc;
  border: 1px solid var(--color-purple);
}

.emotion-badge.surprised {
  background: rgba(0, 240, 255, 0.2);
  color: var(--color-cyan);
  border: 1px solid var(--color-cyan);
}

.emotion-badge.embarrassed {
  background: rgba(255, 20, 147, 0.2);
  color: #fb7185;
  border: 1px solid #ff1493;
}

.emotion-badge.thinking {
  background: rgba(245, 158, 11, 0.2);
  color: #fde047;
  border: 1px solid var(--emotion-thinking);
}

.emotion-badge.sad {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  border: 1px solid var(--emotion-sad);
}

.btn-audio-play {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-full);
  color: var(--color-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-audio-play:hover {
  background: rgba(0, 240, 255, 0.25);
  border-color: var(--color-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.luna-reply-text {
  font-size: 0.94rem;
  color: #ffffff;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   10. Toast Notification System
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  background: rgba(15, 20, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all var(--transition-fast);
}

.toast.hiding {
  opacity: 0;
  transform: translateX(100%);
}

.toast-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffffff;
}

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

.toast-success {
  border-color: var(--color-pink);
  box-shadow: var(--glow-pink);
}

.toast-warning {
  border-color: var(--color-gold);
  box-shadow: var(--glow-gold);
}

.toast-error {
  border-color: var(--color-red);
  box-shadow: var(--glow-red);
}

.toast-info {
  border-color: var(--color-cyan);
  box-shadow: var(--glow-cyan);
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.deck-footer {
  text-align: center;
  padding: 12px 0 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   12. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255, 42, 133, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 12px var(--color-pink));
  }
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 6px rgba(255, 42, 133, 0.4);
  }
  100% {
    box-shadow: 0 0 16px var(--color-pink);
  }
}

@keyframes pulse-border-red {
  0% {
    box-shadow: 0 0 8px rgba(255, 23, 68, 0.4);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.7);
  }
}

@keyframes blink {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}

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

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
