/* ============================================
   GALERÍA PREMIUM — Design System
   ============================================ */
:root {
  --bg: #07080c;
  --bg-elevated: #0e1017;
  --bg-card: #12151e;
  --bg-input: #0a0c12;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #f4f4f5;
  --text-muted: #9499a8;
  --text-dim: #6b7280;
  --accent: #ef4444;
  --accent-soft: rgba(239,68,68,0.15);
  --accent-glow: rgba(239,68,68,0.35);
  --success: #22c55e;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.5);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
img,video{max-width:100%;display:block}

/* ---- HEADER ---- */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(7,8,12,0.85);
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid var(--border);
}
.topbar{
  max-width:1280px;margin:0 auto;
  padding:16px 24px;
  display:flex;justify-content:space-between;align-items:center;gap:16px;
}
.logo{
  display:flex;align-items:center;gap:10px;
  font-size:18px;font-weight:700;letter-spacing:-0.02em;
}
.logo-icon{
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(135deg,#ef4444,#dc2626);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;box-shadow:0 4px 14px var(--accent-glow);
}
.nav-actions{display:flex;align-items:center;gap:10px}

/* ---- BUTTONS ---- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 18px;border-radius:12px;
  font-size:14px;font-weight:600;border:none;cursor:pointer;
  transition:all .2s ease;white-space:nowrap;
}
.btn-primary{
  background:linear-gradient(135deg,#ef4444,#dc2626);
  color:#fff;box-shadow:0 4px 16px var(--accent-glow);
}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 24px var(--accent-glow)}
.btn-ghost{
  background:rgba(255,255,255,0.04);
  color:var(--text-muted);border:1px solid var(--border);
}
.btn-ghost:hover{background:rgba(255,255,255,0.08);color:var(--text);border-color:var(--border-hover)}
.btn-danger{
  background:rgba(239,68,68,0.15);
  color:#fca5a5;border:1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover{background:rgba(239,68,68,0.25)}
.btn-sm{padding:8px 14px;font-size:13px}
.btn-block{width:100%}

/* ---- LAYOUT ---- */
.container{
  max-width:1280px;margin:0 auto;padding:32px 24px;
}
.page-title{
  font-size:28px;font-weight:700;letter-spacing:-0.03em;margin-bottom:4px;
}
.page-sub{
  color:var(--text-muted);font-size:14px;margin-bottom:28px;
}

/* ---- GRID & CARDS ---- */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:20px;
}
.card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display:block;
}
.card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow);
  border-color:var(--border-hover);
}
.card-media{
  position:relative;
  aspect-ratio:9/16;
  background:#000;
  overflow:hidden;
}
.card-media video{
  width:100%;height:100%;
  object-fit:cover;
}
.card-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.5) 0%, transparent 50%);
  display:flex;align-items:center;justify-content:center;
  opacity:0;transition:opacity .25s;
}
.card:hover .card-overlay{opacity:1}
.play-badge{
  width:48px;height:48px;border-radius:50%;
  background:rgba(239,68,68,.9);
  display:flex;align-items:center;justify-content:center;
  font-size:18px;box-shadow:0 4px 20px var(--accent-glow);
}
.card-body{padding:14px 16px 16px}
.card-title{
  font-size:14px;font-weight:600;line-height:1.35;
  margin-bottom:6px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.card-meta{
  display:flex;align-items:center;gap:6px;
  font-size:12px;color:var(--text-muted);
}
.card-meta .dot{
  width:3px;height:3px;border-radius:50%;background:var(--text-dim);
}

/* ---- EMPTY ---- */
.empty{
  text-align:center;padding:60px 20px;
}
.empty-icon{font-size:48px;margin-bottom:16px;opacity:.5}
.empty h3{font-size:18px;margin-bottom:8px}
.empty p{color:var(--text-muted);font-size:14px}

/* ---- PANEL (admin) ---- */
.panel{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:24px;
  margin-bottom:24px;
}
.panel-title{
  font-size:16px;font-weight:600;margin-bottom:18px;
  display:flex;align-items:center;gap:8px;
}

/* ---- FORMS ---- */
.form-grid{display:flex;flex-direction:column;gap:14px}
.form-group label{
  display:flex;align-items:center;gap:8px;
  font-size:13px;font-weight:500;color:var(--text-muted);
  margin-bottom:6px;
}
input,select,textarea{
  width:100%;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:var(--bg-input);
  color:var(--text);
  font-size:14px;font-family:inherit;
  transition:border-color .2s;
}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:rgba(239,68,68,.5);
}
textarea.code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:12px;line-height:1.5;
  min-height:90px;resize:vertical;
}
.hint{
  font-size:12px;color:var(--text-dim);margin-top:6px;
}
.badge-ok{
  display:inline-block;padding:2px 8px;border-radius:999px;
  font-size:11px;font-weight:600;
  background:rgba(34,197,94,.15);color:#4ade80;
}
.badge-off{
  display:inline-block;padding:2px 8px;border-radius:999px;
  font-size:11px;font-weight:600;
  background:rgba(255,255,255,.06);color:var(--text-dim);
}

