/* 
  Half World Scientax RPG Asset Editor - Central Stylesheet
  Curated Retro-Modern Dark Theme & Premium Layout
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Press+Start+2P&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* Color Tokens */
  --bg-primary: #070715;
  --bg-secondary: #0c0c26;
  --bg-panel: rgba(13, 13, 38, 0.75);
  --bg-panel-hover: rgba(22, 22, 58, 0.85);
  
  --border-color: rgba(251, 191, 36, 0.2);
  --border-color-hover: rgba(251, 191, 36, 0.5);
  --border-glow: 0 0 10px rgba(251, 191, 36, 0.15);
  
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #6b7280;
  
  --gold: #fbbf24;
  --gold-glow: 0 0 12px rgba(251, 191, 36, 0.4);
  --purple: #8b5cf6;
  --purple-glow: 0 0 12px rgba(139, 92, 246, 0.4);
  --cyan: #06b6d4;
  --cyan-glow: 0 0 12px rgba(6, 182, 212, 0.4);
  --red: #ef4444;
  --red-glow: 0 0 12px rgba(239, 68, 68, 0.4);
  --green: #10b981;
  --green-glow: 0 0 12px rgba(16, 185, 129, 0.4);
  
  /* Fonts */
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --font-retro: 'Press Start 2P', monospace;
  --font-mono: 'Fira Code', monospace;
  
  /* Shadows & Radius */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Grid sizes */
  --pixel-size: 10px;
}

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

body {
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 70%, #020207 100%);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* Header */
header {
  background: rgba(7, 7, 21, 0.85);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5), 0 0 10px rgba(251, 191, 36, 0.1);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  flex-shrink: 0;
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
  filter: drop-shadow(var(--gold-glow));
  animation: float 3s ease-in-out infinite;
}

.logo-text h1 {
  font-family: var(--font-retro);
  font-size: 16px;
  color: var(--gold);
  text-shadow: var(--gold-glow);
  letter-spacing: 1px;
}

