:root {
  --bg-dark: #0a0e17;
  --bg-card: rgba(21, 28, 44, 0.7);
  --bg-card-hover: rgba(30, 41, 65, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 229, 255, 0.4);
  
  --primary-glow: #00e5ff;
  --primary-accent: #3b82f6;
  --secondary-accent: #8b5cf6;
  --success-accent: #10b981;
  --warning-accent: #f59e0b;
  --purple-glow: #a855f7;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --shadow-glow: 0 0 25px rgba(0, 229, 255, 0.15);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

/* CRITICAL: Global hidden utility */
.hidden {
  display: none !important;
}

/* Tab view sections: block layout, takes full available vertical space */
.view-section {
  display: block;
  width: 100%;
  min-height: calc(100vh - 160px);
}

/* World planner view needs flex to let studio-container fill height */
#view-world.view-section {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 160px);
}

#view-world.view-section .world-studio-container {
  flex: 1;
  min-height: 580px;
}

body {
  background-color: var(--bg-dark);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  padding: 2rem 1.5rem;
  line-height: 1.5;
  transition: background 0.4s ease;
}

/* Weather Sky Background Themes */
body.sky-default {
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 40%);
}

body.sky-sunset { background-image: linear-gradient(180deg, #2d142c 0%, #510a32 40%, #801336 70%, #ee4540 100%); }
body.sky-night { background-image: radial-gradient(circle at 50% 10%, #1e1b4b 0%, #0f172a 60%, #020617 100%); }
body.sky-rain { background-image: linear-gradient(180deg, #1e293b 0%, #0f172a 100%); }
body.sky-mars { background-image: linear-gradient(180deg, #450a0a 0%, #7f1d1d 60%, #991b1b 100%); }
body.sky-undersea { background-image: linear-gradient(180deg, #064e3b 0%, #022c22 60%, #020617 100%); }
body.sky-spooky { background-image: linear-gradient(180deg, #3b0764 0%, #1e1b4b 60%, #09090b 100%); }
body.sky-warp { background-image: radial-gradient(circle at 50% 50%, #4c1d95 0%, #0f172a 70%, #020617 100%); }

.app-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header */
.app-header {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.brand-icon {
  font-size: 2.75rem;
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.accent-text {
  background: linear-gradient(135deg, var(--primary-glow), #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 0.2rem;
}

.header-stats {
  display: flex;
  gap: 1rem;
}

.stat-badge {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-badge.highlight {
  border-color: var(--border-highlight);
  background: rgba(0, 229, 255, 0.08);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-glow);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.weather-selector-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Main Navigation Tabs */
.main-tabs {
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  flex-wrap: wrap;
}

.nav-tab {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-tab:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-main);
}

.nav-tab.active {
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  color: #05080f;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.35);
}

/* Controls Section */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-muted);
}

#search-input, #sheet-search-input, #audio-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 3.5rem 1.1rem 3.25rem;
  color: var(--text-main);
  font-size: 1.05rem;
  font-family: var(--font-main);
  transition: all 0.25s ease;
}

#search-input:focus, #sheet-search-input:focus, #audio-search-input:focus {
  outline: none;
  border-color: var(--primary-glow);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.clear-btn:hover { color: var(--text-main); }

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.pill {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.6rem 1.1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.pill:hover {
  background: rgba(51, 65, 85, 0.8);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.pill.active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.pill-anim.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
}

.pill-static.active {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.select-input, .select-input-sm {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pg-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pg-btn:hover:not(:disabled) { background: var(--primary-accent); }
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-num { font-size: 0.875rem; font-weight: 600; color: var(--primary-glow); }

/* Grid Container */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.sheets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Item Card */
.item-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.card-id-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.card-sprite-frame {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  position: relative;
  overflow: hidden;
}

.card-sprite-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 64px;
  height: 64px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-cat-badge {
  font-size: 0.725rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

/* Mentahan Sheets Cards */
.sheet-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
}

.sheet-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.sheet-preview-frame {
  width: 100%;
  height: 160px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.sheet-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sheet-info-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sheet-filename {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-glow);
  word-break: break-all;
}

.sheet-meta-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* World Tile Planner 50x50 Layout */
.world-planner-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.75rem;
}

@media (max-width: 960px) {
  .world-planner-layout {
    grid-template-columns: 1fr;
  }
}

.world-palette-card, .world-canvas-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tool-buttons-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tool-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn.active {
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  color: #05080f;
  border-color: transparent;
}

.block-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.palette-item-box {
  width: 48px;
  height: 48px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.palette-item-box.selected {
  border-color: var(--primary-glow);
  box-shadow: 0 0 12px var(--primary-glow);
  background: rgba(0, 229, 255, 0.15);
}

.world-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.world-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.world-viewport-container {
  width: 100%;
  max-height: 640px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#world-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

/* Pixel Editor Studio Layout */
.pixel-editor-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .pixel-editor-layout {
    grid-template-columns: 1fr;
  }
}

.editor-tools-card, .editor-canvas-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.editor-tools-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.color-picker-input {
  width: 48px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
}

.editor-adjuster-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.editor-canvas-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1px dashed rgba(0, 229, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 2.5rem 1rem;
}

#pixel-editor-canvas {
  width: 320px;
  height: 320px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
  background: repeating-conic-gradient(#1e293b 0% 25%, #0f172a 0% 50%) 50% / 16px 16px;
}

/* Avatar Planner Layout */
.avatar-planner-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .avatar-planner-container {
    grid-template-columns: 1fr;
  }
}

.avatar-preview-card, .avatar-slots-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.avatar-canvas-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1px dashed rgba(0, 229, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  gap: 0.75rem;
}

#avatar-canvas {
  width: 576px;
  height: 576px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: default;
  touch-action: none;
}

#avatar-canvas.drag-ready {
  cursor: grab;
}

#avatar-canvas.drag-active {
  cursor: grabbing;
}

.avatar-canvas-box.canvas-dragging {
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.18);
}

.item-anim-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.85);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}


.customizer-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.group-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.skin-tones-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
}

.skin-color-box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
}

.skin-color-box.selected {
  border-color: var(--primary-glow);
  box-shadow: 0 0 10px var(--primary-glow);
}

.expressions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.45rem;
}

.expr-btn {
  display: inline-grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.775rem;
  text-align: left;
}

.expr-preview {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.55);
  image-rendering: pixelated;
}

.expr-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expr-btn.active {
  border-color: #67e8f9;
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  color: #05080f;
  font-weight: 700;
}

.expr-btn:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
}

.naked-body-container {
  display: flex;
  gap: 0.5rem;
}

.naked-body-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.825rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.naked-body-icon {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.naked-body-btn:hover {
  background: rgba(51, 65, 85, 0.9);
}

.naked-body-btn.active {
  border-color: #67e8f9;
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  color: #05080f;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.slots-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.equipped-items-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 32px;
}

.equipped-chip {
  background: rgba(0, 229, 255, 0.10);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 0.2rem 0.6rem 0.2rem 0.3rem;
  border-radius: 20px;
  font-size: 0.775rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  user-select: none;
}
.equipped-chip:hover {
  background: rgba(0, 229, 255, 0.20);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.15);
  transform: translateY(-1px);
}
.equipped-chip--active {
  background: rgba(0, 229, 255, 0.22);
  border-color: var(--primary-glow);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25), inset 0 0 8px rgba(0, 229, 255, 0.08);
}

.chip-preview {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.chip-type { font-weight: 700; color: var(--primary-glow); }
.chip-name { color: var(--text-main); }
.chip-remove { background: none; border: none; color: var(--warning-accent); font-size: 1rem; cursor: pointer; padding: 0 0.1rem; transition: color 0.15s, transform 0.15s; }
.chip-remove:hover { color: #ff6b6b; transform: scale(1.25); }

.slot-rows-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.slot-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
}

.slot-icon { font-size: 1.4rem; }
.slot-info { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.slot-info label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

.slot-select {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  width: 100%;
}

/* Chat Generator Layout */
.chat-generator-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .chat-generator-layout {
    grid-template-columns: 1fr;
  }
}

.chat-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
}

#chat-canvas {
  image-rendering: pixelated;
  max-width: 100%;
}

/* Audio SFX Layout */
.audio-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.audio-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  border: none;
  color: #05080f;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  overflow: hidden;
}

.audio-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-cat-badge {
  font-size: 0.75rem;
  color: var(--primary-glow);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card, .sheet-modal-card {
  background: rgba(21, 28, 44, 0.95);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 92%;
  max-width: 640px;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 229, 255, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
}

.modal-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-badge {
  font-size: 0.8rem;
  color: var(--primary-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.modal-item-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
}

.modal-id-tag {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.modal-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.modal-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  width: 240px;
}

#modal-canvas {
  width: 128px;
  height: 128px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.preview-zoom-label {
  font-size: 0.75rem;
  color: var(--primary-glow);
  font-weight: 600;
  text-align: center;
}

.anim-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.anim-btn {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--primary-glow);
  color: var(--primary-glow);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.modal-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-width: 240px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-label { font-size: 0.75rem; color: var(--text-muted); }
.detail-val { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }

.modal-actions-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.action-btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 180px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
  text-decoration: none;
}

/* Raw tilesheet modal */
.sheet-modal-card {
  max-width: min(920px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.sheet-mode-selector {
  display: flex;
  gap: 0.65rem;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  background: rgba(2, 6, 23, 0.55);
}

.mode-tab {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mode-tab:hover,
.mode-tab.active {
  border-color: var(--primary-glow);
  color: var(--primary-glow);
  background: rgba(0, 229, 255, 0.12);
}

.sheet-modal-viewport {
  min-height: 260px;
  max-height: 52vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.05) 25%, transparent 25%),
    #070b14;
  background-size: 20px 20px;
}

#viewport-sequence-anim {
  max-height: none;
  overflow: visible;
}

.sheet-zoom-wrapper {
  transform-origin: center;
}

.sheet-full-image {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sequence-player-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

#sequence-canvas {
  width: min(256px, 70vw);
  height: min(256px, 70vw);
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sequence-controls,
.seq-config-row,
.zoom-controls-bar,
.sheet-modal-footer,
.sheet-actions-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sheet-modal-footer {
  justify-content: space-between;
}

.sheet-actions-group {
  flex: 1;
  justify-content: flex-end;
}

.zoom-btn {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  cursor: pointer;
}

@media (max-width: 640px) {
  .sheet-mode-selector {
    flex-direction: column;
  }

  .sheet-modal-viewport {
    min-height: 210px;
  }

  .sheet-modal-footer,
  .sheet-actions-group {
    align-items: stretch;
    flex-direction: column;
  }
}

.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, #00e5ff, #3b82f6); color: #05080f; }
.btn-purple { background: linear-gradient(135deg, #a855f7, #ec4899); color: #ffffff; }
.btn-green { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; }
.btn-cyan { background: linear-gradient(135deg, #06b6d4, #0284c7); color: #ffffff; }
.btn-secondary { background: rgba(30, 41, 59, 0.8); border: 1px solid var(--border-color); color: var(--text-main); }

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
  gap: 1rem;
}

.empty-icon { font-size: 3rem; opacity: 0.5; }

.anim-indicator-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-glow);
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* CHARBASE PARTS GALLERY STYLES */
.charbase-group-section {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.group-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-glow);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.charbase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.charbase-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.charbase-card:hover {
  border-color: var(--primary-glow);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 229, 255, 0.15);
}

.charbase-img-box {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.charbase-img-box img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.charbase-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  word-break: break-word;
}

.btn-download-sm {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-glow);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-download-sm:hover {
  background: var(--primary-glow);
  color: #000;
  border-color: var(--primary-glow);
}

.skin-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
}

.skin-tone-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skin-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.skin-tone-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.skin-tone-hex {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

/* IMPORT SPRITESHEET STUDIO STYLES */
.import-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.import-header h2 {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.import-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.upload-dropzone {
  border: 2px dashed var(--primary-glow);
  background: rgba(14, 165, 233, 0.05);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--purple-glow);
  transform: translateY(-2px);
}

.import-toolbar-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.file-name-tag {
  font-weight: bold;
  color: var(--primary-glow);
  margin-right: 0.75rem;
}

.file-dim-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resize-controls-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scale-val-badge {
  background: var(--primary-glow);
  color: #000;
  font-weight: bold;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.preset-scale-btns {
  display: flex;
  gap: 4px;
}

.btn-scale-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-scale-chip.active, .btn-scale-chip:hover {
  background: var(--purple-glow);
  color: #fff;
  border-color: var(--purple-glow);
}

.import-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .import-dual-grid {
    grid-template-columns: 1fr;
  }
}

.import-box-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.import-box-card h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.import-canvas-viewport {
  width: 100%;
  max-height: 400px;
  overflow: auto;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.import-canvas-viewport canvas {
  image-rendering: pixelated;
}

.anim-preview-viewport {
  width: 100%;
  height: 200px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  height: 250px;
  background: #000;
  border: 2px solid rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.anim-preview-viewport canvas {
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
  object-fit: contain;
}

.frame-status-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.8rem;
  font-weight: bold;
  background: rgba(0,0,0,0.8);
  padding: 4px 10px;
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-field label {
  font-size: 0.8rem;
  font-weight: bold;
  color: #ffe875;
}

.number-input {
  width: 100%;
  padding: 8px 12px;
  background: #142e3f;
  border: 2px solid #477f9f;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

/* IMPORT SPRITESHEET STUDIO STYLES */
.import-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.import-header h2 {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.import-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.upload-dropzone {
  border: 2px dashed var(--primary-glow);
  background: rgba(14, 165, 233, 0.05);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--purple-glow);
  transform: translateY(-2px);
}

.import-toolbar-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.file-name-tag {
  font-weight: bold;
  color: var(--primary-glow);
  margin-right: 0.75rem;
}

.file-dim-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.resize-controls-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scale-val-badge {
  background: var(--primary-glow);
  color: #000;
  font-weight: bold;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.preset-scale-btns {
  display: flex;
  gap: 4px;
}

.btn-scale-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}

.btn-scale-chip.active, .btn-scale-chip:hover {
  background: var(--purple-glow);
  color: #fff;
  border-color: var(--purple-glow);
}

.import-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .import-dual-grid {
    grid-template-columns: 1fr;
  }
}

.import-box-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.import-box-card h3 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.import-canvas-viewport {
  width: 100%;
  max-height: 400px;
  overflow: auto;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.import-canvas-viewport canvas {
  image-rendering: pixelated;
}

.anim-preview-viewport {
  width: 100%;
  height: 250px;
  background: #000;
  border: 2px solid rgba(14, 165, 233, 0.3);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.anim-preview-viewport canvas {
  width: 160px;
  height: 160px;
  image-rendering: pixelated;
  object-fit: contain;
}

.frame-status-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.8rem;
  font-weight: bold;
  background: rgba(0,0,0,0.8);
  padding: 4px 10px;
}

.gif-settings-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.2rem 0;
}

@media (max-width: 600px) {
  .gif-settings-panel {
    grid-template-columns: 1fr;
  }
}

.setting-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-field label {
  font-size: 0.85rem;
  font-weight: bold;
  color: #ffe875;
}

.number-input {
  width: 100%;
  padding: 10px 14px;
  background: #142e3f;
  border: 2px solid #477f9f;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.number-input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

.import-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.avatar-catalog-status {
  min-height: 1.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.avatar-catalog-status.error {
  color: var(--warning-accent);
}

.slot-position-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.position-pad {
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-template-rows: repeat(3, 36px);
  gap: 4px;
}

.position-btn {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.92);
  color: var(--text-main);
  cursor: pointer;
  font-weight: 700;
}

.position-btn:hover:not(:disabled),
.position-btn:focus-visible {
  border-color: var(--primary-glow);
  color: var(--primary-glow);
  outline: 2px solid rgba(0, 229, 255, 0.25);
  outline-offset: 1px;
}

.position-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.position-up { grid-column: 2; grid-row: 1; }
.position-left { grid-column: 1; grid-row: 2; }
.position-reset { grid-column: 2; grid-row: 2; font-size: 0.65rem; }
.position-right { grid-column: 3; grid-row: 2; }
.position-down { grid-column: 2; grid-row: 3; }

.position-readout {
  min-width: 76px;
  color: var(--primary-glow);
  font-size: 0.72rem;
  text-align: center;
}

@media (max-width: 700px) {
  .slot-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .slot-position-controls {
    grid-column: 2;
    align-items: flex-start;
  }
}

.import-action-buttons .btn {
  width: 100%;
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
  text-align: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.btn-success:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   GT SET PLANNER — COMPONENT STYLES
   Wearable cards, sequence controls, saved-sets, utility classes.
═══════════════════════════════════════════════════════════════════ */

/* ── Screen-reader-only ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Icon Buttons (play/pause GT-styled) ─────────────────────── */
.avatar-icon-button {
  display: inline-grid;
  width: 48px;
  min-width: 44px;
  height: 48px;
  place-items: center;
  border: 2px solid rgba(186, 230, 253, 0.9);
  border-radius: 12px;
  background: linear-gradient(180deg, #39799a, #234e6b);
  box-shadow: inset 0 0 0 3px rgba(7, 29, 44, 0.82);
  cursor: pointer;
}

.avatar-icon-button:hover,
.avatar-icon-button:focus-visible,
.avatar-icon-button[aria-expanded="true"] {
  border-color: var(--primary-glow);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
  outline: none;
}

.avatar-icon-button img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

/* ── Button States ───────────────────────────────────────────── */
.btn-danger-lite {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.48;
  transform: none;
}

/* ── Wearable Inventory Cards ────────────────────────────────── */
.avatar-item-card {
  position: relative;
  display: flex;
  min-width: 44px;
  min-height: 116px;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.45rem;
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.45);
  border-radius: 10px;
  background: #326a88;
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.1s;
}

.avatar-item-card:hover,
.avatar-item-card:focus-visible {
  border-color: var(--primary-glow);
  transform: translateY(-1px);
  outline: none;
}

.avatar-item-card[aria-pressed="true"] {
  border-color: #67e8f9;
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.25);
  background: #275b77;
}

.avatar-item-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 7px;
  background: rgba(4, 13, 22, 0.42);
}

.avatar-item-preview canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.avatar-item-name {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-item-meta {
  color: #bae6fd;
  font-size: 0.62rem;
}

.avatar-inventory-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Wearable Sequence Controls ──────────────────────────────── */
.wearable-sequence-controls {
  display: grid;
  grid-template-columns: 38px 34px minmax(96px, 1fr) 34px 58px minmax(142px, auto);
  align-items: center;
  gap: 8px;
}

.sequence-playback-toggle,
.sequence-step {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 36px;
  border: 1px solid #477f9f;
  border-radius: 8px;
  background: #142e3f;
  color: #dcecff;
  cursor: pointer;
}

.sequence-playback-toggle {
  border-color: #65e6b4;
  background: #155345;
  color: #ffffff;
}

.sequence-frame-slider {
  width: 100%;
  min-width: 0;
  accent-color: #65e6b4;
}

.sequence-frame-counter {
  text-align: center;
  color: #b7cedd;
  font-variant-numeric: tabular-nums;
}

.sequence-speed-control {
  display: grid;
  grid-template-columns: 30px minmax(58px, 72px) auto 30px;
  align-items: center;
  gap: 5px;
}

.sequence-speed-step,
.sequence-speed-input {
  min-height: 36px;
  border: 1px solid #477f9f;
  border-radius: 8px;
  background: #142e3f;
  color: #dcecff;
}

.sequence-speed-step {
  display: grid;
  min-width: 30px;
  place-items: center;
  cursor: pointer;
}

.sequence-speed-input {
  width: 100%;
  padding: 0 6px;
  font: inherit;
  text-align: center;
}

.sequence-speed-unit {
  color: #b7cedd;
  font-size: 0.72rem;
}

/* ── Set Name Input ──────────────────────────────────────────── */
.set-name-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-main);
  font-weight: 600;
  letter-spacing: 0.01em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.set-name-input:focus {
  border-color: #67e8f9;
  box-shadow: 0 0 0 2px rgba(103, 232, 249, 0.2);
}
.set-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Saved Sets Panel ────────────────────────────────────────── */
.saved-sets-panel {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 30, 0.9);
  overflow: hidden;
  margin-top: 0.25rem;
}
.saved-sets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(30, 41, 59, 0.5);
}
.saved-sets-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.saved-sets-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.saved-sets-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.saved-sets-empty {
  padding: 1.2rem 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.saved-set-entry {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.15s;
}
.saved-set-entry:last-child { border-bottom: none; }
.saved-set-entry:hover { background: rgba(30, 41, 59, 0.55); }
.saved-set-preview-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.saved-set-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(0, 50, 80, 0.45) 0%, rgba(5, 10, 20, 0.7) 100%);
  border: 1px solid rgba(125, 211, 252, 0.3);
  image-rendering: pixelated;
  object-fit: contain;
  display: block;
  box-shadow: inset 0 0 4px rgba(0, 229, 255, 0.1);
}
.saved-set-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}
.saved-set-info { min-width: 0; }
.saved-set-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-set-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.saved-set-actions {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.saved-set-load-btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #06b6d4;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  cursor: pointer;
  transition: background 0.15s;
}
.saved-set-load-btn:hover { background: rgba(6, 182, 212, 0.3); }
.saved-set-delete-btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  cursor: pointer;
  transition: background 0.15s;
}
.saved-set-delete-btn:hover { background: rgba(239, 68, 68, 0.25); }

/* ── Responsive: wearable cards & sequence at narrow ─────────── */
@media (max-width: 420px) {
  .wearable-sequence-controls {
    grid-template-columns: 36px 32px minmax(72px, 1fr) 32px 52px;
    gap: 5px;
  }
  .sequence-speed-control {
    grid-column: 1 / -1;
  }
}

/* GT Set Planner: Three-Pane Studio */
/* ═══════════════════════════════════════════════════════════════════
   GT SET PLANNER — THREE-PANE STUDIO
   All avatar-workbench layout rules live here. Legacy split-workbench
   rules have been removed; this block is the single source of truth.
═══════════════════════════════════════════════════════════════════ */

/* ── Workbench shell ─────────────────────────────────────────── */
.avatar-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 0 0 24px;
}

/* ── Command Bar ─────────────────────────────────────────────── */
.avatar-command-bar {
  position: relative;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(25, 35, 55, 0.97), rgba(10, 16, 28, 0.99));
  box-shadow: 0 4px 24px rgba(0,0,0,0.32), inset 0 1px 0 rgba(125,211,252,0.07);
}

