/* ============================================================
   Jarclub - estilos
   Paleta y medidas extraidas de la pagina original.
   ============================================================ */

:root {
  --bg-a: #111111;
  --bg-b: #1a1a1c;
  --glow: #1e2329;
  --panel: rgba(25, 25, 27, 0.8);
  --panel-solid: #19191b;
  --card: rgba(25, 25, 27, 0.8);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --muted: #a0a6b1;
  --muted-2: #6b7280;
  --accent: #3fb950;
  --radius: 20px;
  --radius-sm: 12px;
  --sidebar-w: 280px;
  --sidebar-mobile-w: min(var(--sidebar-w), calc(100vw - 76px));
  --z-overlay: 1000;
  --z-sidebar: 1010;
  --z-menu-toggle: 1020;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pixelify Sans", "Outfit", system-ui, sans-serif;
  font-weight: 500;
  font-optical-sizing: auto;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-a) 0%, var(--bg-b) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% -10%, var(--glow) 0%, var(--bg-a) 100%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===================== LAYOUT ===================== */
.main-wrapper { display: flex; min-height: 100vh; }

/* ===================== SIDEBAR ===================== */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 22px;
  z-index: var(--z-sidebar);
}

.profile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: rgba(255, 255, 255, .075);
  color: var(--text);
  text-align: left;
  transition: background .18s, border-color .18s, transform .18s;
}
.profile:hover { background: rgba(255,255,255,.11); border-color: var(--line-strong); transform: translateY(-1px); }
.profile:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 3px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--muted);
}
.profile-name { font-size: 18px; font-weight: 600; }

.nav-primary, .nav-secondary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-primary { margin-top: 26px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item svg { flex: 0 0 auto; }
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: rgba(255, 255, 255, 0.07); color: var(--text); }

.nav-divider { flex: 1 1 auto; }
.nav-secondary { padding-top: 18px; border-top: 1px solid var(--line); margin-bottom: 4px; }

/* ===================== CONTAINER ===================== */
.container {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 30px 48px 60px;
  max-width: 1500px;
  position: relative;
}

.brand {
  position: absolute;
  top: 24px; left: 40px;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1f6feb, #0b3d91);
  display: grid; place-items: center;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  z-index: 5;
}

/* ===================== HERO / CARRUSEL ===================== */
.hero {
  position: relative;
  margin-top: 60px;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  max-height: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.hero-track {
  display: flex;
  height: 100%;
  transition: transform .6s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}
.hero-slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
}
/* pixeles flotantes decorativos */
.hero-bg::before, .hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 8px;
  opacity: .25;
  background: rgba(255, 255, 255, .9);
  animation: floatY 6s ease-in-out infinite;
}
.hero-bg::before { width: 60px; height: 60px; top: 18%; left: 12%; }
.hero-bg::after { width: 40px; height: 40px; top: 30%; right: 16%; animation-delay: -3s; }

.hero-emoji {
  position: absolute;
  right: 6%;
  bottom: 4%;
  font-size: clamp(80px, 14vw, 200px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .4));
  animation: floatY 5s ease-in-out infinite;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.25) 45%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 36px 40px;
  width: 100%;
}
.hero-text { min-width: 0; }
.hero-icon {
  width: 74px; height: 74px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 38px;
  flex: 0 0 auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  background: rgba(0,0,0,.3);
}
.hero-text { min-width: 0; }
.hero-title {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.hero-author { color: rgba(255,255,255,.85); font-size: 15px; margin: 4px 0 8px; }
.hero-author b { font-weight: 600; }
.hero-desc {
  color: rgba(255,255,255,.9);
  font-size: 15px;
  max-width: 620px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  display: grid; place-items: center;
  z-index: 3;
  transition: background .2s, transform .2s;
}
.hero-arrow:hover { background: rgba(0,0,0,.7); transform: translateY(-50%) scale(1.08); }
.hero-prev { left: 18px; }
.hero-next { right: 18px; }

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.35);
  transition: width .3s, background .3s;
}
.dot.active { width: 26px; border-radius: 6px; background: #fff; }

/* ===================== PAGE HEAD ===================== */
.page-head { margin-top: 60px; }
.page-title {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -.01em;
}
.page-subtitle { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ===================== CATEGORY ACTIONS ===================== */
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.action-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.action-pill:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}
.action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 16px;
}

