:root {
  --rf-bg: #06070a;
  --rf-bg-2: #101116;
  --rf-surface: #5f6268;
  --rf-surface-2: #494d54;
  --rf-surface-3: #70747b;
  --rf-wear: #8b9098;
  --rf-panel: rgba(79, 84, 92, 0.92);
  --rf-panel-2: rgba(58, 62, 69, 0.96);
  --rf-border: #2f3339;
  --rf-border-2: #8f959e;
  --rf-text: #f3f1e8;
  --rf-muted: #d0c7b2;
  --rf-primary: #ff4fd8;
  --rf-primary-2: #ffe84a;
  --rf-accent: #71ff6a;
  --rf-accent-2: #ff9a3d;
  --rf-success: #71ff6a;
  --rf-danger: #ff4b4b;
  --rf-shadow: rgba(0, 0, 0, 0.44);
  --rf-radius: 16px;
  --rf-red-btn-top: #ff5b5b;
  --rf-red-btn-bottom: #b51515;
  --rf-yellow-btn-top: #ffe75a;
  --rf-yellow-btn-bottom: #c89d12;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--rf-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rf-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.20), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 232, 74, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(113, 255, 106, 0.12), transparent 22%),
    linear-gradient(180deg, #050607 0%, #0b0d11 36%, #050607 100%);
  color: var(--rf-text);
}

.rf-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.22;
}

.rf-body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 120px rgba(0, 0, 0, 0.55),
    inset 0 0 220px rgba(0, 0, 0, 0.35);
}

.rf-header,
.rf-main,
.rf-footer {
  position: relative;
  z-index: 1;
}

.rf-header {
  max-width: 1380px;
  margin: 18px auto 14px;
  padding: 0 16px 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rf-brand {
  display: flex;
  align-items: center;
}

.rf-logo {
  height: 58px;
  width: auto;
  display: block;
  image-rendering: auto;
  filter:
    drop-shadow(0 0 10px rgba(255, 79, 216, 0.25))
    drop-shadow(0 0 14px rgba(255, 232, 74, 0.15))
    drop-shadow(0 4px 10px rgba(0,0,0,0.38));
}

.rf-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rf-chip {
  border: 1px solid rgba(255, 79, 216, 0.35);
  background:
    linear-gradient(180deg, rgba(41, 42, 48, 0.92), rgba(27, 28, 33, 0.92));
  color: var(--rf-text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 232, 74, 0.08) inset,
    0 0 12px rgba(255, 79, 216, 0.08);
}

.rf-main {
  max-width: 1380px;
  margin: 0 auto 40px;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: 390px 1fr;
  grid-template-areas:
    "controls gallery"
    "presets presets";
  gap: 18px;
}

.rf-controls {
  grid-area: controls;
  position: relative;
  overflow: hidden;
}

.rf-controls::after {
  content: "";
  position: absolute;
  inset: auto 10px 10px 10px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4a2b16, #8a5d36, #4a2b16);
  opacity: 0.58;
  pointer-events: none;
}

.rf-gallery {
  grid-area: gallery;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.rf-presets {
  grid-area: presets;
}

.rf-panel {
  background:
    linear-gradient(180deg, rgba(109, 114, 122, 0.96), rgba(74, 78, 86, 0.96));
  border: 1px solid #2c2f34;
  border-radius: 18px;
  box-shadow:
    0 18px 44px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.28);
  padding: 18px;
  position: relative;
}

.rf-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 18%, transparent 82%, rgba(0,0,0,0.12)),
    radial-gradient(circle at 15% 18%, rgba(255,255,255,0.08), transparent 20%),
    radial-gradient(circle at 85% 28%, rgba(0,0,0,0.12), transparent 28%);
  opacity: 0.9;
}

.rf-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 79, 216, 0.12),
    inset 0 0 18px rgba(255, 232, 74, 0.06),
    inset 0 0 24px rgba(113, 255, 106, 0.05);
}

.rf-panel-head,
.rf-presets-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.rf-panel__title {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #fff5d8;
  text-shadow:
    0 0 10px rgba(255, 79, 216, 0.18),
    0 0 8px rgba(255, 232, 74, 0.10);
}

.rf-muted {
  color: var(--rf-muted);
  font-size: 12px;
  margin: 0;
}

.rf-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.rf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rf-field--full {
  grid-column: 1 / -1;
}

.rf-label {
  font-size: 12px;
  color: #f0e0b0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 232, 74, 0.08);
}