.avatar-set-name-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  min-width: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.avatar-set-name-field .set-name-input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.avatar-command-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.avatar-command-actions .btn {
  min-height: 40px;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.avatar-menu-toggle::after {
  content: " ▾";
  font-size: 0.8em;
  opacity: 0.7;
}

/* ── Overflow Menu ───────────────────────────────────────────── */
.avatar-set-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 14px;
  z-index: 50;
  display: grid;
  width: min(300px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 14px;
  background: #091525;
  box-shadow: 0 24px 60px rgba(0,0,0,0.64), 0 0 0 1px rgba(0,229,255,0.06);
  animation: menuFadeIn 0.15s ease;
}

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.avatar-set-menu[hidden],
.avatar-inspector-panel[hidden] {
  display: none;
}

.avatar-menu-action {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.13s;
}

.avatar-menu-action:hover,
.avatar-menu-action:focus-visible {
  background: rgba(56, 189, 248, 0.13);
  outline: 2px solid rgba(103, 232, 249, 0.6);
  outline-offset: -2px;
}

.avatar-menu-danger { color: #fca5a5; }

.avatar-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: rgba(148, 163, 184, 0.2);
}

/* ── Saved Sets Panel (dropdown) ─────────────────────────────── */
.avatar-command-bar > .saved-sets-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 14px;
  z-index: 49;
  width: min(440px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.64);
  animation: menuFadeIn 0.15s ease;
}

