/* ═══════════════════════════════════════════════════
   GALAXY FX  —  dock button + control panel styles
   accent: #8899ff (indigo-blue)
═══════════════════════════════════════════════════ */

/* ── Dock button icon ──────────────────────────────── */
.gfx-btn-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Core star */
.gfx-btn-core {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #aabbff 55%, transparent 100%);
  box-shadow: 0 0 6px 2px #8899ff, 0 0 14px 4px rgba(136,153,255,.4);
  z-index: 3;
}

/* Arm rings — ellipses that give the galaxy spiral look */
.gfx-btn-arm {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(136,153,255,.55);
  animation: gfx-spin linear infinite;
  box-shadow: 0 0 3px rgba(136,153,255,.3);
}
.gfx-btn-arm-1 {
  width: 22px; height: 10px;
  animation-duration: 5s;
  border-color: rgba(136,153,255,.65);
}
.gfx-btn-arm-2 {
  width: 32px; height: 14px;
  animation-duration: 8s;
  animation-direction: reverse;
  border-color: rgba(180,160,255,.45);
}
.gfx-btn-arm-3 {
  width: 20px; height: 8px;
  transform: rotate(55deg);
  animation-duration: 6.5s;
  border-color: rgba(200,210,255,.3);
}

@keyframes gfx-spin {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}

/* When active (panel open) make it brighter */
#module-galaxy-fx.is-active .gfx-btn-core {
  box-shadow: 0 0 10px 4px #8899ff, 0 0 20px 8px rgba(136,153,255,.6);
}
#module-galaxy-fx.is-active .gfx-btn-arm {
  border-color: rgba(136,153,255,.9);
}

/* ── Background type tabs ───────────────────────────── */
.gfx-type-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 12px;
  background: rgba(136,153,255,.06);
  border-radius: 8px;
  padding: 3px;
}
.gfx-type-tab {
  flex: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: rgba(180,190,255,.55);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.gfx-type-tab:hover { color: #aabbff; }
.gfx-type-tab--active {
  background: rgba(136,153,255,.22);
  border-color: rgba(136,153,255,.45);
  color: #ccd5ff;
}

/* ── Shader Lab cards ───────────────────────────────── */
.gfx-shader-cards {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 5px;
  margin-bottom: 10px;
}
.gfx-shader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid rgba(136,153,255,.15);
  background: rgba(136,153,255,.05);
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.gfx-shader-card:hover {
  border-color: rgba(136,153,255,.4);
  background: rgba(136,153,255,.12);
}
.gfx-shader-card--active {
  border-color: rgba(136,153,255,.65);
  background: rgba(136,153,255,.2);
}
.gfx-shader-icon { font-size: 20px; margin-bottom: 3px; }
.gfx-shader-name { font-size: 9px; font-weight: 700; color: #ccd5ff; letter-spacing: .05em; margin-bottom: 2px; }
.gfx-shader-sub  { font-size: 7px; color: rgba(180,190,255,.45); }
.gfx-shader-controls { margin-top: 8px; }

/* ── NASA tab ───────────────────────────────────────── */
.gfx-nasa-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.gfx-nasa-cat-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(136,153,255,.2);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.6);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.gfx-nasa-cat-btn:hover { border-color: rgba(136,153,255,.4); color: #aabbff; }
.gfx-nasa-cat--active {
  border-color: rgba(136,153,255,.65);
  background: rgba(136,153,255,.2);
  color: #ccd5ff;
}
.gfx-nasa-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 4px;
  margin-bottom: 8px;
  min-height: 60px;
}
.gfx-nasa-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 5px;
  border: 2px solid rgba(136,153,255,.12);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: all .15s;
}
.gfx-nasa-thumb:hover { border-color: rgba(136,153,255,.5); }
.gfx-nasa-thumb--active { border-color: #8899ff; box-shadow: 0 0 8px rgba(136,153,255,.5); }
.gfx-nasa-loading {
  grid-column: 1/-1;
  text-align: center;
  font-size: 9px;
  color: rgba(180,190,255,.4);
  padding: 14px 0;
}
.gfx-nasa-refresh-btn {
  width: 100%;
  padding: 5px;
  border-radius: 6px;
  border: 1px solid rgba(136,153,255,.2);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.6);
  font-size: 9px;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 4px;
}
.gfx-nasa-refresh-btn:hover { border-color: rgba(136,153,255,.4); color: #aabbff; }

/* ── Panel ─────────────────────────────────────────── */
#gfx-panel {
  position: fixed;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  width: 300px;
  background: rgba(8, 9, 22, 0.94);
  border: 1px solid rgba(136, 153, 255, 0.22);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,10,.7), 0 0 0 1px rgba(136,153,255,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #cdd5ff;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 12px;
  z-index: 1200;
  user-select: none;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#gfx-panel.gfx-visible {
  display: flex;
}

/* Drag header */
.gfx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px 10px;
  border-bottom: 1px solid rgba(136,153,255,.12);
  cursor: move;
  background: rgba(136,153,255,.05);
  flex-shrink: 0;
}
.gfx-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #aabbff;
}
.gfx-close {
  background: none;
  border: none;
  color: rgba(180,190,255,.5);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.gfx-close:hover { color: #fff; background: rgba(136,153,255,.18); }

/* Scrollable body */
.gfx-body {
  padding: 12px 14px 14px;
  overflow-y: auto;
  flex: 1;
}
.gfx-body::-webkit-scrollbar { width: 4px; }
.gfx-body::-webkit-scrollbar-track { background: transparent; }
.gfx-body::-webkit-scrollbar-thumb { background: rgba(136,153,255,.25); border-radius: 2px; }

/* Section labels */
.gfx-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(136,153,255,.6);
  margin: 12px 0 6px;
}
.gfx-section-label:first-child { margin-top: 0; }

/* Preset cards — horizontal banners */
.gfx-preset-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}
.gfx-preset-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(136,153,255,.15);
  background: rgba(136,153,255,.06);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.gfx-preset-card:hover {
  border-color: rgba(136,153,255,.4);
  background: rgba(136,153,255,.12);
}
.gfx-preset-card.gfx-preset--active {
  border-color: rgba(136,153,255,.65);
  background: rgba(136,153,255,.18);
}
.gfx-preset-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0,0,0,.4);
}
.gfx-preset-info { flex: 1; }
.gfx-preset-name {
  font-size: 11px;
  font-weight: 600;
  color: #dde4ff;
  margin-bottom: 2px;
}
.gfx-preset-desc {
  font-size: 9px;
  color: rgba(180,190,255,.55);
  line-height: 1.3;
}
.gfx-preset-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(136,153,255,.5);
  flex-shrink: 0;
}
.gfx-preset-card.gfx-preset--active .gfx-preset-dot {
  background: #8899ff;
  box-shadow: 0 0 5px #8899ff;
}

