/* ==========================================================================
   xmcstudio.net — Hoja de estilos principal
   Tema oscuro futurista con neón cian / magenta / naranja.
   Índice:
     1. Tokens y reset          6. Hero 3D flotante
     2. Utilidades              7. Tarjetas (grid)
     3. Botones y formularios   8. Modales (detalle, auth)
     4. Selector de edición     9. Panel de creador / Admin
     5. Header y navegación    10. Toasts, footer, responsive
   ========================================================================== */

/* ---------- 1. Tokens y reset ---------- */
:root {
  --bg: #07070e;
  --bg-2: #0d0d1a;
  --panel: rgba(19, 19, 36, 0.72);
  --panel-solid: #12121f;
  --panel-2: #181830;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef0ff;
  --muted: #9aa0c6;
  --dim: #6b7099;

  --cyan: #22e6ff;
  --magenta: #ff3df2;
  --violet: #a78bfa;
  --orange: #ff8a1f;
  --green: #3dffa2;
  --red: #ff4d6d;
  --yellow: #ffd23f;

  --java: #ff8a1f;     /* Java = naranja (taza de café) */
  --bedrock: #22e6ff;  /* Bedrock = cian */

  --grad: linear-gradient(120deg, var(--magenta) 0%, var(--violet) 48%, var(--cyan) 100%);
  --grad-hot: linear-gradient(120deg, var(--orange) 0%, var(--magenta) 100%);
  --grad-cool: linear-gradient(120deg, var(--cyan) 0%, var(--violet) 100%);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8);
  --glow-c: 0 0 24px rgba(34, 230, 255, 0.35);
  --glow-m: 0 0 24px rgba(255, 61, 242, 0.35);

  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --hdr-h: 116px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  /* Fondo: halos de neón + rejilla tipo bloque */
  background-image:
    radial-gradient(900px 600px at 85% -10%, rgba(34, 230, 255, 0.12), transparent 60%),
    radial-gradient(800px 600px at -10% 10%, rgba(255, 61, 242, 0.12), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 138, 31, 0.08), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
::selection { background: rgba(255, 61, 242, 0.4); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
svg.lucide { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }

/* ---------- 2. Utilidades ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.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; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hot-text { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--muted); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 999; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.noscript { padding: 40px; text-align: center; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-2);
}
.badge svg.lucide { width: 13px; height: 13px; }
.badge-java { color: #1a0d00; background: var(--java); border-color: transparent; box-shadow: 0 0 16px rgba(255, 138, 31, 0.45); }
.badge-bedrock { color: #001a1f; background: var(--bedrock); border-color: transparent; box-shadow: 0 0 16px rgba(34, 230, 255, 0.45); }
.badge-ver { background: rgba(7, 7, 14, 0.75); backdrop-filter: blur(6px); }
.badge-pending { color: #1d1600; background: var(--yellow); border-color: transparent; }
.badge-published { color: #00180d; background: var(--green); border-color: transparent; }
.badge-rejected { color: #fff; background: var(--red); border-color: transparent; }
.badge-role-admin { color: #fff; background: var(--grad-hot); border-color: transparent; }
.badge-role-creator { color: #001a1f; background: var(--grad-cool); border-color: transparent; }
.verified { color: var(--cyan); display: inline-flex; }
.verified svg.lucide { width: 15px; height: 15px; }

/* ---------- 3. Botones y formularios ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.04em; font-size: 14px; white-space: nowrap; isolation: isolate;
  background: var(--panel-2); border: 1px solid var(--line-2);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.28); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--grad); border-color: transparent; color: #0b0618; box-shadow: var(--glow-m); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(255, 61, 242, 0.55), 0 0 60px rgba(34, 230, 255, 0.25); }
.btn-hot { background: var(--grad-hot); border-color: transparent; color: #1a0610; box-shadow: 0 0 20px rgba(255, 138, 31, 0.35); }
.btn-hot:hover { box-shadow: 0 0 32px rgba(255, 138, 31, 0.6); }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255, 77, 109, 0.15); border-color: rgba(255, 77, 109, 0.5); color: #ffb3c1; }
.btn-success { background: rgba(61, 255, 162, 0.14); border-color: rgba(61, 255, 162, 0.5); color: #b6ffdc; }
/* brillo que recorre el botón */
.btn-primary::after, .btn-hot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0; transition: background-position 0.7s var(--ease-out);
}
.btn-primary:hover::after, .btn-hot:hover::after { background-position: -40% 0; }
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25); border-top-color: #000; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--cyan); box-shadow: var(--glow-c); color: var(--cyan); }
.icon-btn[aria-pressed="false"] { color: var(--dim); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: #cfd3f5; display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 12px; color: var(--dim); }
.field .err { font-size: 12px; color: var(--red); min-height: 0; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(7, 7, 14, 0.7); border: 1px solid var(--line-2); transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { resize: vertical; min-height: 120px; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 230, 255, 0.15); }
.input.invalid, .textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.15); }
.input.valid { border-color: rgba(61, 255, 162, 0.6); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg.lucide { position: absolute; left: 13px; color: var(--dim); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.input-wrap > .input-suffix { position: absolute; right: 8px; }
.counter { font-size: 11px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--red); }
/* Honeypot anti-bots: invisible para humanos, visible para bots que rellenan todo */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(7, 7, 14, 0.7); border: 1px solid var(--line-2); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); transition: all 0.2s; }
.seg input:checked + span { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); }
.seg input[value="java"]:checked + span { color: var(--java); }
.seg input[value="bedrock"]:checked + span { color: var(--bedrock); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--magenta); width: 16px; height: 16px; }