.saved-sets-panel[hidden] { display: none; }

/* ── Workspace Tabs ──────────────────────────────────────────── */
.avatar-workspace-tabs {
  display: none;
  padding: 5px;
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.94);
}

/* ── Tab Buttons shared ──────────────────────────────────────── */
.avatar-workspace-tab,
.avatar-inspector-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.avatar-workspace-tab[aria-selected="true"],
.avatar-inspector-tab[aria-selected="true"] {
  border-color: rgba(103, 232, 249, 0.72);
  background: rgba(14, 165, 233, 0.18);
  color: #e0f7ff;
  box-shadow: inset 0 0 12px rgba(0,229,255,0.08);
}

.avatar-workspace-tab:hover:not([aria-selected="true"]),
.avatar-inspector-tab:hover:not([aria-selected="true"]) {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-main);
}

.avatar-workspace-tab:focus-visible,
.avatar-inspector-tab:focus-visible {
  outline: 3px solid rgba(0,229,255,0.35);
  outline-offset: 2px;
}

/* ── Studio Grid — 3-pane desktop ───────────────────────────── */
.avatar-studio-grid {
  display: grid;
  grid-template-columns:
    minmax(290px, 1fr)
    minmax(340px, 400px)
    minmax(288px, 320px);
  grid-template-areas: "inventory preview inspector";
  align-items: start;
  gap: 12px;
  min-height: 0;
}

