/* ============================================================
   MISTERYCEEPY — main.css — Mobile First
   ============================================================ */

/* --- Variables --- */
:root {
  --bg-primary:   #1a1d29;
  --bg-secondary: #2d3142;
  --bg-tertiary:  #3f4354;
  --accent:       #4ecdc4;
  --accent-light: #80e0d9;
  --accent-dark:  #3ab8b0;
  --text-primary: #e8e9ed;
  --text-secondary: #a8aab3;
  --text-muted:   #6b6e7a;
  --success:      #48c774;
  --warning:      #f4a261;
  --danger:       #c1666b;
  --danger-dark:  #a0484d;
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(78,205,196,0.3);
  --shadow:       0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.6);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;
  --transition:   0.25s ease;
  --header-h:     60px;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(78,205,196,0.15);
}
textarea { resize: vertical; min-height: 120px; }

/* --- Layout --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.main-content { padding-top: var(--header-h); min-height: calc(100vh - 300px); }

/* --- Tipografía --- */
h1,h2,h3,h4,h5 { font-family: var(--font-serif); line-height: 1.3; color: var(--text-primary); }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { color: var(--text-secondary); line-height: 1.8; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(26,29,41,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  height: 100%; padding: 0 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.header-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary); text-decoration: none; flex-shrink: 0;
}
.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--accent); }
.header-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }

/* Botones icono */
.btn-icon {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition);
  position: relative;
}
.btn-icon:hover { background: var(--bg-tertiary); color: var(--accent); }
.notif-btn { position: relative; }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-primary);
}
.badge-sm {
  background: var(--danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 5px; border-radius: 10px; margin-left: 4px;
}

/* Avatar dropdown */
.user-menu { position: relative; }
.user-avatar-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--bg-tertiary); border-radius: 20px;
  padding: 4px 8px 4px 4px;
  color: var(--text-secondary); transition: all var(--transition);
}
.user-avatar-btn:hover { border-color: var(--accent); color: var(--accent); }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.avatar-xl { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }

.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 200px;
  box-shadow: var(--shadow-lg); z-index: 100; overflow: hidden;
}
.dropdown-menu.open { display: block; animation: fadeDown 0.2s ease; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.dropdown-header { padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem; }
.dropdown-header strong { font-size: 0.9rem; }
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem; color: var(--text-secondary);
  font-size: 0.9rem; transition: all var(--transition);
  text-decoration: none; width: 100%;
}
.dropdown-item:hover { background: var(--bg-tertiary); color: var(--accent); }
.dropdown-item-danger:hover { color: var(--danger); }
.role-badge {
  font-size: 0.65rem; font-weight: 600; padding: 2px 6px;
  border-radius: 4px; text-transform: uppercase;
}
.role-admin  { background: rgba(193,102,107,0.2); color: var(--danger); }
.role-author { background: rgba(78,205,196,0.2);  color: var(--accent); }
.role-reader { background: rgba(168,170,179,0.2); color: var(--text-secondary); }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; justify-content: center;
  gap: 5px; width: 38px; height: 38px; padding: 8px;
}
.hamburger span {
  display: block; height: 2px; background: var(--text-secondary);
  border-radius: 2px; transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--bg-secondary); z-index: 999;
  display: flex; flex-direction: column; padding: 1.5rem 1rem;
  transform: translateX(-100%); transition: transform 0.3s ease;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-link {
  padding: 1rem; font-size: 1.1rem; color: var(--text-primary);
  border-radius: var(--radius-sm); transition: all var(--transition);
  text-decoration: none; display: block;
}
.mobile-nav-link:hover { background: var(--bg-tertiary); color: var(--accent); }
.mobile-nav-cta { background: var(--accent); color: var(--bg-primary) !important; text-align: center; margin-top: 0.5rem; font-weight: 600; }
.mobile-nav-divider { height: 1px; background: var(--border); margin: 0.75rem 0; }
.nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 998;
}
.nav-overlay.show { display: block; }