/* ---------- 4. Selector de edición (gate) ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  overflow-y: auto; background: rgba(5, 5, 10, 0.985); backdrop-filter: blur(14px);
  animation: fadeIn 0.5s var(--ease-out);
}
.gate[hidden] { display: none; }
.gate.is-leaving { animation: gateOut 0.55s var(--ease-out) forwards; }
@keyframes gateOut { to { opacity: 0; transform: scale(1.06); filter: blur(6px); } }
.gate-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 25% 60%, rgba(255, 138, 31, 0.18), transparent 70%),
    radial-gradient(600px 400px at 75% 60%, rgba(34, 230, 255, 0.18), transparent 70%),
    radial-gradient(500px 300px at 50% 10%, rgba(255, 61, 242, 0.2), transparent 70%);
}
.gate-inner { position: relative; text-align: center; max-width: 880px; width: 100%; }
.gate-logo { width: 96px; height: 112px; margin: 0 auto 10px; filter: drop-shadow(0 0 22px rgba(255, 61, 242, 0.55)); animation: floatY 4s ease-in-out infinite; }
.gate-title { font-size: clamp(34px, 6vw, 60px); margin: 8px 0 10px; }
.gate-sub { color: var(--muted); max-width: 520px; margin: 0 auto 34px; }
.gate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; perspective: 1200px; }
.edition-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 20px 24px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line-2);
  transform-style: preserve-3d; transition: transform 0.45s var(--ease-spring), box-shadow 0.35s, border-color 0.35s;
  animation: cardIn 0.7s var(--ease-spring) both;
}
.edition-card.ed-bedrock { animation-delay: 0.12s; }
.edition-card:hover { transform: translateY(-10px) rotateX(6deg); }
.edition-card.ed-java:hover { border-color: var(--java); box-shadow: 0 0 50px rgba(255, 138, 31, 0.35), inset 0 0 40px rgba(255, 138, 31, 0.08); }
.edition-card.ed-bedrock:hover { border-color: var(--bedrock); box-shadow: 0 0 50px rgba(34, 230, 255, 0.35), inset 0 0 40px rgba(34, 230, 255, 0.08); }
.ec-label { font-family: var(--font-display); color: var(--muted); letter-spacing: 0.3em; text-transform: uppercase; font-size: 12px; margin-top: 14px; }
.ec-title { font-family: var(--font-display); font-size: clamp(22px, 3.2vw, 32px); font-weight: 700; }
.ed-java .ec-title { color: var(--java); text-shadow: 0 0 20px rgba(255, 138, 31, 0.5); }
.ed-bedrock .ec-title { color: var(--bedrock); text-shadow: 0 0 20px rgba(34, 230, 255, 0.5); }
.ec-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.ec-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 700; padding: 9px 16px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); transition: gap 0.25s; }
.edition-card:hover .ec-cta { gap: 12px; }

/* Cubo isométrico con texturas pixel generadas en canvas */
.iso-cube { --s: 92px; position: relative; width: calc(var(--s) * 1.74); height: calc(var(--s) * 2); display: block; animation: floatY 3.6s ease-in-out infinite; }
.ed-bedrock .iso-cube { animation-delay: -1.8s; }
/* Proyección isométrica con matrices 2D: cada cara mapea un cuadrado s×s a su rombo */
.iso-cube i { position: absolute; width: var(--s); height: var(--s); background-size: cover; image-rendering: pixelated; transform-origin: 0 0; }
.iso-cube .f-top { left: calc(var(--s) * 0.866); top: 0; transform: matrix(0.866, 0.5, -0.866, 0.5, 0, 0); }
.iso-cube .f-left { left: 0; top: calc(var(--s) * 0.5); transform: matrix(0.866, 0.5, 0, 1, 0, 0); filter: brightness(0.78); }
.iso-cube .f-right { left: calc(var(--s) * 0.866); top: var(--s); transform: matrix(0.866, -0.5, 0, 1, 0, 0); filter: brightness(0.58); }
.edition-card.ed-java:hover .iso-cube { filter: drop-shadow(0 0 22px rgba(255, 138, 31, 0.55)); }
.edition-card.ed-bedrock:hover .iso-cube { filter: drop-shadow(0 0 22px rgba(34, 230, 255, 0.55)); }