/* ── Pane base ───────────────────────────────────────────────── */
.avatar-inventory-pane,
.avatar-preview-pane,
.avatar-inspector-pane {
  min-width: 0;
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(18, 26, 44, 0.96), rgba(9, 14, 24, 0.99));
  box-shadow: 0 4px 24px rgba(0,0,0,0.28), inset 0 1px 0 rgba(125,211,252,0.05);
}

/* ── Inventory Pane ──────────────────────────────────────────── */
.avatar-inventory-pane {
  grid-area: inventory;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow: visible;
  max-height: none;
}

.avatar-inventory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.avatar-tools-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 2px;
}

.avatar-inventory-header h3,
.avatar-stage-toolbar h3,
.avatar-inspector-heading h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.avatar-inventory-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
}

#avatar-inventory-query {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 28, 0.7);
  color: var(--text-main);
  font: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.18s;
  box-sizing: border-box;
}

#avatar-inventory-query:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.15);
}

#avatar-inventory-slot {
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: rgba(10, 15, 28, 0.7);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.avatar-catalog-status,
.avatar-inventory-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.avatar-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 6px;
}

.avatar-inventory-sentinel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px dashed rgba(125,211,252,0.18);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
}

.avatar-inventory-sentinel:hover {
  background: rgba(56,189,248,0.07);
  color: #7dd3fc;
}