.rf-input {
  width: 100%;
  background:
    linear-gradient(180deg, rgba(33, 35, 40, 0.96), rgba(20, 22, 26, 0.98));
  color: var(--rf-text);
  border: 1px solid #2b2f36;
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

.rf-input:focus {
  border-color: var(--rf-primary);
  box-shadow:
    0 0 0 3px rgba(255, 79, 216, 0.16),
    0 0 18px rgba(255, 232, 74, 0.08);
}

.rf-textarea {
  resize: vertical;
  min-height: 84px;
}

.rf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.rf-btn {
  appearance: none;
  border: 1px solid rgba(86, 28, 28, 0.95);
  background: linear-gradient(180deg, var(--rf-red-btn-top) 0%, var(--rf-red-btn-bottom) 100%);
  color: #fff8ef;
  padding: 11px 16px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -2px 0 rgba(90, 8, 8, 0.35);
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
  transition: transform .08s ease, filter .18s ease, box-shadow .18s ease;
}

.rf-btn:hover {
  filter: brightness(1.08);
  box-shadow:
    0 0 18px rgba(255, 75, 75, 0.18),
    0 4px 14px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -2px 0 rgba(90, 8, 8, 0.35);
}

.rf-btn:active {
  transform: translateY(1px);
}

.rf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rf-btn--ghost {
  border-color: rgba(118, 95, 16, 0.95);
  background: linear-gradient(180deg, var(--rf-yellow-btn-top) 0%, var(--rf-yellow-btn-bottom) 100%);
  color: #342200;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -2px 0 rgba(132, 98, 9, 0.32);
  text-shadow: none;
}

.rf-btn--ghost:hover {
  box-shadow:
    0 0 18px rgba(255, 232, 74, 0.16),
    0 4px 14px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -2px 0 rgba(132, 98, 9, 0.32);
}

.rf-progress {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.rf-progress[aria-hidden="true"] {
  display: none;
}

.rf-progress__bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #2c3139;
  background: #14171c;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}

.rf-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--rf-primary), var(--rf-primary-2), var(--rf-accent), var(--rf-primary));
  background-size: 220% 100%;
  transition: width .22s ease;
}

.rf-progress:not([aria-hidden="true"]) .rf-progress__fill {
  animation: rf-sheen 1.25s linear infinite;
}

.rf-progress__label {
  color: var(--rf-muted);
  font-size: 12px;
}

@keyframes rf-sheen {
  0% { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}

.rf-gallery-main {
  display: block;
}

.rf-gallery-feature {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(39, 42, 47, 0.92), rgba(28, 30, 34, 0.95));
  border: 1px solid #2c3139;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.rf-gallery-feature img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  max-height: 620px;
  object-fit: contain;
  background:
    linear-gradient(180deg, #191b20, #101216);
}

.rf-gallery-feature figcaption {
  padding: 10px 12px;
  border-top: 1px solid #2c3139;
  color: var(--rf-muted);
  font-size: 12px;
}

.rf-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.rf-gallery-thumb {
  background:
    linear-gradient(180deg, rgba(39, 42, 47, 0.92), rgba(28, 30, 34, 0.95));
  border: 1px solid #2f3339;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
}

.rf-gallery-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--rf-accent);
  box-shadow:
    0 0 14px rgba(113, 255, 106, 0.14),
    0 8px 22px rgba(0,0,0,0.28);
}

.rf-gallery-thumb--active {
  border-color: var(--rf-primary);
  box-shadow:
    0 0 0 2px rgba(255, 79, 216, 0.18),
    0 0 16px rgba(255, 232, 74, 0.12),
    0 8px 24px rgba(0,0,0,0.28);
}

.rf-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #17191d;
}

.rf-gallery-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #8b9098;
  border-radius: 12px;
  color: var(--rf-muted);
  font-size: 13px;
  background: rgba(45, 49, 55, 0.4);
}

.rf-status-card {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border: 1px solid #2f3339;
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(54, 58, 64, 0.78), rgba(39, 42, 47, 0.78));
}

.rf-mini-label {
  display: block;
  color: #f0e0b0;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rf-view-toggle {
  display: inline-flex;
  gap: 6px;
  background: rgba(41, 43, 49, 0.92);
  border: 1px solid #2f3339;
  padding: 4px;
  border-radius: 999px;
}

.rf-pill {
  border: 0;
  background: transparent;
  color: var(--rf-muted);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.rf-pill--active {
  background: linear-gradient(180deg, rgba(255, 79, 216, 0.18), rgba(113, 255, 106, 0.10));
  color: var(--rf-text);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 74, 0.20),
    0 0 12px rgba(255, 79, 216, 0.08);
}

.rf-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.rf-card {
  background:
    linear-gradient(180deg, rgba(58, 62, 68, 0.96), rgba(43, 46, 52, 0.98));
  border: 1px solid #2f3339;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s ease, border-color .18s ease, box-shadow .18s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

.rf-card:hover {
  transform: translateY(-2px);
  border-color: var(--rf-accent);
  box-shadow:
    0 0 14px rgba(113, 255, 106, 0.12),
    0 8px 22px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

.rf-card--selected {
  border-color: var(--rf-primary);
  box-shadow:
    0 0 0 2px rgba(255, 79, 216, 0.18),
    0 0 16px rgba(255, 232, 74, 0.10),
    0 8px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.18);
}

.rf-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #17191d;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.rf-card__img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;   /* fit image to frame */
  background: #17191d;
}

