@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── RESET & CONFIGURACIÓN GLOBAL ─────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary:    #0a0a0a;
  --bg-secondary:  #111111;
  --bg-tertiary:   #161616;
  --accent:        #3b82f6;
  --accent-hover:  #60a5fa;
  --text-primary:  #ffffff;
  --text-secondary:#94a3b8;
  --text-tertiary: #4b5563;
  --border:        rgba(255,255,255,0.06);
  --glow:          rgba(59,130,246,0.15);
  --danger:        #ef4444;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}

/* ── CURSOR INTERACTIVO ────────────────────────────────── */
.cursor {
  width: 20px; height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transition: all .12s ease;
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
}
.cursor.hover { transform: scale(1.8); background: rgba(59,130,246,.15); border-color: var(--accent-hover); }

/* ── COMPONENTES DE FONDO ───────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 45px 45px;
  pointer-events: none; z-index: 0;
}
.gradient-orb {
  position: fixed; width: 600px; height: 600px;
  border-radius: 50%; filter: blur(120px); opacity: .12;
  pointer-events: none; z-index: 0;
}
.orb-1 { background: var(--accent); top: -250px; right: -150px; animation: float 22s infinite alternate; }
.orb-2 { background: #8b5cf6; bottom: -250px; left: -150px; animation: float 26s infinite alternate-reverse; }

@keyframes float {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* ── HEADER & NAVIGATION ──────────────────────────────── */
header {
  position: fixed; top: 0; width: 100%;
  background: rgba(10,10,10,.75); backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border); z-index: 1000; transition: all .3s ease;
}
header.scrolled { background: rgba(10,10,10,.96); box-shadow: 0 4px 25px rgba(0,0,0,.5); }
.navbar { max-width: 1300px; margin: 0 auto; padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); text-decoration: none; letter-spacing: -.02em; }
.logo i { color: var(--accent); margin-right: 0.4rem; }
.logo-dot { color: var(--accent); }
.nav-back { color: var(--text-secondary); text-decoration: none; font-size: .9rem; font-weight: 500; display: inline-flex; align-items: center; gap: .5rem; transition: color .25s; }
.nav-back:hover { color: var(--text-primary); }

/* ── BANNER PRINCIPAL CON ESTILO ADMIN GLOW ─────────────── */
.vlog-banner-container {
  position: relative; max-width: 1300px; margin: 6.5rem auto 1.5rem;
  height: 320px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.vlog-banner-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45) saturate(1.1); }
.vlog-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(10, 10, 10, 0.295) 100%);
  z-index: 1;
}
.vlog-banner-title {
  position: absolute; bottom: 2.5rem; left: 3rem; z-index: 2;
  max-width: 650px;
}
.vlog-banner-title h1 { font-size: 3rem; font-weight: 900; letter-spacing: -.04em; margin-bottom: 0.3rem; }
.gradient-text { background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.vlog-banner-title p { color: var(--text-secondary); font-size: 1.05rem; }

/* ── LAYOUT DE COMPOSICIÓN ────────────────────────────── */
.vlog-container {
  max-width: 1300px; margin: 0 auto; padding: 0 2rem 5rem;
  display: grid; grid-template-columns: 1fr 340px; gap: 2rem; position: relative; z-index: 5;
}
.vlog-content-area { min-width: 0; }

/* BARRA LATERAL (SIDEBAR) */
.sidebar-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; position: sticky; top: 90px;
}
.sidebar-box h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.3rem; }
.sidebar-desc { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 1.25rem; }
.categories-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.category-item-btn {
  width: 100%; background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-secondary); padding: .7rem 1rem; border-radius: 10px;
  text-align: left; font-family: inherit; font-size: .9rem; font-weight: 500;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: all .2s ease;
}
.category-item-btn:hover { background: rgba(255,255,255,0.02); color: var(--text-primary); padding-left: 1.2rem; }
.category-item-btn.active { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: var(--accent-hover); font-weight: 600; }
.category-count-tag { font-size: .75rem; background: var(--bg-primary); color: var(--text-secondary); padding: .15rem .5rem; border-radius: 6px; border: 1px solid var(--border); }
.category-item-btn.active .category-count-tag { background: var(--accent); color: #fff; }

/* ── CONTENEDOR INDIVIDUAL (Aislado) ───────────────────── */
.view-single-header {
  background: rgba(59,130,246,0.04); border: 1px solid rgba(59,130,246,0.15);
  padding: 1rem 1.5rem; border-radius: 12px; margin-bottom: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
}
.view-single-header span { font-size: 0.9rem; color: var(--accent-hover); font-weight: 500; }

/* ── CARDS & INTERFAZ POSTS ────────────────────────────── */
.posts-feed { display: flex; flex-direction: column; gap: 2rem; }
.post-card {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: border-color .3s, box-shadow .3s;
}
.post-card:hover { border-color: rgba(59,130,246,.25); box-shadow: 0 10px 35px rgba(0,0,0,.4); }

.post-image { width: 100%; aspect-ratio: 21/9; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.post-youtube { position: relative; padding-bottom: 45%; height: 0; border-bottom: 1px solid var(--border); overflow: hidden; background: #000; }
.post-youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post-body { padding: 2.25rem; }
.post-meta { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.post-date { font-size: .8rem; color: var(--text-secondary); }
.post-badge { font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 6px; background: rgba(59,130,246,.12); color: var(--accent); border: 1px solid rgba(59,130,246,.2); }
.post-cat-badge { font-size: .7rem; font-weight: 600; padding: .25rem .6rem; border-radius: 6px; background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border); text-transform: uppercase; }

.post-title-container h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; margin-bottom: .85rem; }
.post-title-url { color: var(--text-primary); text-decoration: none; transition: color .2s; }
.post-title-url:hover { color: var(--accent-hover); }

.post-content-text { color: var(--text-secondary); line-height: 1.8; white-space: pre-line; font-size: .95rem; }

/* Botones de Expansión (Leer más / Ver más comentarios) */
.btn-inline-toggle {
  background: none; border: none; color: var(--accent-hover); font-family: inherit;
  font-size: .9rem; font-weight: 600; cursor: pointer; padding: 0; margin-top: 0.75rem;
  display: inline-flex; align-items: center; gap: 0.3rem; transition: color 0.2s;
}
.btn-inline-toggle:hover { color: var(--text-primary); }

.post-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.post-link-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.15rem; border-radius: 8px; border: 1px solid rgba(59,130,246,.25); background: rgba(59,130,246,.06); color: var(--accent-hover); font-size: .85rem; font-weight: 600; text-decoration: none; transition: all .25s; }
.post-link-btn:hover { background: rgba(59,130,246,.15); border-color: var(--accent); transform: translateY(-1px); }

.post-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.like-btn { display: flex; align-items: center; gap: .5rem; background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-secondary); border-radius: 30px; padding: .5rem 1.15rem; cursor: pointer; font-size: .85rem; transition: all .25s; }
.like-btn:hover, .like-btn.liked { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.06); }
.share-action-btn { background: none; border: 1px solid var(--border); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.2s; }
.share-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--text-tertiary); }