/* ── Preview Pane ────────────────────────────────────────────── */
.avatar-preview-pane {
  grid-area: preview;
  position: sticky;
  top: 16px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.avatar-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ── Live Preview Zoom Controls ──────────────────────────────── */
.avatar-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(10, 16, 28, 0.85);
  padding: 2px 4px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.avatar-zoom-btn {
  min-width: 28px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border: 1px solid rgba(125, 211, 252, 0.2) !important;
  border-radius: 6px !important;
  background: rgba(20, 32, 54, 0.8) !important;
  color: var(--text-main) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.avatar-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: rgba(103, 232, 249, 0.6) !important;
  color: #e0f7ff !important;
}

.avatar-zoom-btn:active {
  transform: scale(0.95);
}

.avatar-zoom-val {
  min-width: 48px !important;
  font-size: 0.72rem !important;
  color: var(--primary-glow) !important;
  font-variant-numeric: tabular-nums;
}

.avatar-canvas-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(0,229,255,0.12);
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(0,50,80,0.35) 0%, rgba(5,10,20,0.5) 100%);
  overflow: hidden;
  position: relative;
  user-select: none;
}

#avatar-canvas {
  display: block;
  width: min(360px, 100%);
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 6px;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

.preview-zoom-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.equipped-items-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px 2px;
  min-height: 32px;
}

.equipped-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 6px;
  border: 1px solid rgba(103,232,249,0.28);
  border-radius: 20px;
  background: rgba(14,165,233,0.12);
  color: #bae6fd;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
  transition: background 0.13s, border-color 0.13s, transform 0.12s;
  max-width: 100%;
  user-select: none;
}

.equipped-chip:hover {
  background: rgba(14,165,233,0.24);
  border-color: rgba(103,232,249,0.6);
  transform: translateY(-1px);
}

.equipped-chip.active-chip,
.equipped-chip--active {
  border-color: #67e8f9;
  background: rgba(14,165,233,0.28);
  color: #e0f7ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.chip-preview {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  image-rendering: pixelated;
  flex-shrink: 0;
}

.chip-type {
  font-weight: 700;
  color: #38bdf8;
  flex-shrink: 0;
}

.chip-name {
  color: var(--text-main);
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #f87171;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.13s, color 0.13s, transform 0.13s;
}

.chip-remove:hover {
  background: rgba(239,68,68,0.4);
  color: #ffffff;
  transform: scale(1.2);
}

/* ── Inspector Pane ──────────────────────────────────────────── */
.avatar-inspector-pane {
  grid-area: inspector;
  position: sticky;
  top: 16px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  min-height: min(480px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
}

.avatar-inspector-heading {
  padding: 14px 14px 0;
  flex-shrink: 0;
  margin-bottom: 0;
}

.avatar-inspector-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  flex-shrink: 0;
  background: rgba(9,14,24,0.98);
  border-bottom: 1px solid rgba(125,211,252,0.1);
}

/* Scrollable panel body */
.avatar-inspector-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.avatar-inspector-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Item tab ────────────────────────────────────────────────── */
.avatar-active-target {
  padding: 10px 12px;
  border: 1px solid rgba(125,211,252,0.18);
  border-radius: 10px;
  background: rgba(14,22,40,0.6);
  font-size: 0.82rem;
  color: var(--text-main);
  min-height: 44px;
  display: flex;
  align-items: center;
  word-break: break-word;
}

