*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg-deep: #0a0e1a;
  --bg-base: #0f1422;
  --bg-surface: #161c2e;
  --bg-elevated: #1c2438;
  --bg-hover: #222b42;
  --border: #2a3452;
  --border-light: #1e2740;
  --text-primary: #e8ecf4;
  --text-secondary: #8892a8;
  --text-muted: #5a6478;
  --accent: #6c5ce7;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --accent-light: #a29bfe;
  --success: #00d2a0;
  --success-bg: rgba(0, 210, 160, 0.1);
  --warning: #fdcb6e;
  --warning-bg: rgba(253, 203, 110, 0.1);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.1);
  --info: #74b9ff;
  --info-bg: rgba(116, 185, 255, 0.1);
  --gold: #f9ca24;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --font: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Consolas', monospace;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.app { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  width: 240px;
  background: var(--bg-base);
  border-right: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-light); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: 18px; box-shadow: 0 0 20px var(--accent-glow);
}
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.logo-sub { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-section-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 8px 12px 6px; font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; position: relative; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(108,92,231,0.15), rgba(108,92,231,0.05));
  color: var(--accent-light);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--accent); color: white;
  font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600;
}
.sidebar-footer { padding: 16px 14px; border-top: 1px solid var(--border-light); }
.user-block {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.user-block:hover { background: var(--bg-hover); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #fd79a8);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.user-info { flex: 1; }
.user-name { font-size: 12px; font-weight: 600; }
.user-role { font-size: 10px; color: var(--text-muted); }

/* ---- Main ---- */
.main { margin-left: 240px; flex: 1; min-height: 100vh; }
.topbar {
  height: 56px; background: var(--bg-base); border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
}
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-breadcrumb { font-size: 12px; color: var(--text-muted); }
.topbar-breadcrumb span { color: var(--text-secondary); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.page-content { padding: 24px 28px; }

/* ---- Stats Grid ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 18px 20px; position: relative; overflow: hidden;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 80px; height: 80px; border-radius: 50%; filter: blur(40px); opacity: 0.12; pointer-events: none;
}
.stat-card.purple::after { background: var(--accent); }
.stat-card.green::after { background: var(--success); }
.stat-card.gold::after { background: var(--gold); }
.stat-card.blue::after { background: var(--info); }
.stat-label {
  font-size: 11px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; font-weight: 600; margin-bottom: 8px;
}
.stat-value { font-size: 26px; font-weight: 700; font-family: var(--mono); letter-spacing: -0.5px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 12px var(--accent-glow); }
.btn-primary:hover { background: #7c6ef0; transform: translateY(-1px); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---- Cards ---- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card-header {
  padding: 16px 20px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border-light);
}
.card-title { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th {
  padding: 10px 16px; text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border-light); white-space: nowrap;
  background: var(--bg-surface); position: sticky; top: 0;
}
tbody td {
  padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle; transition: background var(--transition);
}
tbody tr:hover td { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-active { color: var(--success); background: var(--success-bg); }
.badge-inactive { color: var(--text-muted); background: var(--bg-elevated); }
.badge-draft { color: var(--warning); background: var(--warning-bg); }
.badge-maintenance { color: var(--info); background: var(--info-bg); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500; font-family: var(--mono);
}
.tag-slot { background: rgba(108,92,231,0.15); color: var(--accent-light); }

/* ---- Auth ---- */
.auth-overlay {
  position: fixed; inset: 0; background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center; z-index: 500;
}
.auth-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px; width: 400px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.auth-card h2 { font-size: 22px; margin-bottom: 8px; }
.auth-card .auth-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
.auth-card input {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-primary);
  font-family: var(--font); font-size: 13px; outline: none; margin-bottom: 12px;
}
.auth-card input:focus { border-color: var(--accent); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 8px; }
.auth-error { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 18px; }

/* ---- Section pages ---- */
.section-page { display: none; }
.section-page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h2 { font-size: 18px; font-weight: 700; }
.page-header p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* grid layout */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---- JSON editor ---- */
.json-editor {
  width: 100%; min-height: 300px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; color: var(--text-primary); font-family: var(--mono);
  font-size: 12px; resize: vertical; outline: none;
}
.json-editor:focus { border-color: var(--accent); }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 20px; font-size: 13px;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px);
  transition: all 0.3s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* link */
a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Lava visual config ---- */
.lava-summary-card {
  background: var(--bg-elevated); border-radius: var(--radius);
  padding: 14px 16px; font-size: 13px;
}
.lava-summary-card .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.lava-summary-card .val { font-size: 18px; font-weight: 700; font-family: var(--mono); }
.lava-summary-card .sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lava-bar-col {
  flex: 1; min-width: 16px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; cursor: pointer; border: none;
  background: none; padding: 0; font-family: var(--font);
}
.lava-bar-col:hover .lava-bar { opacity: 0.8; }
.lava-bar-col.selected .lava-bar { box-shadow: 0 0 8px var(--accent-glow); }
.lava-bar { width: 100%; border-radius: 4px 4px 0 0; transition: opacity 0.2s; }
.lava-bar.pos { background: var(--success); }
.lava-bar.neg { background: var(--danger); }
.lava-bar-val { font-size: 9px; color: var(--text-muted); margin-bottom: 2px; }
.lava-bar-lbl { font-size: 9px; color: var(--text-muted); margin-top: 4px; }
.lava-pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600; margin-right: 3px;
}
.lava-pill.free { background: var(--success-bg); color: var(--success); }
.lava-pill.link { background: var(--info-bg); color: var(--info); }
.lava-pill.big { background: var(--warning-bg); color: var(--warning); }
.vc-section { margin-bottom: 8px; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; }
.vc-section summary {
  padding: 12px 16px; cursor: pointer; display: flex; align-items: center;
  gap: 8px; font-size: 13px; font-weight: 600;
  background: var(--bg-elevated); user-select: none;
}
.vc-section summary:hover { background: var(--bg-hover); }
.vc-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: rgba(108,92,231,0.15); color: var(--accent-light); }
.gv-section-publish { margin-left: auto; font-size: 11px !important; padding: 2px 10px !important; opacity: 0.85; transition: all 0.3s; }
.gv-section-publish:hover { opacity: 1; }
.gv-section-publish.publishing, .gv-item-publish.publishing { opacity: 0.6; cursor: wait; background: var(--text-muted) !important; }
.gv-section-publish.publish-ok, .gv-item-publish.publish-ok { background: var(--success) !important; color: #fff !important; opacity: 1; }
.gv-section-publish.publish-fail, .gv-item-publish.publish-fail { background: var(--danger) !important; color: #fff !important; opacity: 1; }
.gv-item-publish { font-size: 11px !important; padding: 2px 10px !important; margin-left: 4px; }
.vc-body { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.vc-row-wrap { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.vc-row-wrap:last-child { border-bottom: none; padding-bottom: 0; }
.vc-guide { font-size: 11px; color: var(--text-muted); line-height: 1.5; padding: 4px 8px; background: rgba(108,92,231,0.06); border-radius: 4px; border-left: 2px solid var(--accent); }
.vc-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vc-row.wide { flex-direction: column; align-items: flex-start; }
.vc-label { flex: 1; min-width: 200px; font-size: 12px; color: var(--text-secondary); }
.vc-label strong { display: block; color: var(--text-primary); font-size: 13px; margin-bottom: 2px; }
.vc-impact { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.vc-impact.high { background: var(--danger); }
.vc-impact.mid { background: var(--warning); }
.vc-impact.low { background: var(--success); }
.vc-slider { width: 180px; accent-color: var(--accent); }
.vc-num {
  width: 80px; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; color: var(--text-primary);
  font-family: var(--mono); font-size: 12px; outline: none;
}
.vc-num:focus { border-color: var(--accent); }
.vc-wmap { display: flex; gap: 10px; flex-wrap: wrap; }
.vc-wmap-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.vc-wmap-item input {
  width: 60px; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 6px; color: var(--text-primary);
  font-family: var(--mono); font-size: 12px; outline: none; text-align: center;
}
.lava-day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lava-day-card { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 10px 12px; }
.lava-day-card .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.lava-day-card .val { font-size: 16px; font-weight: 700; font-family: var(--mono); margin: 2px 0; }
.lava-day-card .sub { font-size: 10px; color: var(--text-muted); }
.lava-day-card.positive .val { color: var(--success); }
.lava-day-card.negative .val { color: var(--danger); }

/* ---- Game Visual Editor ---- */
.gv-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.gv-field label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
/* Per-row save buttons in 风控 admin tab: prevent button from stretching to
   full row width (column-flex makes children stretch on cross-axis by default).
   Adds breathing room above the button so it doesn't crowd the input. */
.gv-field > button.btn-sm { align-self: flex-start; margin-top: 4px; }
.gv-input {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; color: var(--text-primary); font-family: var(--font); font-size: 13px; outline: none;
}
.gv-input:focus { border-color: var(--accent); }
.gv-field select {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; color: var(--text-primary); font-size: 13px; outline: none; cursor: pointer;
  max-width: 240px;
}
.gv-hint { font-size: 10px; color: var(--text-muted); }
.gv-upload-row { display: flex; gap: 8px; align-items: center; }
.gv-upload-btn { cursor: pointer; white-space: nowrap; }
.gv-thumb {
  width: 120px; height: 80px; object-fit: contain; border-radius: 6px;
  border: 1px dashed var(--border); cursor: pointer; background: var(--bg-elevated);
  transition: border-color 0.2s;
}
.gv-thumb:hover { border-color: var(--accent); }
/* Preview */
.gv-preview {
  position: relative; width: 100%; aspect-ratio: 16/9; max-height: 420px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: #090611;
}
.gv-preview-title { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; }
.gv-preview-title img { height: 48px; max-width: 280px; object-fit: contain; }
.gv-preview-reels { position: relative; z-index: 1; }
.gv-preview-reel-frame { position: relative; }
.gv-preview-reel-frame > img { width: 360px; height: auto; display: block; }
.gv-preview-symbols {
  position: absolute; top: 12%; left: 8%; right: 8%; bottom: 12%;
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 2px; padding: 4px;
}
.gv-preview-symbols img { width: 100%; height: 100%; object-fit: contain; }
.gv-preview-bar {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; z-index: 2;
}
.gv-preview-progress { position: relative; width: 160px; height: 18px; }
.gv-preview-prog-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.gv-preview-prog-fill { position: absolute; inset: 0; width: 60%; height: 100%; object-fit: fill; }
.gv-preview-btn {
  padding: 6px 24px; border-radius: 20px; font-weight: 700; font-size: 13px;
  color: #fff; cursor: default; letter-spacing: 1px;
}
.gv-preview-link { position: absolute; top: 8px; right: 12px; height: 36px; object-fit: contain; z-index: 2; }
.gv-preview-bigwin { position: absolute; bottom: 40px; right: 12px; height: 40px; object-fit: contain; z-index: 2; opacity: 0.7; }
/* Symbol Grid */
.gv-symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gv-symbol-card {
  background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 10px; text-align: center; position: relative;
}
.gv-symbol-card img { width: 64px; height: 64px; object-fit: contain; cursor: pointer; border-radius: 4px; }
.gv-symbol-card img:hover { outline: 2px solid var(--accent); }
.gv-symbol-card .gv-sym-name { font-size: 12px; font-weight: 600; margin-top: 6px; }
.gv-symbol-card .gv-sym-cat { font-size: 10px; color: var(--text-muted); }
.gv-sym-actions { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.gv-sym-link {
  font-size: 10px; color: var(--accent-light); background: none; border: none;
  cursor: pointer; padding: 2px 6px; border-radius: 3px; font-family: var(--font);
  text-decoration: none; display: inline-block;
}
.gv-sym-link:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.gv-symbol-card input:not([type="range"]) {
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 6px; color: var(--text-primary); font-size: 11px; width: 100%;
  outline: none; margin-top: 4px; text-align: center;
}
.gv-sym-scale input[type="range"] { flex: 1; min-width: 0; height: 16px; margin: 0; }
.gv-sym-scale span { flex-shrink: 0; }
.gv-symbol-card select {
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 4px; color: var(--text-primary); font-size: 10px; width: 100%;
  outline: none; margin-top: 2px;
}
/* UI asset row */
.gv-ui-asset { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.gv-ui-asset:last-child { border-bottom: none; }
.gv-ui-asset img { width: 80px; height: 50px; object-fit: contain; border-radius: 4px; background: var(--bg-deep); cursor: pointer; border: 1px dashed var(--border); }
.gv-ui-asset img:hover { border-color: var(--accent); }
.gv-ui-asset .gv-ui-info { flex: 1; }
.gv-ui-asset .gv-ui-label { font-size: 12px; font-weight: 600; }
.gv-ui-asset .gv-ui-path { font-size: 11px; color: var(--text-muted); font-family: var(--mono); word-break: break-all; }
.gv-ui-asset.asset-missing img { opacity: 0.55; border-color: #6e7681; }
.gv-ui-asset.asset-missing .gv-ui-label::after { content: " · 未上传"; color: #6e7681; font-size: 10px; font-weight: 400; }
.gv-ui-asset.asset-fallback img { border-color: #d4a017; border-style: dotted; }
.gv-ui-asset.asset-fallback .gv-ui-label::after { content: " · 默认图"; color: #d4a017; font-size: 10px; font-weight: 400; }

/* Animation preview */
@keyframes gv-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.gv-bigwin-overlay {
  position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:rgba(0,0,0,0.7);z-index:10;border-radius:8px;animation:gv-fadeIn 0.3s;overflow:hidden;
}
@keyframes gv-fadeIn { from{opacity:0} to{opacity:1} }
.gv-bigwin-text {
  font-size:36px;font-weight:900;color:#ffd700;text-shadow:0 0 20px #ff8c00,0 0 40px #ff4500;
  animation:gv-pulse 0.5s ease infinite alternate;z-index:2;
}
@keyframes gv-pulse { from{transform:scale(1);filter:brightness(1)} to{transform:scale(1.12);filter:brightness(1.3)} }
.gv-bigwin-particles { position:absolute;inset:0;pointer-events:none; }
.gv-particle { position:absolute;width:6px;height:6px;border-radius:50%;opacity:0;animation:gv-burst 1.2s ease-out forwards; }
.gv-particle-explosion { background:#ff4500;box-shadow:0 0 8px #ff6600; }
.gv-particle-coins { background:#ffd700;width:10px;height:10px;border-radius:2px;box-shadow:0 0 6px gold; }
.gv-particle-fireworks { box-shadow:0 0 8px #ff69b4;width:5px;height:5px; }
.gv-particle-fireworks:nth-child(odd) { background:#ff00ff; }
.gv-particle-fireworks:nth-child(even) { background:#00ffff; }
.gv-particle-fireworks:nth-child(3n) { background:#ffff00; }
.gv-particle-lava { background:#ff3300;box-shadow:0 0 12px #ff6600;width:8px;height:8px; }
@keyframes gv-burst {
  0% { transform:translate(0,0) scale(0.5);opacity:1 }
  100% { transform:translate(var(--dx,50px),var(--dy,-80px)) scale(0.2);opacity:0 }
}

.gv-particle-layer { position:absolute;inset:0;pointer-events:none;z-index:5; }
.gv-bg-particle { position:absolute;width:4px;height:4px;border-radius:50%;animation:gv-float 3s ease-in-out forwards; }
.gv-bg-particle-embers { background:#ff6633;box-shadow:0 0 6px #ff4400; }
.gv-bg-particle-sparkles { background:#ffffcc;box-shadow:0 0 8px #fff;width:3px;height:3px; }
.gv-bg-particle-bubbles { background:rgba(100,200,255,0.5);border:1px solid rgba(150,220,255,0.4);width:8px;height:8px; }
@keyframes gv-float { 0%{transform:translateY(0) translateX(0);opacity:0.8} 50%{opacity:1} 100%{transform:translateY(-160px) translateX(15px);opacity:0} }

/* Preview toolbar */
.gv-preview-toolbar {
  background: var(--bg-surface); border-top: 1px solid var(--border);
  padding: 10px 14px; display: flex; flex-direction: column; gap: 8px;
}
.gv-toolbar-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.gv-toolbar-label {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  min-width: 56px; white-space: nowrap;
}
.gv-toolbar-mini {
  font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px;
}
.gv-toolbar-row select {
  background: var(--bg-deep); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-primary); font-size: 11px; padding: 3px 6px;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; border: none; border-radius: 4px; font-size: 11px;
  padding: 3px 10px; cursor: pointer; font-weight: 600;
}
.btn-accent:hover { filter: brightness(1.15); }

/* Publish flow */
.gv-publish-flow { margin-top: 16px; }

/* Custom confirm dialog */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: gv-fadeIn 0.15s ease-out;
}
.confirm-dialog {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px 32px; min-width: 360px; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.confirm-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px;
}
.confirm-msg {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px;
}
.confirm-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.confirm-actions .btn { min-width: 80px; padding: 8px 20px; font-size: 13px; font-weight: 600; }

/* Env switcher */
.env-switch {
  display: inline-flex; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
}
.env-btn {
  padding: 4px 14px; font-size: 12px; font-weight: 600; border: none; cursor: pointer;
  background: var(--bg-surface); color: var(--text-muted); transition: all .2s;
}
.env-btn.active[data-env="test"] { background: var(--info); color: #fff; }
.env-btn.active[data-env="prod"] { background: var(--danger); color: #fff; }
.env-btn:hover:not(.active) { background: var(--bg-hover); color: var(--text-secondary); }
.env-indicator {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px;
}
.env-indicator.env-test { background: var(--info-bg); color: var(--info); }
.env-indicator.env-prod { background: var(--danger-bg); color: var(--danger); }

.hidden { display: none !important; }