.logo-text p {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* Layout container */
.app-container {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Left Sidebar - Navigation & Item list */
.sidebar {
  width: 280px;
  border-right: 1px solid var(--border-color);
  background: rgba(7, 7, 21, 0.5);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cat-tab {
  background: var(--bg-primary);
  border: none;
  padding: 10px 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cat-tab svg {
  width: 16px;
  height: 16px;
}

.cat-tab:hover {
  background: rgba(22, 22, 58, 0.5);
  color: var(--text-primary);
}

.cat-tab.active {
  background: var(--bg-panel);
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.3);
}

.list-header {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--border-glow);
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.btn-add-new {
  width: 100%;
  padding: 8px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px dashed var(--gold);
  color: var(--gold);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-add-new:hover {
  background: rgba(251, 191, 36, 0.2);
  transform: translateY(-1px);
}

.asset-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.asset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(13, 13, 38, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.asset-item:hover {
  border-color: var(--border-color-hover);
  background: rgba(13, 13, 38, 0.5);
  transform: translateX(2px);
}

.asset-item.active {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.05);
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.05);
}

.asset-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  box-shadow: var(--gold-glow);
}

.asset-item-thumb {
  width: 32px;
  height: 32px;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  image-rendering: pixelated;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-item-thumb svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.asset-item-info {
  flex: 1;
  min-width: 0;
}

.asset-item-name {
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-item-meta {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-delete-asset {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  padding: 4px;
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
}

.asset-item:hover .btn-delete-asset {
  opacity: 1;
}

.btn-delete-asset:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fff;
}

/* Center Panel - The Editor Form */
.editor-panel {
  flex: 1;
  border-right: 1px solid var(--border-color);
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(7, 7, 21, 0.3);
}

.editor-title h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.editor-title p {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 2px;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.editor-section {
  background: rgba(7, 7, 21, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.editor-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--cyan);
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-grid.stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group.full-width-3 {
  grid-column: span 3;
}

label {
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  width: 100%;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: var(--cyan-glow);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* Stats Slider custom group */
.stat-slider-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.stat-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
}

.stat-slider-val {
  color: var(--gold);
  font-weight: bold;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: var(--gold-glow);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Multi-select checklist for ingredients & drops */
.checklist-container {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: 6px;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-size: 12px;
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.checklist-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checklist-qty-input {
  width: 50px !important;
  padding: 2px 4px !important;
  font-size: 11px !important;
  text-align: center;
}

.checklist-pct-input {
  width: 65px !important;
  padding: 2px 4px !important;
  font-size: 11px !important;
  text-align: center;
}

/* Right Panel - Pixel Art Editor */
.pixel-editor {
  width: 380px;
  background: rgba(7, 7, 21, 0.45);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
}

.editor-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pixel-editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Grid drawing canvas container */
.canvas-outer {
  background: #000;
  border: 4px double var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), var(--border-glow);
  padding: 4px;
  width: 264px;
  height: 264px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  grid-template-rows: repeat(32, 1fr);
  width: 248px;
  height: 248px;
  background: #111;
  cursor: crosshair;
  user-select: none;
}

.pixel {
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-sizing: border-box;
}

/* Tools bar */
.editor-tools {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: center;
}

.tool-btn {
  background: rgba(13, 13, 38, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-color-hover);
  background: rgba(22, 22, 58, 0.8);
}

.tool-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: var(--gold-glow);
}

.tool-btn svg {
  width: 18px;
  height: 18px;
}

/* Color palettes */
.palette-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.palette-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 100%;
}

.swatch {
  height: 24px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.1s ease;
}

.swatch:hover {
  transform: scale(1.1);
  border-color: #fff;
}

.swatch.active {
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.custom-color-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px;
  border-radius: var(--radius-sm);
}

.custom-color-picker input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
}

.custom-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.custom-color-picker input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

/* Image Drop Zone & Loader */
.image-uploader-zone {
  width: 100%;
  border: 1px dashed var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  color: var(--text-muted);
}

.image-uploader-zone:hover {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.05);
  color: var(--text-primary);
}

.image-uploader-zone svg {
  width: 16px;
  height: 16px;
  margin-bottom: 4px;
  color: var(--gold);
}

/* Presets Library */
.presets-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.preset-card {
  aspect-ratio: 1;
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 4px;
}

.preset-card:hover {
  border-color: var(--gold);
  background: rgba(13, 13, 38, 0.6);
  transform: translateY(-1px);
}

.preset-card span {
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 4px;
}

.preset-card canvas {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

.btn-primary:hover {
  background: #fcd34d;
  box-shadow: var(--gold-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(13, 13, 38, 0.8);
  border-color: var(--border-color);
  color: var(--gold);
}

.btn-secondary:hover {
  background: rgba(22, 22, 58, 0.9);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
  color: var(--red);
}

.btn-danger:hover {
  background: var(--red);
  color: #fff;
  box-shadow: var(--red-glow);
  transform: translateY(-1px);
}

/* Modal Overlay & Integration Hub */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-content {
  background: #0d0d26;
  border: 2px solid var(--gold);
  box-shadow: var(--gold-glow), var(--shadow-glass);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.code-container {
  background: #03030a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
}

.code-container pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 250px;
}

.btn-copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(13, 13, 38, 0.8);
  border: 1px solid var(--border-color);
  color: var(--gold);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-code:hover {
  background: var(--gold);
  color: #000;
}

.integration-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(139, 92, 246, 0.05);
  border-left: 3px solid var(--purple);
  padding: 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: rgba(13, 13, 38, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  color: #fff;
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: var(--green);
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.1);
}

.toast-success svg {
  color: var(--green);
}

.toast-error {
  border-color: var(--red);
  box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.1);
}

.toast-error svg {
  color: var(--red);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.pulse-glow {
  animation: pulse 2s infinite;
}

/* Server Integration Status Indicator */
.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}

.server-status.connected {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}

.server-status.disconnected {
  color: var(--text-muted);
  border-color: rgba(156, 163, 175, 0.2);
  background: rgba(156, 163, 175, 0.05);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.connected {
  background: var(--green);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  animation: pulse-green 2s infinite;
}

.status-dot.disconnected {
  background: var(--text-muted);
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}



/* === EXPORT GAME DATA BUTTON === */
.btn-export-game {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: 1px solid #f59e0b;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  animation: export-glow 3s ease-in-out infinite;
}
.btn-export-game:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
@keyframes export-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.5); }
}

/* === EXPORT GAME DATA MODAL === */
.export-modal-content {
  max-width: 640px;
  width: 90vw;
}
.export-modal-body {
  padding: 0 20px 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Status Banner */
.export-status-banner {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.export-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.export-status-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.export-status-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Warning Banner */
.export-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #fca5a5;
  font-size: 0.9rem;
  line-height: 1.5;
}
.export-warning strong {
  color: #fbbf24;
}

/* Instructions */
.export-instructions {
  margin-bottom: 20px;
}
.export-instructions h4 {
  color: var(--accent);
  margin: 0 0 10px;
  font-size: 1rem;
}
.export-instructions ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.8;
}
.export-instructions li strong {
  color: var(--text-primary);
}
.export-instructions code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: #fbbf24;
}

/* Download Cards */
.export-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.export-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s;
}
.export-card:hover {
  border-color: var(--text-muted);
}
.export-card-primary {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(217, 119, 6, 0.05));
}
.export-card-primary:hover {
  border-color: #f59e0b;
}
.export-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.export-card-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.export-card-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.export-card-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}
.export-card-badge-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}
.export-card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 10px;
}
.export-card-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

/* Download Buttons */
.btn-export-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-export-download:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-export-download-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-export-download-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Tip Box */
.export-tip {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}
.export-tip strong {
  color: var(--text-primary);
}
.export-tip code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: #60a5fa;
}