.avatar-position-tool,
.avatar-sequence-tool {
  display: grid;
  gap: 8px;
}

.avatar-inspector-pane .wearable-sequence-controls {
  grid-template-columns: 44px 44px minmax(80px,1fr) 44px;
}

.avatar-inspector-pane .sequence-frame-counter,
.avatar-inspector-pane .sequence-speed-control {
  grid-column: 1 / -1;
}

.sequence-speed-input {
  width: 72px;
  padding: 4px 6px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: rgba(10,15,28,0.7);
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  text-align: center;
}

/* ── Export tab ──────────────────────────────────────────────── */
/* ── Export tab ──────────────────────────────────────────────── */
.avatar-inspector-pane .avatar-export-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.avatar-export-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.avatar-export-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.export-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
}

.export-card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
}

.export-card-desc {
  font-size: 0.74rem;
  line-height: 1.35;
  color: #94a3b8;
  margin: 0;
}

.avatar-export-subcard {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.subcard-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

.subcard-tag {
  font-size: 0.64rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
}

.avatar-export-scale-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-export-status {
  min-height: 24px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  word-break: break-word;
}

.avatar-export-status.error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.avatar-export-more {
  border: 1px solid rgba(125,211,252,0.18);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
}

.avatar-export-more-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(14,22,40,0.7);
  list-style: none;
  user-select: none;
  transition: color 0.15s;
}
.avatar-export-more-summary:hover { color: #38bdf8; }
.avatar-export-more-summary::marker,
.avatar-export-more-summary::-webkit-details-marker { display: none; }
.avatar-export-more-summary::after {
  content: "▾";
  font-size: 0.8em;
  transition: transform 0.2s;
}
.avatar-export-more[open] .avatar-export-more-summary::after {
  transform: rotate(180deg);
}

.avatar-export-more-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.avatar-primary-export {
  width: 100%;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-height: 48px;
}

.avatar-inspector-pane .btn {
  font-size: 0.8rem;
}

/* ── Hidden ──────────────────────────────────────────────────── */
[data-workspace-hidden="true"] { display: none !important; }

/* ── Force show all panes at large desktop ───────────────────── */
@media (min-width: 1280px) {
  .avatar-workspace-tabs { display: none !important; }
  [data-workspace-hidden="true"] { display: revert !important; }
}

/* ── Medium: 900–1279px ──────────────────────────────────────── */
@media (max-width: 1279px) {
  .avatar-workspace-tabs { display: flex; }

  .avatar-studio-grid {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    grid-template-areas: "preview workspace";
  }

  .avatar-inventory-pane,
  .avatar-inspector-pane { grid-area: workspace; }

  .avatar-preview-pane { grid-area: preview; }

  .avatar-inspector-pane {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .avatar-inspector-body {
    overflow: visible;
  }
}

/* ── Narrow: below 900px ─────────────────────────────────────── */
@media (max-width: 899px) {
  .avatar-command-bar {
    gap: 8px;
    padding: 10px 12px;
  }

  .avatar-command-actions {
    flex-wrap: wrap;
    flex: 1 1 100%;
  }

  .avatar-command-actions .btn {
    flex: 1 1 auto;
    min-width: 72px;
  }

  .avatar-studio-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "preview" "workspace";
  }

  .avatar-inventory-pane,
  .avatar-inspector-pane { grid-area: workspace; }

  .avatar-preview-pane {
    grid-area: preview;
    position: sticky;
    top: 0;
    z-index: 8;
  }

  #avatar-canvas { width: min(260px, 70vw); }

  .avatar-inspector-pane {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .avatar-inspector-body { overflow: visible; }
}

/* ── Extra narrow: below 560px ───────────────────────────────── */
@media (max-width: 559px) {
  .avatar-inspector-tabs,
  .avatar-workspace-tabs { gap: 3px; }

  .avatar-workspace-tab,
  .avatar-inspector-tab {
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  #avatar-canvas { width: min(220px, 80vw); }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .avatar-menu-action,
  .avatar-workspace-tab,
  .avatar-inspector-tab,
  .equipped-chip,
  .chip-remove { transition: none; }
  .avatar-set-menu,
  .avatar-command-bar > .saved-sets-panel,
  .avatar-inspector-panel { animation: none; }
}

/* ==========================================================================
   GT WORLD PLANNER STUDIO STYLES
   ========================================================================== */

.world-studio-container {
  height: calc(100vh - 130px);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 64px;
  grid-template-rows: 1fr 56px;
  gap: 8px;
  position: relative;
  background: #080d18;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 1px 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* ── Viewport / Canvas Wrapper ── */
.world-canvas-wrapper {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #040711;
  cursor: crosshair;
  user-select: none;
}

#world-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* ── Top Floating Bar ── */
.world-top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.world-title-badge {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.world-name-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #38bdf8;
  letter-spacing: 0.5px;
}

.world-coords-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 8px;
}

.world-zoom-badge {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.world-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.world-mini-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.world-zoom-level {
  width: auto;
  padding: 0 8px;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* ── Selection Action Floating Bar ── */
.world-selection-bar {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3), 0 8px 32px rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  z-index: 15;
  animation: slideDownFade 0.2s ease-out;
}

.selection-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00e5ff;
  margin-right: 4px;
}

/* ── Minimap Box ── */
.world-minimap-box {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 180px;
  height: 108px;
  background: rgba(9, 15, 27, 0.9);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  z-index: 10;
}

#world-minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Right Vertical Hotbar ── */
.world-hotbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  background: rgba(13, 20, 36, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
  overflow-y: auto;
}

.hotbar-add-btn {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 4px;
}

.hotbar-add-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
  border-color: #ffffff;
}

.world-hotbar-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: center;
}

.hotbar-slot {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #0f172a;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.hotbar-slot:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(30, 41, 59, 0.8);
  transform: scale(1.04);
}

.hotbar-slot.active {
  border: 2px solid #00e5ff;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.2) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.6), inset 0 0 8px rgba(0, 229, 255, 0.3);
  transform: scale(1.06);
}

.hotbar-slot-num {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  pointer-events: none;
}

.hotbar-slot.active .hotbar-slot-num {
  color: #00e5ff;
}

.hotbar-sprite-thumb {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  pointer-events: none;
}

/* ── Bottom Tools Toolbar ── */
.world-bottom-bar {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  background: rgba(11, 18, 33, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 12;
}

.world-tool-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.world-tool-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  transform: translateY(-2px);
}

.world-tool-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(14, 165, 233, 0.3));
  border: 1.5px solid #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.tool-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* ── World Menu Dropdown ── */
