/* ZMuse by ZoroTEK Studio — Multi-Theme Floating Island Bento (Dark & Light) */

:root,
html[data-theme="dark-coral"] {
  --bg-canvas: #0B0C0E;
  --bg-surface: #13151A;
  --bg-elevated: #1A1D24;
  --bg-terminal: #0E1014;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(249, 115, 22, 0.50);
  --accent-primary: #F97316;
  --accent-soft: rgba(249, 115, 22, 0.14);
  --status-success: #10B981;
  --status-info: #38BDF8;
  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --color-scheme: dark;
}

html[data-theme="dark-neon"] {
  --bg-canvas: #080A0F;
  --bg-surface: #10131C;
  --bg-elevated: #171B27;
  --bg-terminal: #0B0D14;
  --border-subtle: rgba(148, 163, 184, 0.10);
  --border-strong: rgba(148, 163, 184, 0.20);
  --border-accent: rgba(6, 182, 212, 0.55);
  --accent-primary: #06B6D4;
  --accent-soft: rgba(6, 182, 212, 0.15);
  --status-success: #10B981;
  --status-info: #38BDF8;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --color-scheme: dark;
}

html[data-theme="dark-emerald"] {
  --bg-canvas: #090D0C;
  --bg-surface: #101715;
  --bg-elevated: #16201D;
  --bg-terminal: #0B100E;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(16, 185, 129, 0.50);
  --accent-primary: #10B981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --status-success: #34D399;
  --status-info: #38BDF8;
  --text-primary: #ECFDF5;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --color-scheme: dark;
}

html[data-theme="dark-violet"] {
  --bg-canvas: #0B0A12;
  --bg-surface: #13111E;
  --bg-elevated: #1B182A;
  --bg-terminal: #0E0C17;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.17);
  --border-accent: rgba(139, 92, 246, 0.55);
  --accent-primary: #8B5CF6;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --status-success: #10B981;
  --status-info: #38BDF8;
  --text-primary: #F5F3FF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --color-scheme: dark;
}

html[data-theme="light-coral"] {
  --bg-canvas: #ECEEF2;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F4F5F8;
  --bg-terminal: #F8FAFC;
  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);
  --border-accent: rgba(234, 88, 12, 0.45);
  --accent-primary: #EA580C;
  --accent-soft: rgba(234, 88, 12, 0.12);
  --status-success: #059669;
  --status-info: #0284C7;
  --text-primary: #111827;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --color-scheme: light;
}

html[data-theme="light-ice"] {
  --bg-canvas: #E6EDF5;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-terminal: #F8FAFC;
  --border-subtle: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.18);
  --border-accent: rgba(2, 132, 199, 0.45);
  --accent-primary: #0284C7;
  --accent-soft: rgba(2, 132, 199, 0.12);
  --status-success: #059669;
  --status-info: #0369A1;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --color-scheme: light;
}

:root {
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --island-gap: 10px;
  --radius-island: 12px;
  --radius-control: 8px;

  /* Legacy variable mappings */
  --bg: var(--bg-canvas);
  --bg2: var(--bg-surface);
  --bg-darkest: var(--bg-canvas);
  --bg-card: var(--bg-surface);
  --bg-panel: var(--bg-surface);
  --card: var(--bg-surface);
  --card2: var(--bg-elevated);
  --card-2: var(--bg-elevated);
  --surface: var(--bg-surface);
  --panel: var(--bg-surface);
  --line: var(--border-subtle);
  --border: var(--border-subtle);
  --txt: var(--text-primary);
  --text: var(--text-primary);
  --text-main: var(--text-primary);
  --muted: var(--text-secondary);
  --accent: var(--accent-primary);
  --pri: var(--accent-primary);
}

html {
  color-scheme: var(--color-scheme);
}

html, body {
  background: var(--bg-canvas) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
}

.app {
  background: var(--bg-canvas) !important;
  padding: var(--island-gap) !important;
  gap: var(--island-gap) !important;
  box-sizing: border-box !important;
}

/* Sidebar Navigation Rail (88px) */
.side {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: var(--bg-surface) !important;
  border-radius: var(--radius-island) !important;
  border: 1px solid var(--border-subtle) !important;
  padding: 12px 6px !important;
}

.side nav {
  width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.zmuse-logo {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  margin-bottom: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  height: auto !important;
  width: 100% !important;
}

.zmuse-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: block;
  flex-shrink: 0;
}

.zmuse-icon-img.sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.zmuse-icon-img.lg {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.zmuse-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.side .nav {
  position: relative;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 8px 4px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  text-align: center !important;
  border-radius: var(--radius-control) !important;
  border: 1px solid transparent !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.side .nav svg {
  stroke-width: 1.75 !important;
}

.side .nav:hover {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
}

.side .nav.on {
  background: var(--accent-soft) !important;
  border: 1px solid var(--border-accent) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.side .nav.on::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-primary);
}

.side .ver {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  color: var(--text-muted) !important;
  margin-top: auto;
}

/* Main Column & Floating Islands */
.main {
  background: transparent !important;
  gap: var(--island-gap) !important;
  padding: 0 !important;
}

.top {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-island) !important;
  border: 1px solid var(--border-subtle) !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  min-height: 52px;
}

