:root {
  --bg: #1b1d1f;
  --side: #222527;
  --panel: #2a2d30;
  --line: #34383b;
  --text: #e8e8e8;
  --muted: #9aa0a6;
  --accent: #e6833a;
  --accent-2: #c9662a;
  --side-w: 236px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }

/* ---------- Menú lateral ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  background: var(--side);
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: transform .2s ease;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.side-title { font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; }

.close {
  background: none; border: 0; color: var(--text);
  font-size: 1.4rem; cursor: pointer;
}

.ico {
  display: inline-flex; width: 26px; justify-content: center;
  margin-right: 8px; color: var(--muted);
}

.group { margin-bottom: 18px; }

.group-title {
  font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; padding: 4px 0;
}

.group a {
  display: flex; align-items: center;
  padding: 6px 0 6px 20px;
  border-radius: 6px;
  color: var(--text);
}

.group a:hover, .group a.active { background: var(--panel); }
.group a.active { color: var(--accent); }
.group a.active .ico { color: var(--accent); }

.side-foot {
  margin-top: auto; padding-top: 16px;
  font-size: .8rem; color: var(--muted);
}
.side-foot a:hover { color: var(--text); }

.menu-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 15;
  background: var(--side); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1.3rem; padding: 6px 12px; cursor: pointer;
}

/* ---------- Zona principal ---------- */
.main {
  margin-left: var(--side-w);
  padding: 20px 24px 40px;
  min-height: 100vh;
}

h1, h2 { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.hero {
  border-radius: 10px;
  min-height: 320px;
  padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background:
    linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.1)),
    linear-gradient(135deg, #3b2a6b, #8a2f4a 55%, #e6833a);
  margin-bottom: 26px;
}
.hero h1 { font-size: 2rem; }
.hero p { max-width: 560px; margin: 0 0 16px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

input[type="text"], input[type="email"], input[type="password"], select, textarea {
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 1rem; width: 100%;
}
.toolbar input { max-width: 420px; }

.btn {
  display: inline-block;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 16px; font-size: .95rem; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); }

/* ---------- Cuadrícula de tarjetas ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }

.thumb {
  aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75); font-size: .85rem;
}
.card-body { padding: 10px 12px; }
.card-title { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.card-meta { color: var(--muted); font-size: .8rem; }

.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  margin: 16px auto 8px;
}
.creator { text-align: center; padding-bottom: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--panel); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-size: .9rem;
}
.tag:hover { border-color: var(--accent); }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 22px; max-width: 620px;
}
.panel label { display: block; margin: 14px 0 6px; font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: .9rem; }
.check input { margin-top: 3px; }

.rules li { margin-bottom: 10px; line-height: 1.45; }

.notice {
  border-left: 3px solid var(--accent);
  background: rgba(230,131,58,.08);
  padding: 10px 14px; border-radius: 6px; margin: 14px 0;
  font-size: .9rem;
}

/* ---------- Aviso de edad ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10,10,12,.96);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.age-gate.hidden { display: none; }
.age-box {
  background: var(--side); border: 1px solid var(--line);
  border-radius: 12px; padding: 30px; max-width: 480px; text-align: center;
}
.age-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }

/* ---------- Móvil ---------- */
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .menu-toggle { display: block; }
  .main { margin-left: 0; padding-top: 64px; }
}