/* ===================== CATEGORY TABS ===================== */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.cat-tab svg { flex: 0 0 auto; }
.cat-tab em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-2);
  background: rgba(255, 255, 255, .06);
  border-radius: 20px;
  padding: 1px 6px;
}
.cat-tab:hover { color: var(--text); border-color: rgba(255,255,255,.18); transform: translateY(-1px); }
.cat-tab.active { background: #fff; color: #111; border-color: #fff; }
.cat-tab.active em { background: rgba(0,0,0,.08); color: #111; }

/* ===================== TOOLBAR ===================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 34px 0 6px;
  flex-wrap: wrap;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background .2s, border-color .2s;
}
.filter-btn:hover, .filter-btn.open { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }

.sort { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.sort select {
  background: transparent;
  color: var(--text);
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.sort select option { background: var(--panel-solid); }

.search {
  margin-left: auto;
  flex: 1 1 320px;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: border-color .2s, background .2s;
}
.search:focus-within { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.07); }
.search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 14px 0;
}
.search input::placeholder { color: var(--muted-2); }

/* ===================== FILTER PANEL ===================== */
.filter-panel[hidden] { display: none; }
.filter-panel {
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  animation: dropIn .25s ease;
}
.filter-group { display: flex; flex-direction: column; gap: 12px; }
.filter-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 14px;
  transition: all .18s;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.active { background: #fff; color: #111; border-color: #fff; font-weight: 600; }

/* ===================== CONTENT CARDS ===================== */
.content-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.card {
  display: flex;
  gap: 22px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  animation: cardIn .4s ease backwards;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.14);
  background: rgba(33, 33, 36, 0.85);
}
.card-icon {
  width: 92px; height: 92px;
  border-radius: 18px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 44px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.card-body { min-width: 0; flex: 1; }
.card-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.card-author { color: var(--muted); font-size: 14px; margin: 3px 0 10px; display: flex; align-items: center; gap: 6px; }
.card-author b { color: #cfd3da; font-weight: 600; }
.badge-verified { color: var(--accent); display: inline-flex; }
.card-desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 880px;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
}
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.meta-item svg { opacity: .8; }
.platform-tag {
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line-strong);
  color: #cfd3da;
  font-size: 13px;
  font-weight: 600;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 16px;
}

.footer { margin-top: 50px; color: var(--muted-2); font-size: 13px; text-align: center; }

/* ===================== NOTIFICACIONES ===================== */
.toast-region {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.profile-toast {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 0 19px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: #181b1f;
  color: #f5f5f6;
  box-shadow: 0 14px 38px rgba(0,0,0,.38);
  font-size: 15px;
  font-weight: 500;
}
.profile-toast::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff7919;
  box-shadow: 0 0 10px rgba(255,121,25,.8);
}

/* ===================== MOBILE TOGGLE ===================== */
.menu-toggle {
  position: fixed;
  top: 18px; left: 18px;
  z-index: var(--z-menu-toggle);
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(10px);
  transition: left .3s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.menu-toggle.open {
  left: calc(var(--sidebar-mobile-w) + 12px);
  background: rgba(18, 18, 20, .94);
  border-color: rgba(255, 255, 255, .18);
}
.menu-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

/* ===================== ANIMACIONES ===================== */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .container { padding: 30px 28px 60px; }
  .hero { aspect-ratio: 16 / 9; }
}
@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .sidebar {
    width: var(--sidebar-mobile-w);
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .container { margin-left: 0; padding: 80px 18px 50px; padding-bottom: calc(50px + env(safe-area-inset-bottom)); }
  .sidebar { padding-top: max(22px, env(safe-area-inset-top)); padding-bottom: env(safe-area-inset-bottom); }
  .brand { display: none; }
  .hero { margin-top: 8px; }
  .card { flex-direction: column; gap: 16px; }
  .card-icon { width: 72px; height: 72px; font-size: 34px; }
  .search { margin-left: 0; order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= AUTENTICACION ================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #121416;
  animation: authFade .2s ease-out;
}
.auth-overlay[hidden], .confirm-field[hidden] { display: none; }
body.auth-open { overflow: hidden; }
.auth-card {
  position: relative;
  width: min(420px, 100%);
  min-height: 470px;
  padding: 41px 40px 36px;
  border: 1px solid #303236;
  border-radius: 28px;
  background: #191b1d;
  box-shadow: none;
  font-family: "Pixelify Sans", "Outfit", sans-serif;
  animation: authRise .25s ease-out;
}
.auth-card.register-mode { min-height: 566px; }
.auth-heading { margin-bottom: 31px; text-align: center; }
.auth-heading h1 { margin: 0 0 7px; color: #f7f7f8; font-size: 31px; line-height: 1.12; font-weight: 700; }
.auth-heading p { margin: 0; color: #a7a8ab; font-size: 15px; }
.auth-field { display: block; margin-bottom: 20px; color: #b7b8bb; font-size: 15px; }
.auth-field > span:first-child { display: block; margin: 0 0 8px 4px; }
.auth-field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #404247;
  border-radius: 13px;
  outline: none;
  background: #25272a;
  color: #f4f4f5;
  font: 15px "Pixelify Sans", "Outfit", sans-serif;
  transition: border-color .2s, box-shadow .2s;
}
.auth-field input:focus { border-color: #8f9298; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 50px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #909297;
  cursor: pointer;
}
.password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.password-toggle.visible { color: #fff; }
.auth-message { min-height: 18px; margin: -7px 3px 9px; color: #ff8585; font-size: 13px; }
.auth-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 13px;
  background: #f7f7f8;
  color: #111214;
  font: 600 18px "Pixelify Sans", "Outfit", sans-serif;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.auth-submit:hover { background: #fff; transform: translateY(-1px); }
.auth-submit:disabled { cursor: wait; opacity: .65; transform: none; }
.auth-switch { margin: 24px 0 0; text-align: center; color: #9b9ca0; font-size: 14px; }
.auth-switch button { padding: 0; border: 0; background: none; color: #f3f3f4; font: 600 inherit; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; }
@keyframes authFade { from { opacity: 0; } }
@keyframes authRise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 520px) {
  .auth-overlay { padding: 14px; }
  .auth-card, .auth-card.register-mode { min-height: auto; padding: 38px 22px 30px; border-radius: 22px; }
}

/* ================= FILTRO VISUAL ================= */
body.filter-open { overflow: hidden; }
.filter-modal {
  position: fixed;
  inset: 0;
  width: min(480px, 100%);
  max-width: calc(100vw - 36px);
  margin: auto;
  padding: 78px 30px 30px;
  border: 1px solid #36393e;
  border-radius: 28px;
  background: #191c20;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
  color: #f5f5f6;
  font-family: "Pixelify Sans", "Outfit", system-ui, sans-serif;
  font-weight: 500;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  animation: modalIn .2s ease-out;
  overflow: visible;
}
.filter-modal:not([open]) { display: none; }
.filter-modal::backdrop {
  background: rgba(4, 5, 6, .82);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.filter-art {
  position: absolute;
  top: -67px;
  left: 50%;
  width: 158px;
  height: 134px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 9px 10px rgba(0,0,0,.45));
  pointer-events: none;
}
.filter-heading { margin-bottom: 29px; text-align: center; }
.filter-heading h2 { margin: 0 0 10px; font: 700 32px/1 "Pixelify Sans", "Outfit", sans-serif; }
.filter-heading p { margin: 0; color: #c4c5c9; font-size: 16px; font-weight: 500; }
.filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.filter-option {
  min-width: 0;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid #34373c;
  border-radius: 15px;
  background: #202328;
  color: #bfc1c6;
  font-size: 16px;
  font-family: "Pixelify Sans", "Outfit", system-ui, sans-serif;
  font-weight: 500;
  text-align: left;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.filter-option svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.filter-option:hover { color: #fff; border-color: #50545a; transform: translateY(-1px); }
.filter-option.active { border-color: #fff; background: #fff; color: #111318; font-weight: 600; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* ================= ESCALA ADAPTABLE ================= */
.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px clamp(22px, 3.2vw, 56px) 60px;
}
.main-wrapper { width: 100%; min-width: 0; padding-left: var(--sidebar-w); overflow-x: clip; }
.container { min-width: 0; }
.hero, .toolbar, .content-list { min-width: 0; max-width: 100%; }
.search input { min-width: 0; }
.toolbar {
  width: 100%;
  min-height: 76px;
  margin: 28px 0 6px;
  padding: 14px clamp(0px, 1vw, 14px);
  gap: clamp(14px, 2vw, 24px);
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.filter-btn { min-width: 112px; justify-content: center; }
.sort { flex: 0 0 auto; white-space: nowrap; color: #f1f1f2; }
.sort strong { font-weight: 500; }
.search { max-width: none; min-width: 220px; }

@media (min-width: 1500px) {
  .hero { max-height: 560px; }
  .card { padding: 28px; }
  .content-list { gap: 21px; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  :root { --sidebar-w: 235px; }
  .sidebar { padding-inline: 15px; }
  .nav-item { gap: 12px; padding-inline: 13px; }
  .container { padding-inline: 24px; }
  .toolbar { gap: 14px; }
  .sort span { display: none; }
}

@media (max-width: 860px) {
  .main-wrapper { padding-left: 0; }
  .container { width: 100%; margin: 0; padding: 80px clamp(16px, 4vw, 30px) 50px; }
  .hero { width: 100%; min-height: 310px; aspect-ratio: 16 / 10; border-radius: 20px; }
  .hero-content { padding: 28px; }
  .toolbar { min-height: auto; padding: 14px 0; }
  .search { max-width: none; }
  .card { align-items: flex-start; }
}

@media (max-width: 600px) {
  .container { padding-inline: 12px; }
  .hero { height: clamp(330px, 94vw, 380px); min-height: 0; aspect-ratio: auto; }
  .hero-content { align-items: flex-start; gap: 13px; padding: 22px 18px 38px; }
  .hero-icon { width: 58px; height: 58px; border-radius: 13px; font-size: 29px; }
  .hero-title { font-size: clamp(21px, 7vw, 28px); }
  .hero-desc { max-width: 100%; overflow-wrap: anywhere; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-emoji { right: -12%; font-size: clamp(88px, 34vw, 130px); opacity: .68; }
  .hero-arrow { width: 38px; height: 38px; }
  .hero-prev { left: 10px; }
  .hero-next { right: 10px; }
  .toolbar { display: flex; gap: 12px; }
  .filter-btn { min-width: 104px; padding-inline: 16px; }
  .sort { min-width: 0; margin-left: auto; justify-content: flex-end; font-size: 14px; }
  .sort span { display: none; }
  .sort strong { overflow: hidden; text-overflow: ellipsis; }
  .search { order: 3; width: 100%; min-width: 0; max-width: none; margin: 0; flex: 1 0 100%; }
  .card { flex-direction: row; padding: 18px; border-radius: 17px; }
  .card-icon { width: 64px; height: 64px; font-size: 31px; }
  .card-meta { gap: 12px 16px; }
  .filter-modal { max-width: calc(100vw - 28px); padding: 59px 18px 22px; border-radius: 23px; }
  .filter-art { width: 132px; height: 112px; top: -55px; }
  .filter-heading { margin-bottom: 22px; }
  .filter-heading h2 { font-size: 28px; }
  .filter-heading p { font-size: 14px; }
  .filter-options { gap: 9px; max-height: 55vh; overflow-y: auto; }
  .filter-option { height: 50px; }
  .toast-region { top: 16px; right: 12px; }
  .profile-toast { min-height: 44px; padding-inline: 15px; font-size: 14px; }
}

@media (max-width: 420px) {
  .filter-modal { max-height: calc(100dvh - 90px); padding-top: 68px; overflow-y: auto; }
  .filter-options { grid-template-columns: 1fr; max-height: none; overflow: visible; }
}

@media (max-width: 380px) {
  .filter-btn { min-width: 96px; }
  .sort { font-size: 13px; }
}