/* ---- LIST ---- */
.list-item{
  display:flex;justify-content:space-between;align-items:center;
  gap:16px;padding:14px 0;
  border-bottom:1px solid var(--border);
}
.list-item:last-child{border-bottom:none}
.list-info{display:flex;flex-direction:column;gap:2px;min-width:0}
.list-info strong{font-size:14px}
.list-info small{font-size:12px;color:var(--text-muted)}
.list-info .redirect{
  font-size:12px;color:#7dd3fc;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:420px;
}

/* ---- STATS ---- */
.stats{
  display:flex;flex-wrap:wrap;gap:14px;margin-bottom:28px;
}
.stat-card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px 22px;
  min-width:140px;
}
.stat-num{font-size:24px;font-weight:700;letter-spacing:-0.02em}
.stat-label{font-size:12px;color:var(--text-muted);margin-top:2px}

/* ---- LOGIN ---- */
.login-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:24px;background:var(--bg);
}
.login-card{
  width:100%;max-width:400px;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:20px;
  padding:36px 32px;
  box-shadow:var(--shadow-lg);
}
.login-card .logo{justify-content:center;margin-bottom:8px}
.login-card h1{text-align:center;font-size:22px;font-weight:700;margin-bottom:4px}
.login-card .sub{text-align:center;color:var(--text-muted);font-size:14px;margin-bottom:28px}
.error-box{
  background:rgba(239,68,68,0.12);border:1px solid rgba(239,68,68,0.25);
  color:#fca5a5;padding:12px 14px;border-radius:10px;
  font-size:13px;margin-bottom:16px;text-align:center;
}

/* ---- VIDEO PAGE ---- */
.player-wrap{
  max-width:420px;margin:0 auto 28px;
}
.player{
  width:100%;aspect-ratio:9/16;
  object-fit:cover;border-radius:18px;
  background:#000;box-shadow:var(--shadow-lg);
}
.video-info{text-align:center;margin-bottom:32px}
.video-info h1{font-size:22px;font-weight:700;margin-bottom:8px}
.video-info .meta{color:var(--text-muted);font-size:14px}
.related-title{
  font-size:16px;font-weight:600;margin-bottom:16px;
  display:flex;align-items:center;gap:8px;
}

/* ---- FOOTER ---- */
.site-footer{
  border-top:1px solid var(--border);
  padding:24px;text-align:center;
  color:var(--text-dim);font-size:13px;margin-top:40px;
}

/* ---- AD / BANNERS ---- */
.ad-slot{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:14px;
}
.ad-slot img,
.ad-slot iframe,
.ad-slot ins{
  max-width:100%;
  height:auto;
  display:block;
  border:0;
}
.ad-top{
  margin:0 0 28px;
  padding:12px;
  background:rgba(255,255,255,0.02);
  border:1px solid var(--border);
}
.ad-bottom{
  margin:28px 0 0;
  padding:12px;
  background:rgba(255,255,255,0.02);
  border:1px solid var(--border);
}
.ad-native{
  background:rgba(255,255,255,0.03);
  border:1px solid var(--border);
  min-height:180px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ad-video{
  max-width:420px;
  margin:0 auto 28px;
  padding:12px;
  background:rgba(255,255,255,0.02);
  border:1px solid var(--border);
}

/* ---- RESPONSIVE ---- */
@media(max-width:768px){
  .topbar{padding:14px 16px}
  .container{padding:20px 16px}
  .grid{grid-template-columns:repeat(2,1fr);gap:14px}
  .card-body{padding:10px 12px 12px}
  .card-title{font-size:13px}
  .page-title{font-size:22px}
  .list-item{flex-direction:column;align-items:flex-start}
  .list-info .redirect{max-width:100%}
  .stats{gap:10px}
  .stat-card{min-width:calc(50% - 8px);flex:1}
}
@media(max-width:400px){
  .grid{grid-template-columns:1fr 1fr;gap:10px}
}