/* Search modal */
.search-modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-modal.open { display: flex; }
.search-modal-inner {
  background: var(--bg-secondary); border-radius: var(--radius);
  padding: 1.5rem; width: 90%; max-width: 560px;
  position: relative; box-shadow: var(--shadow-lg);
}
.search-form { display: flex; gap: 0.75rem; }
.search-input { flex: 1; font-size: 1rem; }
.search-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-tertiary); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all var(--transition);
}
.search-close:hover { background: var(--danger); color: #fff; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn-primary {
  background: var(--accent); color: var(--bg-primary);
  border: none; border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-light); color: var(--bg-primary); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(78,205,196,0.3); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem; font-weight: 500; font-size: 0.95rem;
  cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: var(--danger); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-danger:hover { background: var(--danger-dark); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #0d0f18 0%, #1a1d29 50%, #2d3142 100%);
}
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(78,205,196,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 20%, rgba(155,89,182,0.06) 0%, transparent 50%);
}
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-content { position: relative; z-index: 1; padding: 2rem 1rem; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(78,205,196,0.1); border: 1px solid rgba(78,205,196,0.3);
  border-radius: 20px; padding: 0.4rem 1rem;
  font-size: 0.8rem; color: var(--accent); margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-serif); font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 1rem;
  color: var(--text-primary);
}
.hero-title .accent { color: var(--accent); }
.hero-tagline { font-size: clamp(1rem, 3vw, 1.3rem); color: var(--text-secondary); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.8rem; z-index: 1;
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(8px);} }

/* ============================================================
   SECCIONES
   ============================================================ */
.section { padding: 3rem 1rem; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-title { font-family: var(--font-serif); font-size: clamp(1.3rem, 4vw, 2rem); }
.section-title span { color: var(--accent); }
.section-link { color: var(--accent); font-size: 0.9rem; font-weight: 500; }

/* Stats bar */
.stats-bar {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 1.5rem 1rem;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 1200px; margin: 0 auto; }
.stat-item { text-align: center; }
.stat-number { font-size: 1.8rem; font-weight: 700; color: var(--accent); font-family: var(--font-serif); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   STORY CARDS — Mobile First
   ============================================================ */
.stories-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.story-card {
  background: var(--bg-secondary); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: all var(--transition); display: flex; flex-direction: column;
}
.story-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.story-card-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: var(--bg-tertiary);
}
.story-card-img-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.story-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.story-card-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.category-badge {
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px;
  border-radius: 12px; text-transform: uppercase; letter-spacing: 0.05em;
}
.story-card-title { font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.4; color: var(--text-primary); }
.story-card-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.story-card-author { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-secondary); }
.story-card-stats { display: flex; gap: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }
.story-card-stats span { display: flex; align-items: center; gap: 0.25rem; }

/* Featured card */
.story-card-featured { grid-column: 1 / -1; }

/* ============================================================
   CATEGORÍAS PILLS
   ============================================================ */
.categories-scroll {
  display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem;
  scrollbar-width: none; -ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.category-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 20px; white-space: nowrap;
  font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border);
  color: var(--text-secondary); background: var(--bg-secondary);
  transition: all var(--transition); text-decoration: none; flex-shrink: 0;
}
.category-pill:hover, .category-pill.active { border-color: var(--accent); color: var(--accent); background: rgba(78,205,196,0.08); }

/* ============================================================
   FORMULARIOS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.5rem; }
.form-label span { color: var(--danger); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 0.35rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  margin-bottom: 1rem; font-size: 0.9rem; border-left: 4px solid;
}
.alert-success { background: rgba(72,199,116,0.1); border-color: var(--success); color: var(--success); }
.alert-error   { background: rgba(193,102,107,0.1); border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: rgba(244,162,97,0.1);  border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(78,205,196,0.1);  border-color: var(--accent);  color: var(--accent); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0d0f18 100%);
}
.auth-card {
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 2rem 1.5rem;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo h1 { font-size: 1.8rem; }
.auth-title { font-size: 1.4rem; margin-bottom: 0.5rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }

/* ============================================================
   DASHBOARD / PANEL
   ============================================================ */