.world-menu-dropdown {
  position: absolute;
  bottom: 64px;
  right: 16px;
  width: 260px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
  animation: slideUpFade 0.18s ease-out;
}

.world-menu-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}

.world-menu-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.world-menu-item:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.world-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* ── Select Block Modal ── */
.world-modal-container {
  background: #090f1d;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  overflow: hidden;
}

.block-modal-content {
  width: min(960px, 94vw);
}

.weather-modal-content {
  width: min(1040px, 96vw);
}

.world-modal-header {
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.world-modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #38bdf8;
  margin: 0;
}

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

.block-search-row,
.weather-search-row {
  width: 100%;
}

.block-search-input {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
}

.block-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.block-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.block-cat-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.block-cat-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.block-cat-pill.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.block-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 6px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px;
  background: #060a14;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.world-block-card {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #0d1527;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.world-block-card:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  transform: scale(1.1);
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.world-block-card canvas {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  pointer-events: none;
}

/* ── Weather Modal Grid ── */
.weather-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.world-weather-card {
  border-radius: 10px;
  background: #0f172a;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.world-weather-card:hover {
  border-color: #38bdf8;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.3);
}

.world-weather-card.active {
  border-color: #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.weather-thumb-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.weather-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.weather-card-label {
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(15, 23, 42, 0.95);
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* App Brand Logo Image */
.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: block;
}

#playmode-mod-btn.active {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6) !important;
}


/* ==========================================================================
   DAILY CHALLENGE & CLASH OF WORLDS TRACKER
   ========================================================================== */
.dc-dashboard {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.dc-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.4));
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dc-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseAnim 1.5s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.dc-hero-title {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
}