/* Row controls */
.gfx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.gfx-row--stack {
  align-items: flex-start;
}
.gfx-row-label {
  font-size: 10px;
  color: rgba(180,190,255,.75);
  flex: 1;
  white-space: nowrap;
}
.gfx-row-value {
  font-size: 9px;
  color: rgba(136,153,255,.8);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.gfx-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: rgba(136,153,255,.2);
  outline: none;
  flex: 1.5;
  cursor: pointer;
}
.gfx-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #8899ff;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(136,153,255,.6);
}
.gfx-slider:hover::-webkit-slider-thumb {
  box-shadow: 0 0 8px rgba(136,153,255,.9);
}

.gfx-star-style-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  flex: 1.5;
}

.gfx-star-style-btn {
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(136,153,255,.18);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.7);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all .15s ease;
}

.gfx-star-style-btn:hover {
  border-color: rgba(136,153,255,.42);
  color: #cfd7ff;
  background: rgba(136,153,255,.12);
}

.gfx-star-style-btn.gfx-star-style--active {
  border-color: rgba(136,153,255,.68);
  color: #eef2ff;
  background: rgba(136,153,255,.22);
  box-shadow: 0 0 10px rgba(136,153,255,.16);
}

/* Toggle switch */
.gfx-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gfx-toggle-label {
  font-size: 10px;
  color: rgba(180,190,255,.75);
}
.gfx-toggle {
  position: relative;
  width: 30px; height: 16px;
  cursor: pointer;
}
.gfx-toggle input { opacity: 0; width: 0; height: 0; }
.gfx-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(136,153,255,.2);
  border-radius: 8px;
  transition: background .2s;
}
.gfx-toggle input:checked ~ .gfx-toggle-track {
  background: rgba(136,153,255,.55);
}
.gfx-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(180,190,255,.6);
  transition: transform .2s, background .2s;
}
.gfx-toggle input:checked ~ .gfx-toggle-thumb {
  transform: translateX(14px);
  background: #8899ff;
}

/* Quality buttons */
.gfx-quality-group {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.gfx-quality-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid rgba(136,153,255,.2);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.6);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}
.gfx-quality-btn:hover {
  border-color: rgba(136,153,255,.4);
  color: #aabbff;
}
.gfx-quality-btn.gfx-quality--active {
  border-color: rgba(136,153,255,.65);
  background: rgba(136,153,255,.22);
  color: #ccd5ff;
}

/* Enable button at the bottom */
.gfx-enable-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(136,153,255,.1);
}
.gfx-enable-btn {
  width: 100%;
  padding: 8px 0;
  border-radius: 8px;
  border: 1px solid rgba(136,153,255,.35);
  background: rgba(136,153,255,.12);
  color: #aabbff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
}
.gfx-enable-btn:hover {
  background: rgba(136,153,255,.22);
  border-color: rgba(136,153,255,.6);
}
.gfx-enable-btn.gfx-active {
  background: rgba(136,153,255,.28);
  border-color: #8899ff;
  color: #dde8ff;
  box-shadow: 0 0 12px rgba(136,153,255,.3);
}

/* Divider */
.gfx-divider {
  border: none;
  border-top: 1px solid rgba(136,153,255,.1);
  margin: 10px 0;
}

/* Star density row */
.gfx-star-layers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin-bottom: 8px;
}
.gfx-star-layer-btn {
  padding: 5px 0;
  border-radius: 6px;
  border: 1px solid rgba(136,153,255,.2);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.6);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.gfx-star-layer-btn.gfx-layer--active {
  border-color: rgba(136,153,255,.6);
  background: rgba(136,153,255,.2);
  color: #ccd5ff;
}

/* ── Emission palette buttons ───────────────────────── */
.gfx-palette-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.gfx-palette-btn {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(136,153,255,.2);
  background: rgba(136,153,255,.06);
  color: rgba(180,190,255,.6);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: all .15s;
}
.gfx-palette-btn:hover {
  border-color: rgba(136,153,255,.4);
  color: #aabbff;
}
.gfx-palette-btn.gfx-palette--active {
  border-color: rgba(136,153,255,.65);
  background: rgba(136,153,255,.22);
  color: #ccd5ff;
  box-shadow: 0 0 6px rgba(136,153,255,.25);
}

/* ── Mouse interaction hint ─────────────────────────── */
.gfx-mouse-hint {
  font-size: 8px;
  color: rgba(136,153,255,.5);
  text-align: center;
  padding: 5px 0 2px;
  letter-spacing: .04em;
  font-style: italic;
}