/* ── SECCIÓN COMENTARIOS ULTRA PREMIUM ────────────────── */
.comments-section { border-top: 1px solid var(--border); padding: 1.75rem 2.25rem; background: rgba(0,0,0,0.2); }
.comments-title { font-size: .95rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text-secondary); display: flex; align-items: center; gap: .5rem; }
.comment-list { display: flex; flex-direction: column; gap: 1rem; }
.comment-item { display: flex; gap: .85rem; animation: fUp .3s ease; }
.comment-item.hidden-comment { display: none; } /* Ocultador nativo por clase */

@keyframes fUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.comment-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #8b5cf6); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.comment-avatar.admin-av { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.comment-bubble { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 12px; padding: .85rem 1.1rem; flex: 1; }
.comment-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.comment-author { font-size: .85rem; font-weight: 700; }
.comment-author.is-admin { color: #f59e0b; }
.admin-badge { font-size: .65rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; background: rgba(245,158,11,.1); color: #f59e0b; border: 1px solid rgba(245,158,11,.2); }
.comment-date { font-size: .75rem; color: var(--text-tertiary); margin-left: auto; }
.comment-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.5; }

.comment-form { display: flex; gap: .85rem; align-items: flex-start; margin-top: 1.25rem; }
.comment-inputs { display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.comment-inputs input, .comment-inputs textarea { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; padding: .7rem 1rem; color: var(--text-primary); font-family: inherit; font-size: .9rem; outline: none; transition: border-color .25s; width: 100%; }
.comment-inputs textarea { resize: vertical; min-height: 70px; }
.comment-inputs input:focus, .comment-inputs textarea:focus { border-color: var(--accent); }
.send-comment-btn { background: var(--accent); border: none; color: #fff; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: background .2s; flex-shrink: 0; }
.send-comment-btn:hover { background: var(--accent-hover); }

/* LOADER & TOASTS */
.loader { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem; gap: 1rem; color: var(--text-secondary); font-size: 0.9rem; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
footer { padding: 3rem 1.5rem; text-align: center; color: var(--text-tertiary); border-top: 1px solid var(--border); font-size: .9rem; position: relative; z-index: 5; }

.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9000; display: flex; flex-direction: column; gap: .75rem; }
.toast { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.5rem; font-size: .9rem; color: var(--text-primary); box-shadow: 0 8px 30px rgba(0,0,0,.5); display: flex; align-items: center; gap: .65rem; animation: tIn .25s ease; }
.toast.success i { color: #4ade80; } .toast.error i { color: #f87171; }
@keyframes tIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* RESPONSIVE */
@media (max-width: 968px) {
  .vlog-container { grid-template-columns: 1fr; }
  .vlog-sidebar { order: -1; }
  .sidebar-box { position: static; }
  .categories-list { flex-direction: row; flex-wrap: wrap; }
  .category-item-btn { width: auto; }
}
@media (max-width: 768px) {
  body { cursor: auto; } .cursor, .cursor-dot { display: none; }
  .vlog-banner-container { margin-top: 5.5rem; height: auto; padding: 2rem 1.5rem; border-radius: 0; border-left: none; border-right: none; }
  .vlog-banner-img { position: absolute; inset:0; z-index: 0; }
  .vlog-banner-title { position: relative; bottom: 0; left: 0; }
  .vlog-banner-title h1 { font-size: 2.25rem; }
  .post-body { padding: 1.5rem; } .comments-section { padding: 1.5rem; }
  .comment-form { flex-direction: column; } .send-comment-btn { width: 100%; }
}