.rf-card__expand {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(10,10,10,0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  z-index: 2;
}

.rf-card__expand:hover {
  background: rgba(255, 79, 216, 0.20);
  border-color: rgba(255, 232, 74, 0.35);
}

.rf-body.rf-overlay-open {
  overflow: hidden;
}

/* Preset preview overlay (no download/delete controls) */
.rf-overlay--preset .rf-overlay-image {
  max-width: 92%;
  max-height: 86%;
}



.rf-card__body {
  padding: 12px;
}

.rf-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.rf-card__name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: #fff5d8;
}

.rf-card__cat {
  color: var(--rf-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.rf-card__blurb {
  margin-top: 10px;
  color: var(--rf-muted);
  font-size: 12px;
  line-height: 1.45;
  min-height: 34px;
}

.rf-fav {
  border: 1px solid #5d530f;
  background: linear-gradient(180deg, var(--rf-yellow-btn-top) 0%, var(--rf-yellow-btn-bottom) 100%);
  color: #503700;
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 32px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -2px 0 rgba(132, 98, 9, 0.28);
}

.rf-fav--on {
  color: #ff2aa3;
  text-shadow: 0 0 10px rgba(255, 79, 216, 0.22);
}

.rf-footer {
  max-width: 1380px;
  margin: 0 auto 20px;
  padding: 0 16px;
  color: var(--rf-muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rf-footer a {
  color: var(--rf-muted);
  text-decoration: none;
}

.rf-footer a:hover {
  color: #fff5d8;
}

#hamburgerMenu {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
}

#hamburgerIcon {
  height: 28px;
  width: 28px;
  cursor: pointer;
  filter:
    drop-shadow(0 0 8px rgba(255, 79, 216, 0.16))
    drop-shadow(0 2px 6px var(--rf-shadow));
  user-select: none;
}

#menuDropdown {
  position: absolute;
  top: 38px;
  left: 0;
  width: min(280px, 86vw);
  background:
    linear-gradient(180deg, rgba(61, 65, 72, 0.98), rgba(42, 45, 51, 0.98));
  border: 1px solid #2f3339;
  border-radius: 12px;
  box-shadow: 0 12px 28px var(--rf-shadow);
  padding: 10px 10px 6px;
  display: none;
}

#menuDropdown.show {
  display: block;
}

#menuDropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#menuDropdown li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}

#menuDropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--rf-text);
  text-decoration: none;
  inline-size: 100%;
  border-radius: 8px;
  padding: 4px 6px;
}

#menuDropdown li img {
  height: 18px;
  width: 18px;
  object-fit: contain;
}

#menuDropdown li a:hover {
  background: rgba(255, 79, 216, 0.10);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 74, 0.10);
}



/* Arcader image viewer overlay (Skyr-style) */
.rf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.90);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}

.rf-overlay-image {
  max-width: 90%;
  max-height: 80%;
  border: 2px solid #2a2a2a;
  border-radius: 10px;
  background: #0f0f0f;
}

.rf-overlay-close {
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.rf-overlay-controls {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 16px 0;
  padding: 10px 14px;
  background: rgba(15, 15, 15, 0.55);
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  z-index: 1;
  backdrop-filter: blur(6px);
}

.rf-overlay-controls a,
.rf-overlay-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.20);
  cursor: pointer;
  outline: none;
  padding: 0;
}

.rf-overlay-controls a:active,
.rf-overlay-controls button:active {
  transform: scale(0.98);
}

.rf-overlay-controls img {
  width: 24px;
  height: 24px;
  filter: invert(100%);
  pointer-events: none;
}

@media (max-width: 480px) {
  .rf-overlay-controls {
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
  }
  .rf-overlay-controls a,
  .rf-overlay-controls button {
    width: 50px;
    height: 50px;
  }
  .rf-overlay-controls img {
    width: 22px;
    height: 22px;
  }
}






@media (max-width: 980px) {
  .rf-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "gallery"
      "presets";
  }
}

@media (max-width: 720px) {
  .rf-header {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 56px;
  }

  .rf-brand {
    align-items: flex-start;
  }

  .rf-status-card,
  .rf-form-grid {
    grid-template-columns: 1fr;
  }

  .rf-presets-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rf-footer {
    flex-direction: column;
  }

  .rf-gallery-feature img {
    min-height: 280px;
    max-height: 420px;
  }

  .rf-gallery-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .rf-logo {
    height: 42px;
  }

  .rf-main {
    padding: 0 12px 24px;
  }

  .rf-header {
    margin-top: 18px;
    padding: 0 12px 0 52px;
  }

  .rf-preset-grid {
    grid-template-columns: 1fr;
  }
}