.panel-page { padding: 1.5rem 1rem; max-width: 1200px; margin: 0 auto; }
.panel-header { margin-bottom: 2rem; }
.panel-title { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 0.5rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.metric-card {
  background: var(--bg-secondary); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.metric-icon { font-size: 1.5rem; }
.metric-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); font-family: var(--font-serif); }
.metric-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Tabs */
.tabs { display: flex; gap: 0.25rem; background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 0.25rem; margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  flex: 1; padding: 0.6rem 0.75rem; border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
  transition: all var(--transition); white-space: nowrap;
}
.tab-btn.active { background: var(--accent); color: var(--bg-primary); }
.tab-btn:hover:not(.active) { color: var(--text-primary); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead { background: var(--bg-tertiary); }
th { padding: 0.9rem 1rem; text-align: left; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
td { padding: 0.85rem 1rem; border-top: 1px solid var(--border); color: var(--text-secondary); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ============================================================
   STORY PAGE
   ============================================================ */
.story-page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem; }
.story-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.story-cover { width: 100%; border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; aspect-ratio: 16/9; object-fit: cover; }
.story-header { margin-bottom: 2rem; }
.story-title { font-size: clamp(1.6rem, 5vw, 2.8rem); margin-bottom: 1rem; }
.story-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 0.88rem; color: var(--text-muted); }
.story-author-info { display: flex; align-items: center; gap: 0.75rem; }
.story-content { font-size: 1.05rem; line-height: 1.9; color: var(--text-secondary); }
.story-content p { margin-bottom: 1.5rem; }
.story-content h2, .story-content h3 { color: var(--text-primary); margin: 2rem 0 1rem; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span { color: var(--text-muted); }

/* Vote buttons */
.vote-bar {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-secondary); border-radius: var(--radius);
  padding: 1rem 1.25rem; margin: 2rem 0; border: 1px solid var(--border);
  flex-wrap: wrap;
}
.vote-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem; transition: all var(--transition);
  border: 1px solid var(--border); background: var(--bg-tertiary); color: var(--text-secondary);
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); }
.vote-btn.voted-up   { background: rgba(72,199,116,0.15); border-color: var(--success); color: var(--success); }
.vote-btn.voted-down { background: rgba(193,102,107,0.15); border-color: var(--danger);  color: var(--danger); }

/* Comments */
.comments-section { margin-top: 2.5rem; }
.comment {
  background: var(--bg-secondary); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.25rem; margin-bottom: 1rem;
}
.comment-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.comment-author { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.comment-date { font-size: 0.8rem; color: var(--text-muted); }
.comment-content { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }
.comment-reply { margin-left: 1.5rem; }
.comment-form { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; margin-bottom: 2rem; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; }
.sidebar-title { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 1.75rem;
  width: 100%; max-width: 480px; box-shadow: var(--shadow-lg);
  animation: fadeDown 0.2s ease;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-size: 1.15rem; }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-tertiary); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Report modal */
.char-counter { text-align: right; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 3rem 1rem 1.5rem; margin-top: 4rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.75rem; }
.social-link { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition); }
.social-link:hover { border-color: var(--accent); color: var(--accent); }
.footer-title { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-primary); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.88rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }
.footer-tagline { color: var(--accent) !important; }

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.pagination { display: flex; gap: 0.5rem; justify-content: center; align-items: center; margin-top: 2rem; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 500; border: 1px solid var(--border);
  color: var(--text-secondary); background: var(--bg-secondary);
  transition: all var(--transition); text-decoration: none; padding: 0 0.75rem;
}
.page-btn:hover  { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   AUTHOR CARDS
   ============================================================ */
.authors-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.author-card {
  background: var(--bg-secondary); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition); text-decoration: none;
}
.author-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.author-card-info { flex: 1; min-width: 0; }
.author-card-name { font-weight: 600; color: var(--text-primary); font-size: 1rem; margin-bottom: 0.25rem; }
.author-card-bio { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-card-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; flex-wrap: wrap; }