/* ---------- 5. Header y navegación ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 7, 14, 0.72); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: 0.55; }
.hdr-row { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 34px; height: 40px; filter: drop-shadow(0 0 10px rgba(255, 61, 242, 0.5)); transition: transform 0.4s var(--ease-spring); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.brand-text { font-family: var(--font-display); font-size: 21px; line-height: 1; display: inline-flex; align-items: baseline; }
.brand-text b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; letter-spacing: 0.02em; }
.brand-text span { color: var(--text); font-weight: 600; font-size: 0.82em; margin-left: 2px; opacity: 0.9; }

.search { position: relative; flex: 1; max-width: 520px; }
.search input {
  width: 100%; height: 42px; padding: 0 40px 0 42px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(19, 19, 36, 0.8); border: 1px solid var(--line-2); transition: all 0.25s;
}
.search input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(255, 61, 242, 0.15), var(--glow-m); }
.search-ico { position: absolute; left: 14px; top: 12px; color: var(--muted); pointer-events: none; }
.search-kbd { position: absolute; right: 10px; top: 10px; font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--dim); font-family: var(--font-display); }
.search input:focus ~ .search-kbd { opacity: 0; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; padding: 6px;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  animation: popIn 0.22s var(--ease-out);
}
.sr-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.sr-item:hover, .sr-item.is-active { background: rgba(255, 255, 255, 0.06); }
.sr-item img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; image-rendering: pixelated; }
.sr-item .sr-title { font-weight: 600; font-size: 14px; }
.sr-item .sr-meta { font-size: 12px; color: var(--muted); }
.sr-item mark { background: rgba(255, 61, 242, 0.3); color: inherit; border-radius: 3px; }
.sr-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }

.hdr-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.edition-switch { position: relative; display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(19, 19, 36, 0.8); border: 1px solid var(--line-2); }
.edition-switch button { position: relative; z-index: 1; padding: 7px 13px; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--muted); transition: color 0.25s; }
.edition-switch button[aria-checked="true"] { color: #0b0618; }
.es-indicator { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 9px; transition: all 0.4s var(--ease-spring); }
.edition-switch[data-active="java"] .es-indicator { background: var(--java); box-shadow: 0 0 18px rgba(255, 138, 31, 0.6); }
.edition-switch[data-active="bedrock"] .es-indicator { background: var(--bedrock); box-shadow: 0 0 18px rgba(34, 230, 255, 0.6); }

.auth-slot { display: flex; align-items: center; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); transition: border-color 0.2s; }
.user-chip:hover { border-color: var(--magenta); }
.avatar { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #0b0618; background: var(--grad); flex-shrink: 0; font-size: 14px; }
.avatar-sm { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.user-chip .uc-name { font-weight: 600; font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 70;
  background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  animation: popIn 0.2s var(--ease-out);
}
.menu-pop[hidden] { display: none; }
.menu-pop .mp-head { padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: rgba(255, 255, 255, 0.06); }

.cat-nav { display: flex; align-items: center; gap: 12px; height: 48px; }
.cat-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; mask-image: linear-gradient(90deg, #000 90%, transparent); }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; white-space: nowrap;
  font-weight: 600; font-size: 14px; color: var(--muted); border: 1px solid transparent; transition: all 0.2s;
}
.cat-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.cat-link.is-active { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 -2px 0 var(--magenta); }
.cat-link .count { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- 6. Hero 3D flotante ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 40px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.hero-pill .dot { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--grad-hot); color: #1a0610; font-weight: 700; font-size: 11px; font-family: var(--font-display); letter-spacing: 0.06em; }
.hero h1 { font-size: clamp(38px, 5.6vw, 72px); margin: 18px 0 16px; font-weight: 700; letter-spacing: -0.01em; }
.hero h1 .line2 { display: block; }
.hero-lead { font-size: 17px; color: var(--muted); max-width: 520px; }
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-family: var(--font-display); font-size: 28px; line-height: 1; }
.hero-stats .stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }

.hero-stage { position: relative; height: 520px; perspective: 1400px; }
.stage-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.6s var(--ease-out); }
.float-card {
  position: absolute; width: 260px; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  transform-style: preserve-3d; animation: floatCard 6s ease-in-out infinite;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.float-card:hover { border-color: var(--magenta); box-shadow: 0 0 40px rgba(255, 61, 242, 0.45), var(--shadow); z-index: 5; }
.float-card .fc-media { position: relative; aspect-ratio: 16 / 9; }
.float-card .fc-media img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.float-card .fc-body { padding: 10px 12px 12px; }
.float-card .fc-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.float-card .fc-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.float-card .fc-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.play-btn {
  position: absolute; inset: 0; margin: auto; width: 54px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: #ff0033; color: #fff; box-shadow: 0 0 26px rgba(255, 0, 51, 0.6); transition: transform 0.3s var(--ease-spring);
}
.play-btn svg.lucide { fill: #fff; width: 18px; height: 18px; }
.float-card:hover .play-btn, .media-thumb:hover .play-btn { transform: scale(1.12); }
.yt-tag { display: inline-flex; align-items: center; gap: 4px; color: #ff4d6d; font-weight: 600; }
/* posiciones de las tarjetas flotantes (profundidad Z distinta = parallax) */
.fc-1 { left: 4%; top: 6%; --z: 80px; --r: -8deg; animation-delay: 0s; }
.fc-2 { right: 0; top: 0; --z: 30px; --r: 6deg; width: 240px; animation-delay: -1.5s; }
.fc-3 { left: 26%; top: 37%; --z: 140px; --r: -2deg; width: 290px; animation-delay: -3s; z-index: 3; }
.fc-4 { left: 0; bottom: 2%; --z: 50px; --r: 5deg; width: 220px; animation-delay: -4.5s; }
.fc-5 { right: 2%; bottom: 6%; --z: 100px; --r: -5deg; width: 230px; animation-delay: -2.2s; }
/* Un solo destacado: tarjeta grande y centrada */
.fc-solo { left: 50%; top: 50%; width: min(440px, 86%); margin-left: max(-220px, -43%); margin-top: -150px; --z: 90px; --r: -3deg; z-index: 3; }
.fc-solo .fc-title { font-size: 19px; }
@keyframes floatCard {
  0%, 100% { transform: translateZ(var(--z)) rotate(var(--r)) translateY(0); }
  50% { transform: translateZ(var(--z)) rotate(calc(var(--r) * -0.4)) translateY(-16px); }
}
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; pointer-events: none; }
.orb-1 { width: 320px; height: 320px; background: var(--magenta); right: 12%; top: 12%; animation: orb 10s ease-in-out infinite; }
.orb-2 { width: 260px; height: 260px; background: var(--cyan); right: 34%; bottom: 0; animation: orb 12s ease-in-out infinite reverse; }
.orb-3 { width: 180px; height: 180px; background: var(--orange); right: -2%; bottom: 20%; opacity: 0.35; animation: orb 9s ease-in-out infinite; }
@keyframes orb { 50% { transform: translate(30px, -30px) scale(1.15); } }
/* ---------- Aviso de cookies ---------- */
#cookie-root { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 260; display: flex; justify-content: center; pointer-events: none; }
#cookie-root[hidden] { display: none; }
/* Mientras el aviso está abierto, se deja espacio abajo para que no tape el final del texto */
body:has(#cookie-root:not([hidden])) main { padding-bottom: 300px; }
.legal-back { margin-top: 22px; }
.cookie-card {
  pointer-events: auto; width: 100%; max-width: 560px; padding: 20px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 26, 48, 0.98), rgba(14, 14, 26, 0.98)); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 60px -30px rgba(34, 230, 255, 0.5);
  animation: toastIn 0.5s var(--ease-spring); display: flex; flex-direction: column; gap: 12px; font-size: 14px;
}
.cookie-card.is-leaving { animation: toastOut 0.26s ease forwards; }
.cookie-head { display: flex; align-items: center; gap: 10px; }
.cookie-head svg.lucide { color: var(--orange); width: 22px; height: 22px; }
.cookie-head h2 { font-size: 18px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-details { display: flex; flex-direction: column; gap: 8px; }
.cookie-details[hidden] { display: none; }
.cookie-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer; }
.cookie-opt b { display: block; font-size: 14px; }
.cookie-opt small { color: var(--muted); font-size: 12px; }
.cookie-opt input { width: 20px; height: 20px; accent-color: var(--cyan); flex-shrink: 0; }
.u-link, .cookie-card a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.link-btn { padding: 0; font-size: 14px; color: inherit; text-align: left; }
.link-btn:hover { color: var(--cyan); }
@media (max-width: 640px) {
  #cookie-root { left: 8px; right: 8px; bottom: 8px; }
  .cookie-actions .btn { flex: 1 1 auto; }
}

