@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Georgia:ital,wght@0,400;0,700;1,400&family=Verdana&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables 2000s palette ── */
:root {
  --bg:       #0d0020;
  --bg2:      #130030;
  --panel:    rgba(20, 0, 50, 0.85);
  --border:   #7b2fff;
  --border2:  #cc44ff;
  --glow:     #b44dff;
  --cyan:     #00ffee;
  --lime:     #aaff00;
  --pink:     #ff4dab;
  --yellow:   #ffe566;
  --white:    #f0e6ff;
  --gray:     #9988bb;
  --link:     #cc88ff;
  --link-vis: #ff99cc;
  --texto:    #ddd0f5;
  --texto2:   #c0b0e0;
  --hueco:    rgba(0,0,0,0.4);
}

/* ── Body / Star Background ── */
body {
  background-color: var(--bg);
  color: var(--white);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield canvas */
#stars-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Marquee banner ── */
.marquee-wrap {
  position: relative;
  z-index: 10;
  background: linear-gradient(90deg, #1a004a, #2a006a, #1a004a);
  border-bottom: 2px solid var(--border);
  border-top: 2px solid var(--border2);
  overflow: hidden;
  padding: 4px 0;
  white-space: nowrap;
}
.marquee-inner {
  display: inline-block;
  animation: marquee 28s linear infinite;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.05em;
}
.marquee-inner span { margin: 0 2.5rem; }
@keyframes marquee { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

/* ── Main layout ── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px 60px;
}

/* ── Header ── */
.blog-header {
  text-align: center;
  padding: 30px 16px 20px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 24px;
}
.blog-header-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: bold;
  font-style: italic;
  color: var(--glow);
  text-shadow:
    0 0 10px var(--glow),
    0 0 30px rgba(180,77,255,0.5),
    0 0 60px rgba(180,77,255,0.2);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.blog-header-sub {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.blog-header-nav {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.blog-header-nav a {
  color: var(--link);
  text-decoration: none;
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: rgba(123,47,255,0.1);
  transition: background 0.2s, color 0.2s;
}
.blog-header-nav a:hover {
  background: var(--border);
  color: #fff;
}
.blog-header-nav .sep { color: var(--gray); font-size: 11px; align-self: center; }

/* ── Two-column layout ── */
.blog-cols {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 680px) {
  .blog-cols { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}

/* ── Generic panel ── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.panel-title {
  background: linear-gradient(90deg, #2a006a, #4a00aa);
  color: var(--cyan);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}
.panel-body {
  padding: 12px;
}

/* ── Blog post ── */
.post {
  margin-bottom: 22px;
}
.post-header {
  background: linear-gradient(90deg, #1e0050, #33007a);
  border-bottom: 1px dotted var(--border2);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}
.post-title {
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: bold;
  color: var(--yellow);
  text-shadow: 0 0 8px rgba(255,229,102,0.4);
}
.post-title a {
  color: inherit;
  text-decoration: none;
}
.post-title a:hover { text-decoration: underline; }
.post-date {
  color: var(--gray);
  font-size: 10px;
  white-space: nowrap;
}
.post-meta {
  display: flex;
  gap: 12px;
  padding: 5px 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(123,47,255,0.2);
  font-size: 10px;
  color: var(--gray);
}
.post-meta .mood { color: var(--pink); }
.post-meta .music { color: var(--cyan); }
.post-body {
  padding: 14px 12px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--texto);
}
.post-body p { margin-bottom: 10px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body em { color: var(--pink); font-style: italic; }
.post-body strong { color: var(--yellow); }
.post-body a { color: var(--link); }
.post-body a:hover { color: var(--link-vis); }
.post-body blockquote {
  border-left: 3px solid var(--border2);
  padding: 6px 12px;
  margin: 12px 0;
  background: rgba(123,47,255,0.08);
  color: var(--gray);
  font-style: italic;
}
.post-footer {
  padding: 6px 12px;
  border-top: 1px dotted rgba(123,47,255,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10px;
  padding: 1px 7px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--link);
  background: rgba(123,47,255,0.1);
  cursor: default;
}
.post-comments-link {
  font-size: 10px;
  color: var(--cyan);
  text-decoration: none;
}
.post-comments-link:hover { text-decoration: underline; }

/* Divider */
.divider {
  text-align: center;
  color: var(--border);
  font-size: 11px;
  letter-spacing: 0.3em;
  margin: 6px 0 22px;
  user-select: none;
}

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 16px; }

/* About me box */
.about-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: block;
  margin: 0 auto 10px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(180,77,255,0.5);
}
.about-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 32px;
  background: rgba(123,47,255,0.15);
  box-shadow: 0 0 14px rgba(180,77,255,0.5);
}
.about-name {
  text-align: center;
  font-family: Georgia, serif;
  font-weight: bold;
  color: var(--glow);
  font-size: 13px;
  text-shadow: 0 0 8px rgba(180,77,255,0.5);
  margin-bottom: 4px;
}
.about-handle {
  text-align: center;
  font-size: 10px;
  color: var(--gray);
  margin-bottom: 10px;
}
.about-text {
  font-size: 11.5px;
  color: var(--texto2);
  text-align: center;
  line-height: 1.6;
}

/* Status rows */
.status-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(123,47,255,0.2);
  color: var(--texto2);
}
.status-row:last-child { border-bottom: none; }
.status-row .key { color: var(--gray); }
.status-row .val { color: var(--cyan); text-align: right; }

/* Visitor counter */
.counter-wrap {
  text-align: center;
  padding: 10px;
}
.counter-label {
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}
.counter-digits {
  display: inline-flex;
  gap: 2px;
}
.counter-digit {
  background: #000;
  color: var(--lime);
  font-family: 'Courier Prime', Courier, monospace;
  font-size: 18px;
  font-weight: bold;
  padding: 2px 5px;
  border: 1px solid #333;
  min-width: 22px;
  text-align: center;
  text-shadow: 0 0 6px var(--lime);
}

/* Links list */
.links-list { list-style: none; }
.links-list li {
  padding: 4px 0;
  border-bottom: 1px dotted rgba(123,47,255,0.2);
}
.links-list li:last-child { border-bottom: none; }
.links-list a {
  color: var(--link);
  font-size: 11.5px;
  text-decoration: none;
}
.links-list a:hover { color: var(--pink); text-decoration: underline; }
.links-list .arrow { color: var(--border2); margin-right: 4px; }

/* Blinking cursor */
.blink {
  animation: blink 1s step-end infinite;
  color: var(--cyan);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Glitter/sparkle animation */
.sparkle {
  display: inline-block;
  animation: sparkle 2s ease-in-out infinite;
}
@keyframes sparkle {
  0%,100% { color: var(--cyan); text-shadow: 0 0 4px var(--cyan); }
  33%      { color: var(--pink); text-shadow: 0 0 4px var(--pink); }
  66%      { color: var(--yellow); text-shadow: 0 0 4px var(--yellow); }
}

/* Footer */
.blog-footer {
  text-align: center;
  padding: 24px 16px;
  border-top: 1px dashed var(--border);
  color: var(--gray);
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-top: 40px;
}
.blog-footer a { color: var(--link); text-decoration: none; }
.blog-footer a:hover { text-decoration: underline; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* Image in post */
.post-img {
  max-width: 100%;
  border: 2px solid var(--border);
  border-radius: 2px;
  margin: 10px 0;
  display: block;
}

/* NEW POST button (for future use) */
.back-btn {
  display: inline-block;
  color: var(--cyan);
  text-decoration: none;
  font-size: 11px;
  padding: 4px 12px;
  border: 1px solid var(--cyan);
  border-radius: 2px;
  background: rgba(0,255,238,0.05);
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(0,255,238,0.15); }

/* Glow pulse on panel borders */
.panel {
  box-shadow: 0 0 0 0 rgba(123,47,255,0);
  transition: box-shadow 0.4s;
}
.panel:hover {
  box-shadow: 0 0 14px rgba(123,47,255,0.25);
}

/* ── Posts dinamicos ── */
a.post-date { text-decoration: none; }
a.post-date:hover { color: var(--cyan); }
a.tag { text-decoration: none; cursor: pointer; }
a.tag:hover { background: var(--border); color: #fff; }
.tag small { color: var(--gray); }
.muted { color: var(--gray); font-size: 11px; }
.post-actions { display: flex; align-items: center; gap: 10px; }

/* Fotos del post, en rejilla tipo Twitter */
.post-images {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 2px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.post-images.n-2, .post-images.n-3, .post-images.n-4 {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 16 / 9;
}
.post-images.n-3, .post-images.n-4 { grid-template-rows: 1fr 1fr; }
.post-images.n-3 a:first-child { grid-row: span 2; }
.post-images a { display: block; min-height: 0; background: #000; }
.post-images img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-images.n-1 img { height: auto; max-height: 520px; object-fit: contain; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 0, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border: 2px solid var(--border2);
  box-shadow: 0 0 30px rgba(180,77,255,0.5);
}

/* Buscador */
.filters { margin-bottom: 16px; }
.filters[hidden] { display: none; }
.filters-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.field {
  background: var(--hueco);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  padding: 5px 8px;
}
.field:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 6px rgba(0,255,238,0.3); }
.field::placeholder { color: var(--gray); }
#filter-q { flex: 1 1 180px; min-width: 0; }
#filter-tag { flex: 0 1 170px; min-width: 0; }
select.field option { background: var(--bg2); }
.check { font-size: 11px; color: var(--gray); display: flex; gap: 5px; align-items: center; cursor: pointer; }
.check input { accent-color: var(--border2); }
button.back-btn { font-family: inherit; cursor: pointer; }
button.back-btn[hidden] { display: none; }

.feed-status {
  font-size: 11px;
  color: var(--gray);
  margin: 0 0 12px;
  min-height: 1em;
}
.feed-status a { color: var(--cyan); }

/* Paginacion */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
}
.pagination a, .pagination span {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--link);
  text-decoration: none;
  background: rgba(123,47,255,0.1);
}
.pagination a:hover { background: var(--border); color: #fff; }
.pagination .current { background: var(--border); color: #fff; font-weight: bold; }
.pagination .disabled { color: #554477; border-color: #33205a; }
.pagination .gap { border: none; background: none; color: var(--gray); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

.danger-btn {
  font-family: inherit;
  font-size: 10px;
  padding: 1px 8px;
  border: 1px solid var(--pink);
  border-radius: 2px;
  color: var(--pink);
  background: rgba(255,77,171,0.08);
  cursor: pointer;
}
.danger-btn:hover { background: var(--pink); color: #fff; }
.danger-btn:disabled { opacity: 0.5; cursor: wait; }