.dc-hero-subtitle {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.dc-clock-card {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.dc-clock-label {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dc-countdown {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #00e5ff;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
  line-height: 1;
  margin-bottom: 6px;
}

.dc-server-time {
  font-size: 11px;
  color: #64748b;
}

.dc-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 14px;
}

.dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.dc-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dc-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dc-card.completed {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(20, 83, 45, 0.2));
}

.dc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dc-card-icon {
  font-size: 32px;
  line-height: 1;
}

.dc-difficulty {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dc-difficulty.easy { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.dc-difficulty.medium { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.dc-difficulty.hard { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.dc-difficulty.master { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

.dc-category {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 6px;
}

.dc-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.dc-card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0 0 16px 0;
}

.dc-progress-wrap {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.dc-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.dc-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dc-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #38bdf8);
  border-radius: 4px;
  transition: width 0.2s ease;
}

.dc-card.completed .dc-progress-bar-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.dc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-slider {
  flex: 1;
  accent-color: #00e5ff;
  cursor: pointer;
}

.dc-step-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dc-step-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

.dc-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dc-reward-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.dc-reward-pill.token { background: rgba(234, 179, 8, 0.15); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.3); }
.dc-reward-pill.gems { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.dc-reward-pill.xp { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.clash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.clash-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.clash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.clash-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.clash-status-badge.active { background: #22c55e; color: #022c22; }
.clash-status-badge.upcoming { background: #eab308; color: #422006; }
.clash-status-badge.scheduled { background: #64748b; color: #f8fafc; }

.clash-ends {
  font-size: 11px;
  color: #94a3b8;
}

.clash-name {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 10px 0;
}

.clash-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.clash-detail-val.highlight {
  color: #38bdf8;
  font-weight: 700;
}

/* ==========================================================================
   SURGERY SIMULATOR & ASSISTANT MINI-GAME
   ========================================================================== */
.surge-dashboard {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.surge-stats-bar {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.surge-stat-item {
  display: flex;
  flex-direction: column;
}

.surge-stat-val {
  font-size: 18px;
  font-weight: 800;
}

.surge-stat-lbl {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-cyan { color: #00e5ff; }
.text-green { color: #22c55e; }
.text-red { color: #ef4444; }
.text-yellow { color: #facc15; }

.btn-start-surge {
  background: linear-gradient(135deg, #00e5ff, #3b82f6);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.35);
  transition: all 0.15s ease;
}

.btn-start-surge:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 229, 255, 0.5);
}

.surge-workspace {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.surge-monitor-card {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.surge-monitor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.surge-patient-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.surge-patient-avatar {
  font-size: 28px;
}

.surge-patient-name {
  margin: 0 0 2px 0;
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.surge-diagnosis-badge {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

.surge-timer-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.surge-vitals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.surge-vital-box {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  position: relative;
}

.surge-vital-box.normal { border-color: rgba(34, 197, 94, 0.4); }
.surge-vital-box.warning { border-color: rgba(234, 179, 8, 0.5); background: rgba(234, 179, 8, 0.05); }
.surge-vital-box.critical { border-color: rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.1); animation: blinkCritical 1s infinite; }

@keyframes blinkCritical {
  0% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 14px rgba(239, 68, 68, 0.6); }
  100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.2); }
}

.vital-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.vital-value {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2px;
}

.vital-value small {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.vital-sub {
  font-size: 10px;
  color: #64748b;
}

.ecg-line-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.ecg-pulse-anim {
  width: 30%;
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  animation: ecgMove 1.2s linear infinite;
}

.ecg-pulse-anim.flatline {
  background: #ef4444;
  width: 100%;
  animation: none;
}

@keyframes ecgMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.surge-advisor-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
  border: 1.5px solid #00e5ff;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}

.advisor-title {
  font-size: 10px;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.advisor-text {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.4;
}

.surge-log-box {
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 140px;
  overflow-y: auto;
}

.surge-log-header {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 6px;
}

.surge-log-line {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 3px;
  font-family: monospace, sans-serif;
}

.surge-tools-panel {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px;
}

.surge-tools-title {
  margin: 0 0 14px 0;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.surge-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.surge-tool-btn {
  background: rgba(2, 6, 23, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.surge-tool-btn:hover {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-2px);
}

.surge-tool-btn.recommended {
  border-color: #facc15;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.1);
}

.surge-tool-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.surge-tool-name {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
}

.surge-tool-key {
  font-size: 9px;
  color: #64748b;
  margin-top: 2px;
}

.surge-empty-state {
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 60px 20px;
  text-align: center;
}

.surge-empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.surge-empty-state h3 {
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.surge-empty-state p {
  color: #94a3b8;
  margin: 0;
  font-size: 13px;
}

@media (max-width: 768px) {
  .surge-workspace {
    grid-template-columns: 1fr;
  }
  .dc-hero-banner {
    flex-direction: column;
    text-align: center;
  }
}


/* ==========================================================================
   GT LIVE NEWS, SERVER STATUS & WOTD DASHBOARD
   ========================================================================== */
.pulse-dot-green {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseGreen 1.5s infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.pulse-dot-red {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulseRed 1.5s infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes pulseRed {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.pulse-dot-yellow {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308;
  box-shadow: 0 0 10px #eab308;
  animation: pulseYellow 1.5s infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes pulseYellow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.pulse-dot-cyan {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseCyan 1.5s infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes pulseCyan {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.gt-live-stat-badge {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.15);
}

.gt-clock-badge {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}

.gt-clock-badge .badge-sub-label {
  font-size: 10px;
  opacity: 0.8;
  font-weight: normal;
}

.gt-news-dashboard {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.news-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 78, 59, 0.35));
  border: 1.5px solid rgba(34, 197, 94, 0.35);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.news-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.news-hero-title {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
}

.news-hero-subtitle {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

.news-server-pill {
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(34, 197, 94, 0.4);
  border-radius: 14px;
  padding: 16px 24px;
  text-align: center;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.server-pill-status {
  font-size: 11px;
  font-weight: 800;
  color: #4ade80;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.server-pill-count {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}

.server-pill-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.news-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
}

.news-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
}

.wotd-showcase-card {
  border-color: rgba(234, 179, 8, 0.35);
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.1);
}

.wotd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.wotd-badge {
  font-size: 11px;
  font-weight: 800;
  color: #fde047;
}

.wotd-live-tag {
  font-size: 10px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #facc15;
  padding: 2px 7px;
  border-radius: 4px;
}

.wotd-title {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 14px 0;
  letter-spacing: 0.5px;
}

.wotd-img-container {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.wotd-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

/* VOTW Showcase Card */
.votw-showcase-card {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
  margin-top: 20px;
}

.votw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.votw-badge {
  font-size: 11px;
  font-weight: 800;
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.votw-live-tag {
  font-size: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 2px 7px;
  border-radius: 4px;
}

.votw-title {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.votw-video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.votw-video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.votw-meta-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 11px;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 6px;
}

.votw-prize-tag {
  color: #fde047;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.patch-notes-title {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 16px 0;
}

.patch-notes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.patch-item {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.patch-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.patch-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.patch-badge.update { background: rgba(0, 229, 255, 0.2); color: #00e5ff; }
.patch-badge.maintenance { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.patch-badge.event { background: rgba(168, 85, 247, 0.2); color: #c084fc; }

.patch-date {
  font-size: 11px;
  color: #64748b;
}

.patch-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px 0;
}

.patch-item-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   LIVE WORLD RENDER VIEWER (/renderworld)
   ========================================================================== */
.renderworld-dashboard {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.renderworld-search-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.renderworld-title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.renderworld-sub {
  margin: 0 0 14px 0;
  font-size: 12px;
  color: #94a3b8;
}

.renderworld-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.renderworld-search-input {
  flex: 1;
  background: rgba(2, 6, 23, 0.8);
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  padding: 10px 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.renderworld-search-input:focus {
  outline: none;
  border-color: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.4);
}

.renderworld-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.pills-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-right: 4px;
}

.renderworld-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.renderworld-pill:hover, .renderworld-pill.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
}

.renderworld-stage-card {
  background: rgba(10, 15, 30, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

.renderworld-stage-header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.stage-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-world-name {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.stage-meta-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #94a3b8;
}

.stage-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
}

.rw-zoom-label {
  font-size: 12px;
  font-weight: 700;
  color: #00e5ff;
  min-width: 42px;
  text-align: center;
}

.renderworld-viewport {
  width: 100%;
  height: 580px;
  background: #020617;
  overflow: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.renderworld-image-wrap {
  transition: transform 0.15s ease-out;
  display: inline-block;
}

.rw-main-img {
  max-width: 100%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  display: block;
}

.renderworld-loading-spinner {
  text-align: center;
  color: #94a3b8;
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: #00e5ff;
  border-radius: 50%;
  animation: spinRing 0.8s linear infinite;
  margin: 0 auto 12px auto;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

.renderworld-error-state {
  text-align: center;
  padding: 40px 20px;
}

/* ==========================================================================
   GT SERVER OPERATIONS, LIVE CLOCK & STAFF DIRECTORY
   ========================================================================== */
.gt-server-ops-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.25));
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.gt-ops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.gt-ops-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gt-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.gt-ops-box {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.gt-ops-box-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gt-ops-box-val {
  font-family: 'Outfit', monospace, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1.1;
}

.gt-ops-box-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.gt-day-progress-container {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
}

.gt-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.gt-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.gt-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 4px;
  transition: width 1s linear;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.gt-reset-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gt-reset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #94a3b8;
}

.gt-reset-item-name {
  color: #e2e8f0;
  font-weight: 600;
}

/* Official Staff Directory */
.gt-staff-card {
  grid-column: 1 / -1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
}

.gt-staff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.gt-staff-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gt-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.gt-staff-item {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gt-staff-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.gt-staff-info {
  flex: 1;
  min-width: 0;
}

.gt-staff-name {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gt-staff-role-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.role-dev { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.role-cm { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.role-mod { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); }
.role-guardian { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }

.gt-staff-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