/* YouTube sin consentimiento: portada local + aviso */
.yt-lite { position: absolute !important; inset: 0; width: 100%; height: 100%; opacity: 1 !important; border: 0 !important; border-radius: 0 !important; flex: none; }
.yt-note { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; justify-content: center; padding: 6px 10px; border-radius: 9px; font-size: 12px; background: rgba(7, 7, 14, 0.82); color: var(--text); }
.yt-note svg.lucide { width: 14px; height: 14px; color: var(--cyan); }

/* Mi cuenta */
.box h2 svg.lucide { width: 20px; height: 20px; vertical-align: -3px; color: var(--cyan); }
.danger-zone { border-color: rgba(255, 77, 109, 0.35); }
.danger-zone h2 svg.lucide { color: var(--red); }

/* Logo grande en el hero mientras aún no hay contenido destacado */
.stage-logo { position: absolute; left: 50%; top: 50%; width: 260px; height: 306px; margin: -153px 0 0 -130px; filter: drop-shadow(0 0 40px rgba(255, 61, 242, 0.55)); animation: floatY 4s ease-in-out infinite; }
.legal a:not(.btn) { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.check a { color: var(--cyan); text-decoration: underline; }
.pixel-cube { position: absolute; width: 18px; height: 18px; border-radius: 3px; background: var(--grad); box-shadow: var(--glow-m); animation: floatY 5s ease-in-out infinite; opacity: 0.85; }

/* ---------- Secciones ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); }
.section-head p { color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted); transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.chip.is-active { color: #0b0618; background: var(--grad); border-color: transparent; }
.select-sm { padding: 8px 12px; border-radius: 10px; width: auto; font-size: 13px; }

/* ---------- 7. Tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
  animation: cardIn 0.6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.card::before { /* foco de luz que sigue al ratón */
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.1), transparent 60%);
}
.card:hover, .card:focus-visible { border-color: rgba(255, 61, 242, 0.55); box-shadow: 0 20px 50px -20px rgba(255, 61, 242, 0.5), 0 0 0 1px rgba(34, 230, 255, 0.15); }
.card:hover::before { opacity: 1; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transition: transform 0.6s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.07); }
.card-media .cm-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; z-index: 1; }
.card-media .cm-yt { position: absolute; bottom: 10px; right: 10px; z-index: 1; }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7, 7, 14, 0.75)); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--magenta); font-weight: 700; font-family: var(--font-display); }
.card-title { font-size: 18px; font-weight: 700; }
.card-sum { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.card-meta .author { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.card-meta .author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta .dl { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; color: var(--cyan); font-weight: 600; }
.card-meta .dl svg.lucide { width: 15px; height: 15px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

.empty {
  text-align: center; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted);
}
.empty svg.lucide { width: 40px; height: 40px; color: var(--magenta); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* Skeleton de carga */
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; aspect-ratio: 4 / 4.2; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 8. Modales ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; background: rgba(4, 4, 9, 0.78); backdrop-filter: blur(10px);
  animation: fadeIn 0.25s var(--ease-out);
}
.modal-overlay.is-closing { animation: fadeOut 0.22s ease forwards; }
.modal {
  position: relative; width: 100%; max-width: 460px; margin: auto; border-radius: 22px; padding: 28px;
  background: linear-gradient(180deg, rgba(26, 26, 48, 0.98), rgba(14, 14, 26, 0.98)); border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 61, 242, 0.08), 0 0 80px -30px rgba(255, 61, 242, 0.4);
  animation: modalIn 0.45s var(--ease-spring);
}
.modal-overlay.is-closing .modal { animation: modalOut 0.22s ease forwards; }
.modal-xl { max-width: 1120px; padding: 0; overflow: hidden; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.94) rotateX(8deg); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

/* Auth */
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head svg { width: 54px; height: 64px; margin: 0 auto 8px; filter: drop-shadow(0 0 14px rgba(255, 61, 242, 0.5)); }
.auth-head h2 { font-size: 26px; }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: rgba(7, 7, 14, 0.7); border: 1px solid var(--line-2); margin-bottom: 18px; }
.tabs button { position: relative; z-index: 1; padding: 9px; font-weight: 700; font-family: var(--font-display); color: var(--muted); transition: color 0.25s; }
.tabs button[aria-selected="true"] { color: #0b0618; }
.tabs .tab-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: var(--grad); transition: transform 0.4s var(--ease-spring); }
.tabs[data-tab="register"] .tab-ind { transform: translateX(100%); }
.oauth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth .btn { font-family: var(--font-body); font-weight: 600; }
.oauth .g-dot { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.oauth .d-dot { width: 18px; height: 18px; border-radius: 5px; background: #5865f2; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 16px 0; text-transform: uppercase; letter-spacing: 0.12em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter i { height: 4px; border-radius: 4px; background: var(--line-2); transition: background 0.3s; }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--orange); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: var(--yellow); }
.pw-meter[data-score="4"] i { background: var(--green); }
.form-alert { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: rgba(255, 77, 109, 0.12); border: 1px solid rgba(255, 77, 109, 0.4); color: #ffc2cd; display: flex; gap: 8px; align-items: flex-start; }
.form-alert[hidden] { display: none; }
.form-note { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: rgba(34, 230, 255, 0.08); border: 1px solid rgba(34, 230, 255, 0.3); color: #bdf6ff; display: flex; gap: 8px; align-items: flex-start; }
.form-note svg.lucide { margin-top: 1px; }

/* Detalle del mod */
.detail { display: grid; grid-template-columns: 1.35fr 1fr; }
.detail-media { padding: 22px; background: rgba(5, 5, 10, 0.5); border-right: 1px solid var(--line); }
.media-main { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; }
.media-main img, .media-main iframe { width: 100%; height: 100%; object-fit: cover; border: 0; image-rendering: pixelated; animation: fadeIn 0.35s ease; }
.media-strip { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.media-thumb { position: relative; flex: 0 0 110px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; border: 2px solid transparent; opacity: 0.65; transition: all 0.2s; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.media-thumb .play-btn { width: 30px; height: 22px; border-radius: 6px; }
.media-thumb .play-btn svg.lucide { width: 12px; height: 12px; }
.media-thumb:hover { opacity: 1; }
.media-thumb.is-active { opacity: 1; border-color: var(--magenta); box-shadow: var(--glow-m); }
.detail-info { padding: 26px 26px 26px; display: flex; flex-direction: column; gap: 16px; }
/* Bloque de descarga destacado, arriba del todo */
.dl-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(34, 230, 255, 0.08), rgba(255, 61, 242, 0.06)); border: 1px solid rgba(34, 230, 255, 0.35); box-shadow: 0 0 40px -18px rgba(34, 230, 255, 0.6); }
.dl-box .dl-btn { padding: 14px 16px; }
.dl-box .dl-btn b { font-size: 15px; }
.dl-single { grid-template-columns: 1fr !important; }
.dl-arrow { margin-left: auto; position: relative; color: var(--c); width: 22px !important; height: 22px !important; }
/* Abajo: descripción y tutorial a lo ancho */
.detail-body { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; padding: 24px 26px 28px; border-top: 1px solid var(--line); background: rgba(5, 5, 10, 0.35); }
.detail-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 20px; }
.detail-section h3.dl-title { font-size: 13px; }
.detail-info h2 { font-size: 28px; padding-right: 40px; }
.detail-author { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.detail-author strong { color: var(--text); }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv div { padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.kv span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); }
.kv b { font-family: var(--font-display); font-size: 15px; }
.desc { color: #cfd3f5; white-space: pre-line; font-size: 14px; }
.dl-title { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-btn {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; text-align: left; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line-2); transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s;
}
.dl-btn::before { content: ""; position: absolute; inset: 0; background: var(--c); opacity: 0.12; transition: opacity 0.25s; }
.dl-btn:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 45%, transparent); }
.dl-btn:hover::before { opacity: 0.22; }
.dl-btn .dl-ico { position: relative; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #0b0618; flex-shrink: 0; }
.dl-btn .dl-txt { position: relative; min-width: 0; }
.dl-btn b { display: block; font-family: var(--font-display); font-size: 14px; }
.dl-btn small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.dl-btn small svg.lucide { width: 12px; height: 12px; color: var(--green); }
.dl-btn.dl-terabox { --c: #4f8dff; }
.dl-btn.dl-gdrive { --c: #3dffa2; }
.dl-btn.dl-ucdrive { --c: #ff8a1f; }
.dl-btn.dl-mediafire { --c: #22e6ff; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 48px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); font-size: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 10px; top: 9px; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #0b0618; background: var(--grad);
}
.mod-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 22px; background: rgba(255, 210, 63, 0.1); border-bottom: 1px solid rgba(255, 210, 63, 0.35); font-size: 14px; }
.mod-bar.is-rejected { background: rgba(255, 77, 109, 0.1); border-color: rgba(255, 77, 109, 0.35); }

/* ---------- 9. Panel de creador / Admin ---------- */
.page-head { padding: 40px 0 10px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); }
.panel-grid { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; padding-bottom: 60px; }
.side-nav { position: sticky; top: calc(var(--hdr-h) + 16px); display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.side-nav button, .side-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); text-align: left; transition: all 0.2s; }
.side-nav button:hover, .side-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.side-nav .is-active { color: var(--text); background: rgba(255, 61, 242, 0.12); box-shadow: inset 3px 0 0 var(--magenta); }
.side-nav .sn-count { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--yellow); color: #1d1600; font-weight: 700; }
.box { padding: 24px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.box + .box { margin-top: 18px; }
.box h2 { font-size: 22px; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 0; }
.fieldset legend { padding: 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 6px; }
.provider-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #0b0618; flex-shrink: 0; }
.provider-ico svg.lucide { width: 15px; height: 15px; }
.provider-ico[data-prov="terabox"] { background: #4f8dff; }
.provider-ico[data-prov="gdrive"] { background: #3dffa2; }
.provider-ico[data-prov="ucdrive"] { background: #ff8a1f; }
.provider-ico[data-prov="mediafire"] { background: #22e6ff; }
.img-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.img-item { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); animation: popIn 0.3s var(--ease-out); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(7, 7, 14, 0.85); color: var(--red); }
.img-item button svg.lucide { width: 14px; height: 14px; }
.img-drop {
  aspect-ratio: 16 / 9; border-radius: 10px; border: 2px dashed var(--line-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--muted); font-size: 12px; cursor: pointer; transition: all 0.2s; text-align: center; padding: 6px;
}
.img-drop:hover, .img-drop.is-over { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 230, 255, 0.06); }
.step-row { display: flex; gap: 8px; align-items: center; animation: popIn 0.25s var(--ease-out); }
.step-row .num { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line-2); }
.yt-preview { display: flex; gap: 12px; align-items: center; margin-top: 8px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 13px; }
.yt-preview img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); padding: 12px 14px; background: rgba(255, 255, 255, 0.03); }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.t-mod { display: flex; align-items: center; gap: 12px; }
.t-mod img { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; image-rendering: pixelated; }
.t-mod b { display: block; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.stat-card span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; gap: 6px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 28px; margin-top: 4px; }

.guide { max-width: 820px; padding-bottom: 60px; }
.guide h2 { font-size: 22px; margin: 26px 0 10px; }
.guide p, .guide li { color: #cfd3f5; }
.guide ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- 10. Toasts, footer, responsive ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  animation: toastIn 0.45s var(--ease-spring);
}
.toast.is-leaving { animation: toastOut 0.3s ease forwards; }
.toast-success { border-color: rgba(61, 255, 162, 0.5); } .toast-success svg.lucide { color: var(--green); }
.toast-error { border-color: rgba(255, 77, 109, 0.5); } .toast-error svg.lucide { color: var(--red); }
.toast-info svg.lucide { color: var(--cyan); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

.site-footer { margin-top: 40px; padding: 40px 0 24px; border-top: 1px solid var(--line); background: rgba(5, 5, 10, 0.6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-grid h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { height: 440px; max-width: 640px; width: 100%; margin: 0 auto; }
  .detail { grid-template-columns: 1fr; }
  .detail-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-body { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --hdr-h: 160px; }
  .hdr-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .search { order: 10; max-width: none; flex-basis: 100%; }
  .panel-grid { grid-template-columns: 1fr; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; }
  .side-nav button, .side-nav a { white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .brand-text { font-size: 18px; }
  .brand-text span { display: none; }
  .uc-name, .hide-xs, .user-chip > svg.lucide { display: none; }
  .user-chip { padding: 3px; }
  .hdr-row { gap: 8px; }
  .hdr-actions { gap: 6px; }
  .brand-logo { width: 28px; height: 33px; }
  .icon-btn { width: 36px; height: 36px; }
  .edition-switch button { padding: 6px 8px; font-size: 12px; }
  .cat-upload { font-size: 0; gap: 0; padding: 8px 10px; }
  .cat-nav { gap: 8px; }
  .gate-cards { grid-template-columns: 1fr; gap: 14px; }
  .edition-card { padding: 22px 16px 18px; }
  .iso-cube { --s: 62px; }
  .hero { padding-top: 32px; }
  .hero-stage { height: 360px; }
  .float-card { width: 190px; }
  .fc-2 { width: 170px; } .fc-3 { width: 210px; left: 18%; } .fc-4 { width: 160px; } .fc-5 { width: 170px; }
  .float-card .fc-body { padding: 8px 10px; }
  .float-card .fc-title { font-size: 13px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .modal { padding: 22px 18px; border-radius: 18px; }
  .modal-xl { padding: 0; }
  .modal-overlay { padding: 12px 8px; }
  .detail-media, .detail-info, .detail-body { padding: 16px; }
  .detail-info h2 { font-size: 22px; }
  .dl-grid, .form-grid, .oauth { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .box { padding: 18px; }
}
@media (hover: none) {
  .card { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