.top .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.top .brand b {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.top .brand .brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.view.on {
  gap: var(--island-gap) !important;
}

/* Uniform Island Surfaces across all tabs (including Film, Review, Workflow, Accounts, Settings) */
.card-h,
.sc-header,
.sc-body,
.sc-section,
.sc-card,
.sc-form,
.sc-panel,
.muse-review-top-shell,
#studio-story-pane,
.story-pane,
.card,
.box,
.about,
.acc,
.acc-row,
.acc-card,
.acc-stat,
.stat,
#g-read,
#g-items,
.g-item,
.wf-template-card,
.set-ai-box,
.review-panel,
.film-panel,
.film-sidebar,
.film-main,
.film-sec,
.film-card,
#v-film-studio .fs-sidebar,
#v-film-studio .fs-main,
#v-film-studio .fs-panel,
#v-film-studio .fs-card,
#v-film-studio .fs-sec,
#v-film-studio .fs-section,
#v-film-studio .fs-box,
.sc-container,
.sc-box,
.clone-box,
.sp-box,
.zone,
.wf-sidebar,
.wf-inspector,
.wf-node,
.rv-card,
.rv-panel {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-island) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.film-series-item,
.film-tab:not(.active),
#v-film-studio .fs-series-item,
#v-film-studio .fs-item,
#v-film-studio .fs-tab:not(.active),
.sc-mode-tab:not(.active),
.muse-review-step-pills,
.muse-review-step-pill:not(.active),
.seg,
.seg button:not(.on),
.chip:not(.on),
.wf-catalog,
.wf-toolbar,
.modal .box,
.guide-item {
  background: var(--bg-elevated) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-primary) !important;
}

.film-series-item.active,
#v-film-studio .fs-series-item.active,
#v-film-studio .fs-tab.active,
.sc-mode-tab.active {
  background: var(--accent-soft) !important;
  border-color: var(--border-accent) !important;
  color: var(--text-primary) !important;
}

.film-tab.active,
.chip.on,
.seg button.on {
  background: var(--accent-primary) !important;
  border-color: var(--border-accent) !important;
  color: #FFFFFF !important;
}

/* Inputs, Selects & Textareas */
.in,
input.in,
select.in,
textarea.in,
.select select,
.main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.main select,
.main textarea {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-control) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
}

.in:focus,
select.in:focus,
textarea.in:focus,
.main input:focus,
.main select:focus,
.main textarea:focus {
  border-color: var(--border-accent) !important;
  outline: none !important;
}

/* Typography Contrast in both Dark & Light modes */
.muted,
.small.muted,
.sc-fld > span,
.lbl {
  color: var(--text-secondary) !important;
}

h1, h2, h3, h4, .card-h b, .crumb b {
  color: var(--text-primary) !important;
}

/* Buttons */
.btn,
button.outline {
  border-radius: var(--radius-control) !important;
  font-family: var(--font-sans) !important;
}

.btn.grad {
  background: var(--accent-primary) !important;
  border: 1px solid var(--border-accent) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

.btn.grad:hover {
  filter: brightness(1.08);
}

.btn.outline,
.ib,
.zoom-ctrl,
.zoom-ctrl button {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-primary) !important;
}

/* Console Log Island */
.console {
  background: var(--bg-terminal) !important;
  border-radius: var(--radius-island) !important;
  border: 1px solid var(--border-subtle) !important;
  margin: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
}

.console-h {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-island) var(--radius-island) 0 0 !important;
  padding: 6px 12px !important;
}

#console-copy,
#console-clear {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-control) !important;
  padding: 3px 10px !important;
  color: var(--text-secondary) !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  text-decoration: none !important;
}

#console-copy:hover,
#console-clear:hover {
  border-color: var(--border-strong) !important;
  color: var(--text-primary) !important;
}

.console-body {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  color: var(--text-secondary) !important;
}

.console-body .log-t {
  color: var(--text-muted) !important;
}

.console-body .log-lic {
  color: var(--status-success) !important;
}

.console-body .log-sys {
  color: var(--status-info) !important;
}

/* Theme Picker inside Settings */
.zmuse-theme-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-island);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.zmuse-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.zmuse-theme-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.zmuse-theme-btn:hover {
  border-color: var(--border-strong);
}

.zmuse-theme-btn.active {
  background: var(--accent-soft);
  border-color: var(--border-accent);
}

.zmuse-swatch {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.zmuse-swatch i {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 4px 0 0 0;
}

.zmuse-theme-meta b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.zmuse-theme-meta small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.guide-list {
  display: grid;
  gap: var(--island-gap);
}

.guide-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-island);
  padding: 14px 16px;
}