/* ============================================================
   VIDEO CARDS
   ============================================================ */
.videos-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.video-card { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: all var(--transition); }
.video-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-tertiary); overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); }
.video-play-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; color: var(--bg-primary); transition: all var(--transition); }
.video-card:hover .video-play-btn { transform: scale(1.1); }
.video-card-body { padding: 1rem; }
.video-card-title { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; margin-bottom: 0.5rem; }
.video-card-meta { font-size: 0.82rem; color: var(--text-muted); }

/* ============================================================
   ADMIN PANELS
   ============================================================ */
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card { background: var(--bg-secondary); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; text-align: center; }
.admin-stat-value { font-size: 2rem; font-weight: 700; font-family: var(--font-serif); }
.admin-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 600;
}
.status-pending   { background: rgba(244,162,97,0.15);  color: var(--warning); }
.status-approved  { background: rgba(72,199,116,0.15);  color: var(--success); }
.status-rejected  { background: rgba(193,102,107,0.15); color: var(--danger); }
.status-reviewing { background: rgba(78,205,196,0.15);  color: var(--accent); }
.status-resolved  { background: rgba(72,199,116,0.15);  color: var(--success); }

/* Action buttons small */
.action-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.btn-xs { padding: 0.3rem 0.7rem; font-size: 0.78rem; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; transition: all var(--transition); border: 1px solid transparent; }
.btn-xs-success { background: rgba(72,199,116,0.15); color: var(--success); border-color: rgba(72,199,116,0.3); }
.btn-xs-success:hover { background: var(--success); color: #fff; }
.btn-xs-danger  { background: rgba(193,102,107,0.15); color: var(--danger);  border-color: rgba(193,102,107,0.3); }
.btn-xs-danger:hover  { background: var(--danger);  color: #fff; }
.btn-xs-warning { background: rgba(244,162,97,0.15);  color: var(--warning); border-color: rgba(244,162,97,0.3); }
.btn-xs-warning:hover { background: var(--warning); color: #fff; }
.btn-xs-info    { background: rgba(78,205,196,0.15);  color: var(--accent);  border-color: rgba(78,205,196,0.3); }
.btn-xs-info:hover    { background: var(--accent);  color: var(--bg-primary); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; align-items: center; padding: 3rem; }

/* ============================================================
   RESPONSIVE — Tablet 768px
   ============================================================ */
@media (min-width: 768px) {
  :root { --header-h: 65px; }
  .container { padding: 0 1.5rem; }
  .section { padding: 4rem 1.5rem; }
  .header-nav { display: flex; gap: 0.25rem; }
  .nav-link { padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.9rem; color: var(--text-secondary); transition: all var(--transition); }
  .nav-link:hover { color: var(--accent); background: rgba(78,205,196,0.08); }
  .hamburger { display: none; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .comment-reply { margin-left: 3rem; }
}

/* ============================================================
   RESPONSIVE — Desktop 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
  .section { padding: 5rem 2rem; }
  .stories-grid { grid-template-columns: repeat(3, 1fr); }
  .authors-grid { grid-template-columns: repeat(3, 1fr); }
  .videos-grid  { grid-template-columns: repeat(3, 1fr); }
  .story-layout { grid-template-columns: 1fr 320px; }
  .footer-grid  { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .story-card-featured { grid-column: span 2; flex-direction: row; }
  .story-card-featured .story-card-img { width: 45%; aspect-ratio: auto; }
  .story-card-featured .story-card-body { flex: 1; }
  .panel-page { padding: 2rem; }
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
