/* ===== LA NETA DE NETO — Y2K / Vaporwave / Desktop OS ===== */

:root {
  --cyan: #5ee5f0;
  --cyan-deep: #4dc8d4;
  --pink: #ff5cd9;
  --pink-deep: #e043b9;
  --purple: #b16cff;
  --yellow: #ffe156;
  --yellow-soft: #fff4a3;
  --orange: #ff9933;
  --green: #6bff8e;
  --window-bg: #fff8e6;
  --ink: #1a1a2e;
  --shadow-hard: 4px 4px 0 #1a1a2e;
  --shadow-soft: 2px 2px 0 #1a1a2e;
}

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

html, body {
  min-height: 100vh;
  font-family: 'Space Mono', monospace;
  color: var(--ink);
  overflow: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' shape-rendering='crispEdges'><path d='M2 2 L2 14 L5 11 L7 16 L9 15 L7 10 L11 10 Z' fill='white' stroke='%231a1a2e' stroke-width='1.2'/></svg>") 2 2, auto;
}

body {
  background:
    linear-gradient(135deg, #4dc8d4 0%, #5ee5f0 35%, #b16cff 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.45), transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(177, 108, 255, 0.55), transparent 50%),
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.10) 0px,
    rgba(0,0,0,0.10) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9999;
}

/* ===== Desktop layout ===== */
.desktop {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 2;
}

/* ===== Iconos de escritorio ===== */
.icons {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;            
  align-content: flex-start;  
  gap: 18px;
  max-height: calc(100vh - 72px); 
  max-width: calc(80px * 4 + 18px * 3); 
  z-index: 6;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.icon:hover {
  transform: translateY(-2px);
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

.icon-img {
  width: 56px;
  height: 56px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(2px 2px 0 rgba(26, 26, 46, 0.4));
}

.icon-label {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: white;
  text-shadow: 1px 1px 0 var(--ink), 2px 2px 0 var(--ink);
  margin-top: 6px;
  letter-spacing: 0.5px;
  text-align: center;
}

/* ===== Ventanas ===== */
.window {
  position: absolute;
  background: var(--window-bg);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-hard);
  min-width: 240px;
  z-index: 10;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.window.delay-1 { animation-delay: 0.1s; }
.window.delay-2 { animation-delay: 0.3s; }
.window.delay-3 { animation-delay: 0.5s; }
.window.delay-4 { animation-delay: 0.7s; }

@keyframes pop {
  0% { opacity: 0; transform: scale(0.6) rotate(-4deg); }
  60% { opacity: 1; transform: scale(1.04) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes close-pop {
  to { opacity: 0; transform: scale(0.5) rotate(6deg); }
}

.window.closing {
  animation: close-pop 0.25s ease-in forwards;
}

.window.hidden { display: none; }

.titlebar {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 2px solid var(--ink);
  cursor: grab;
  user-select: none;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-deep));
  gap: 8px;
}

.titlebar:active { cursor: grabbing; }

.titlebar.tb-pink { background: linear-gradient(90deg, var(--pink), var(--pink-deep)); }
.titlebar.tb-purple { background: linear-gradient(90deg, var(--purple), #8a3ff0); }
.titlebar.tb-yellow { background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.titlebar.tb-green { background: linear-gradient(90deg, var(--green), #2dcc55); }
.titlebar.tb-cyan { background: linear-gradient(90deg, var(--cyan), var(--purple)); }

.titlebar-title {
  font-family: 'VT323', monospace;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.titlebar-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.controls { display: flex; gap: 4px; }

.ctrl {
  width: 22px;
  height: 20px;
  border: 2px solid var(--ink);
  background: var(--window-bg);
  font-family: 'VT323', monospace;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  border-radius: 3px;
  padding: 0;
}

.ctrl:hover { background: var(--yellow); }
.ctrl.close:hover { background: var(--pink); color: white; }

.window-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
}

/* ===== Botones ===== */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: filter 0.1s;
  letter-spacing: 1px;
}

.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn.btn-pink { background: var(--pink); color: white; }
.btn.btn-cyan { background: var(--cyan); }
.btn.btn-green { background: var(--green); }
.btn.btn-purple { background: var(--purple); color: white; }

/* ===== Inputs ===== */
input[type="text"], textarea {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  outline: none;
}

input[type="text"]:focus, textarea:focus {
  background: var(--yellow-soft);
  box-shadow: var(--shadow-soft);
}

/* ===== Taskbar ===== */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 32px;
  background: linear-gradient(180deg, #d8d8e0, #b0b0bc);
  border-top: 2px solid var(--ink);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  z-index: 100;
}

.start-btn {
  background: #650396;
  border: 2px solid var(--ink);
  color: white;
  font-family: 'VT323', monospace;
  font-size: 14px;
  padding: 1px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.start-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.start-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.task-items {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.task-item {
  background: var(--window-bg);
  border: 2px solid var(--ink);
  padding: 1px 8px;
  border-radius: 4px;
  font-family: 'VT323', monospace;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.task-item.active {
  background: var(--pink);
  color: white;
}

.task-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.task-item:hover { background: var(--yellow); }
.task-item.active:hover { background: var(--pink-deep); }

.task-clock {
  background: var(--window-bg);
  border: 2px solid var(--ink);
  padding: 1px 10px;
  border-radius: 4px;
  font-family: 'VT323', monospace;
  font-size: 16px;
  letter-spacing: 1px;
}

/* ===== Stickers flotantes ===== */
.sticker {
  position: absolute;
  background: var(--yellow);
  border: 2px solid var(--ink);
  padding: 6px 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  border-radius: 4px;
  z-index: 8;
  animation: wobble 3s ease-in-out infinite;
  pointer-events: none;
}

.sticker.cyan { background: var(--cyan); }
.sticker.pink { background: var(--pink); color: white; }

@keyframes wobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

/* ===== Hero / Vaporwave scene ===== */
.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  color: var(--ink);
  text-align: center;
  margin: 12px 0 6px;
  text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--cyan);
  line-height: 1.4;
}

.hero-subtitle {
  font-family: 'VT323', monospace;
  font-size: 18px;
  text-align: center;
  margin-bottom: 14px;
  color: var(--purple);
}

.cursor-blink::after {
  content: "_";
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink { to { visibility: hidden; } }

.hero-scene {
  width: 100%;
  height: 160px;
  display: block;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(180deg, #ff8ad6 0%, #b16cff 50%, #5ee5f0 100%);
  object-fit: cover;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ===== Posts list ===== */
.post-list { list-style: none; }

.post-list li {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--ink);
  cursor: pointer;
  transition: background 0.15s;
}

.post-list li:hover { background: var(--yellow-soft); transform: translateX(3px); }
.post-list li:last-child { border-bottom: 0; }

.post-meta {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--purple);
  text-transform: uppercase;
}

.post-title {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-top: 2px;
}

/* ===== Welcome popup ===== */
.warning-window .window-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.warning-icon {
  width: 44px;
  height: 44px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Chat preview ===== */
.chat-msg {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.chat-user {
  font-family: 'VT323', monospace;
  font-size: 15px;
  font-weight: 700;
  margin-right: 6px;
}

.chat-user.author { color: var(--pink-deep); }
.chat-user.reader { color: var(--purple); }
.chat-user.reader-cyan { color: var(--cyan-deep); }

.chat-time {
  font-family: 'VT323', monospace;
  font-size: 12px;
  color: #888;
  margin-left: 4px;
}

/* ===== Blog page ===== */
.blog-window { width: min(900px, 90vw); height: min(640px, 80vh); top: 60px; left: 50%; transform: translateX(-50%); }

.blog-window .window-body {
  display: flex;
  padding: 0;
  height: 100%;
}

.blog-sidebar {
  width: 30%;
  min-width: 180px;
  border-right: 2px solid var(--ink);
  padding: 14px;
  background: var(--yellow-soft);
  overflow: auto;
}

.blog-sidebar h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 12px;
  color: var(--ink);
}

.cat-list { list-style: none; }
.cat-list li {
  padding: 6px 8px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: 'VT323', monospace;
  font-size: 17px;
  border-radius: 4px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}

.cat-list li:hover, .cat-list li.active {
  border-color: var(--ink);
  background: var(--pink);
  color: white;
}

.cat-count { font-size: 14px; opacity: 0.9; }

.blog-content {
  flex: 1;
  padding: 14px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  align-content: start;
}

.post-card {
  border: 2px solid var(--ink);
  background: white;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  box-shadow: var(--shadow-soft);
}

.post-card:hover {
  background: var(--yellow-soft);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

.post-card .post-title {
  font-size: 15px;
  margin: 6px 0;
}

.post-card .post-preview {
  font-size: 12px;
  color: #444;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal post */
.modal-window {
  width: min(640px, 92vw);
  max-height: 80vh;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
}

.modal-window .window-body { max-height: 60vh; overflow: auto; }

.modal-window .post-content {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
}

.modal-window .post-content p { margin-bottom: 10px; }

/* ===== Post window dinámica (abierta sobre el desktop) ===== */
.post-modal-win {
  width: min(720px, 92vw);
  max-height: 82vh;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  animation: none !important;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.post-modal-win.shown {
  opacity: 1;
}

.post-modal-win.closing {
  opacity: 0;
  animation: none !important;
}

.post-modal-body {
  overflow-y: auto;
  flex: 1;
  max-height: calc(82vh - 50px);
}

.post-modal-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  line-height: 1.5;
  margin: 6px 0 14px;
}

.post-modal-win .post-content {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
}

.post-modal-win .post-content p { margin-bottom: 10px; }

.post-modal-win .post-content ul {
  margin: 12px 0 16px;
  padding-left: 20px;
  list-style-position: inside;
}

.post-modal-win .post-content li { margin-bottom: 6px; }

.post-comments {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 2px dashed var(--ink);
}

.post-comments-h {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 var(--cyan);
  letter-spacing: 1px;
}

/* ===== Giscus container (Y2K marco) ===== */
.giscus-container {
  background: var(--window-bg);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 10px;
  box-shadow: var(--shadow-soft);
  min-height: 80px;
}

.giscus-container .giscus,
.giscus-container .giscus-frame {
  width: 100%;
  border: 0;
}

/* ===== Back button ===== */
.back-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
}

/* ===== About page ===== */
.about-window {
  width: min(820px, 92vw);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.avatar-box {
  border: 2px solid var(--ink);
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  padding: 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.avatar-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.about-h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 14px;
  text-shadow: 2px 2px 0 var(--pink);
}

.about-text { font-size: 13px; line-height: 1.7; margin-bottom: 10px; }

.stats-card {
  margin-top: 16px;
  border: 2px solid var(--ink);
  background: var(--yellow-soft);
  border-radius: 6px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.stats-card h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-family: 'VT323', monospace;
  font-size: 16px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--ink);
}

.skill-row { margin-top: 8px; }

.skill-label {
  display: flex;
  justify-content: space-between;
  font-family: 'VT323', monospace;
  font-size: 15px;
}

.skill-bar {
  height: 12px;
  border: 2px solid var(--ink);
  background: white;
  margin-top: 2px;
  position: relative;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--pink) 0 6px, var(--purple) 6px 12px);
}

.achievements-window {
  width: 280px;
  top: 80px;
  right: 30px;
}

.ach-list { list-style: none; }
.ach-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--ink);
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: 'VT323', monospace;
  font-size: 16px;
}

.ach-icon {
  width: 22px; height: 22px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ===== Obsesiones page ===== */
.obs-window {
  width: min(960px, 92vw);
  height: min(640px, 80vh);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.obs-window .window-body { overflow-y: auto; }

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-family: 'VT323', monospace;
  font-size: 15px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
}

.filter-pill:hover { background: var(--pink); color: white; }
.filter-pill.active { background: var(--pink); color: white; transform: translate(2px, 2px); box-shadow: 0; }

.obs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.obs-card {
  border: 2px solid var(--ink);
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.obs-card:hover {
  transform: rotate(-2deg) translateY(-3px);
  box-shadow: 6px 6px 0 var(--ink);
}

.obs-cover {
  width: 100%;
  height: 140px;
  display: block;
  border-bottom: 2px solid var(--ink);
  object-fit: cover;
  background: var(--window-bg);
}

.obs-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: top;
  font-size: 54px;
  position: relative;
  overflow: hidden;
}

.obs-cover-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0,0,0,0.08) 25%, transparent 25%);
  background-size: 12px 12px;
  pointer-events: none;
}

.obs-cover-placeholder span {
  position: relative;
  z-index: 1;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.3));
}

.obs-info { padding: 10px 12px; }

.obs-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.obs-cat {
  display: inline-block;
  font-family: 'VT323', monospace;
  font-size: 13px;
  background: var(--cyan);
  border: 1px solid var(--ink);
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.obs-stars {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--orange);
  margin-bottom: 6px;
}

.obs-desc { font-size: 12px; line-height: 1.5; }

/* ===== Chat page ===== */
.chat-window {
  width: min(880px, 92vw);
  height: min(640px, 80vh);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.chat-window .window-body {
  display: flex;
  padding: 0;
  height: 100%;
  flex: 1;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
}

.chat-message {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(26, 26, 46, 0.2);
}

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 2px solid var(--ink);
  background: var(--yellow-soft);
}

.chat-input-row input {
  flex: 1;
}

.chat-sidebar {
  width: 200px;
  border-left: 2px solid var(--ink);
  background: var(--cyan);
  padding: 12px;
  overflow-y: auto;
}

.chat-sidebar h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  margin-bottom: 10px;
}

.user-list { list-style: none; }
.user-list li {
  font-family: 'VT323', monospace;
  font-size: 16px;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-block;
}

/* ===== Start menu ===== */
.start-menu {
  position: fixed;
  bottom: 38px;
  left: 6px;
  width: 220px;
  background: var(--window-bg);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-hard);
  z-index: 200;
  padding: 6px;
  display: none;
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.start-menu.open { display: block; }

.start-menu .menu-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  background: var(--pink);
  color: white;
  padding: 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.start-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 3px;
}

.start-menu a:hover { background: var(--yellow); }
.start-menu .sep { height: 2px; background: var(--ink); margin: 4px 0; opacity: 0.3; }

/* ===== Chat iframe (Chattable) ===== */
.chat-iframe-window {
  width: min(880px, 92vw);
  height: min(640px, 80vh);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.chat-iframe-body {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-options-bar {
  border-bottom: 2px solid var(--ink);
  background: var(--yellow-soft);
  padding: 6px 10px;
  flex-shrink: 0;
}

.chat-options-toggle {
  background: transparent;
  border: 0;
  font-family: 'VT323', monospace;
  font-size: 17px;
  cursor: pointer;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: 1px;
  padding: 2px 4px;
}

.chat-options-toggle:hover { color: var(--pink-deep); }

.chat-options-panel {
  display: none;
  margin-top: 8px;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.chat-options-bar.open .chat-options-panel { display: flex; }

.chat-options-panel label {
  font-family: 'VT323', monospace;
  font-size: 16px;
  text-transform: uppercase;
}

.chat-options-panel input {
  flex: 1;
  min-width: 120px;
}

.chat-options-msg {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--purple);
  margin-left: 6px;
}

.chat-iframe-body iframe,
iframe#chattable {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  display: block;
  background: var(--window-bg);
}

.chat-preview-iframe iframe {
  width: 100%;
  height: 240px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--window-bg);
}

/* ===== App windows (iframes desde el escritorio) ===== */
.app-window {
  width: min(960px, 92vw);
  height: min(680px, 82vh);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.app-iframe-body {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex: 1;
}

.app-iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  display: block;
  background: var(--window-bg);
}

@media (max-width: 720px) {
  .app-iframe {
    height: 75vh;
    min-height: 580px;
  }
  #obs-app-win .app-iframe {
    height: 80vh;
    min-height: 640px;
  }
}

/* ===== Embed mode (iframe content sin chrome) ===== */
.embed-mode,
.embed-mode body { overflow: auto !important; }
.embed-mode body::before,
.embed-mode body::after { display: none !important; }
.embed-mode .icons,
.embed-mode .taskbar,
.embed-mode .start-menu,
.embed-mode .start-btn,
.embed-mode .sticker,
.embed-mode .back-btn { display: none !important; }

.embed-mode .desktop {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.embed-mode .window {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.embed-mode .titlebar { display: none !important; }
.embed-mode html, .embed-mode body { background: var(--window-bg) !important; }
.embed-mode body { cursor: auto !important; }

/* En embed mode, las ventanas principales (blog/about/obs/chat) deben llenar
   el alto del iframe para que las sidebars no se corten al filtrar */
.embed-mode .desktop {
  height: 100vh !important;
  min-height: 100vh !important;
}
.embed-mode .blog-window,
.embed-mode .about-window,
.embed-mode .obs-window,
.embed-mode .chat-iframe-window,
.embed-mode .chat-window {
  height: 100vh !important;
  min-height: 100vh !important;
}

/* ===== Music player ===== */
.music-body {
  padding: 10px !important;
}

.sc-iframe {
  width: 100%;
  height: 166px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  display: block;
  background: #515d6d;
}

.music-credit {
  margin-top: 8px;
  font-family: 'VT323', monospace;
  font-size: 13px;
  color: var(--purple);
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.music-credit a {
  color: var(--pink-deep);
  text-decoration: none;
}

.music-credit a:hover {
  color: var(--purple);
  text-decoration: underline;
}

/* ===== Visitas counter ===== */
.visits-body {
  text-align: center;
  padding: 14px 12px !important;
}

.visits-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 var(--cyan);
}

.visits-counter {
  display: inline-block;
  border: 2px solid var(--ink);
  background: #1a1a2e;
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
  min-height: 24px;
  min-width: 100px;
}

.visits-counter img,
.visits-counter span,
.visits-counter div {
  display: inline-block;
  vertical-align: middle;
}

.visits-credit {
  margin-top: 10px;
}

.visits-credit a {
  font-family: 'VT323', monospace;
  font-size: 12px;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.visits-credit a:hover { color: var(--pink-deep); text-decoration: underline; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed var(--ink);
  border-radius: 6px;
  background: var(--yellow-soft);
  margin: 8px;
}

.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.empty-state h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--ink);
}

.empty-state p {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--purple);
}

/* ===== Películas · VHS Videoclub ===== */
.pelis-window {
  width: min(480px, 92vw);
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.pelis-body {
  padding: 0 !important;
  background:
    repeating-linear-gradient(135deg, #1a1a2e 0 12px, #221a36 12px 24px);
  position: relative;
}

.pelis-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(177,108,255,0.35), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(94,229,240,0.18), transparent 55%);
  pointer-events: none;
}

/* ---- Posters shelf ---- */
.pelis-posters {
  position: relative;
  padding: 20px 18px 22px;
}

.pelis-shelf-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--pink-deep), 4px 4px 0 var(--ink);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.pelis-shelf-foot {
  margin-top: 18px;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: var(--cyan);
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 var(--ink);
}

.pelis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pelis-card {
  cursor: pointer;
  background: var(--window-bg);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .18s, rotate .18s;
}
.pelis-card:nth-child(1) { transform: rotate(-1.2deg); }
.pelis-card:nth-child(3) { transform: rotate(1.2deg); }

.pelis-card:hover {
  transform: translate(-3px, -4px) rotate(0deg);
  box-shadow: 6px 6px 0 var(--ink);
  z-index: 2;
}

.pelis-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #000;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.pelis-poster {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pelis-tape-label {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  font-family: 'VT323', monospace;
  font-size: 12px;
  padding: 1px 6px;
  letter-spacing: 1px;
  transform: rotate(5deg);
  box-shadow: 1.5px 1.5px 0 var(--ink);
  color: var(--ink);
  z-index: 2;
}

.pelis-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 92, 217, 0.82);
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 3;
}

.pelis-play-overlay span {
  display: inline-block;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--yellow);
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 var(--pink-deep);
  transform: scale(0.85);
  transition: transform .15s ease;
}

.pelis-card:hover .pelis-play-overlay { opacity: 1; }
.pelis-card:hover .pelis-play-overlay span { transform: scale(1); }

.pelis-info {
  padding: 8px 10px;
  background: var(--window-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pelis-tape-id {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--ink);
  letter-spacing: 0.5px;
}

.pelis-rating {
  font-family: 'VT323', monospace;
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 1px;
}

/* ---- VHS Player view ---- */
.pelis-player {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.pelis-player.hidden,
.pelis-posters.hidden { display: none; }

.crt-tv {
  background: linear-gradient(180deg, #d4ccb8 0%, #b0a78f 60%, #948b75 100%);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 16px 14px 22px;
  box-shadow: var(--shadow-hard);
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 14px;
  position: relative;
}

.crt-tv::before {
  /* plastic highlight */
  content: "";
  position: absolute;
  top: 4px; left: 8px; right: 8px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  border-radius: 4px;
  pointer-events: none;
}

.crt-screen-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crt-screen {
  position: relative;
  background: #000;
  border: 4px solid #2a2622;
  border-radius: 14px / 18px;
  box-shadow:
    inset 0 0 24px rgba(0,0,0,0.95),
    inset 0 0 80px rgba(80,0,140,0.25);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.crt-iframe-wrap {
  position: absolute;
  inset: 0;
  border-radius: 8px / 12px;
  overflow: hidden;
}

.crt-iframe-wrap iframe {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  border: 0;
  display: block;
}

.crt-hud-rec,
.crt-hud-channel {
  position: absolute;
  top: 10px;
  z-index: 4;
  font-family: 'VT323', monospace;
  font-size: 15px;
  letter-spacing: 1px;
  pointer-events: none;
}

.crt-hud-rec {
  left: 12px;
  color: #6bff8e;
  text-shadow: 0 0 6px #6bff8e, 0 0 12px rgba(107,255,142,0.6);
}
.crt-hud-rec::before {
  content: "●";
  color: #ff2d4f;
  margin-right: 5px;
  text-shadow: 0 0 6px #ff2d4f;
  animation: crt-rec-blink 1.3s steps(2, start) infinite;
}
@keyframes crt-rec-blink { 50%, 100% { opacity: 0; } }

.crt-hud-channel {
  right: 12px;
  color: #5ee5f0;
  text-shadow: 0 0 6px #5ee5f0, 0 0 12px rgba(94,229,240,0.6);
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 3;
}

.crt-glare {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 8%, rgba(255,255,255,0.18), transparent 35%),
    radial-gradient(ellipse at 80% 92%, rgba(255,255,255,0.08), transparent 40%);
  pointer-events: none;
  z-index: 4;
  border-radius: inherit;
}

.crt-brand {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  text-align: right;
  color: var(--ink);
  opacity: 0.7;
  letter-spacing: 1px;
  padding-right: 6px;
}

.crt-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.crt-knob {
  width: 50px;
  height: 50px;
  background:
    radial-gradient(circle at 32% 30%, #807565, #3a342c 70%, #1a1612 100%);
  border: 2px solid var(--ink);
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.65), var(--shadow-soft);
}

.crt-knob-dot {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 4px;
  height: 14px;
  background: var(--yellow);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transform: translateX(-50%);
  transform-origin: 50% 20px;
}

.crt-knob-2 .crt-knob-dot { transform: translateX(-50%) rotate(50deg); }

.crt-speaker {
  width: 50px;
  height: 60px;
  background:
    repeating-linear-gradient(to bottom, #2a2622 0 2px, #110f0c 2px 6px);
  border: 2px solid var(--ink);
  border-radius: 4px;
  margin-top: auto;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.7);
}

/* ---- VCR Deck ---- */
.vcr-deck {
  background: linear-gradient(180deg, #2c2c34 0%, #18181f 100%);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow-hard);
}

.vcr-top {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.vcr-slot {
  flex: 1;
  background: #000;
  border: 2px solid #3a3a44;
  border-radius: 4px;
  padding: 6px 12px;
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 0 8px rgba(107,255,142,0.18);
}

.vcr-label {
  color: var(--cyan);
  text-shadow: 0 0 5px var(--cyan);
}

.vcr-tape-id {
  flex: 1;
  color: var(--yellow);
  text-shadow: 0 0 6px var(--yellow);
}

.vcr-blink {
  color: #ff2d4f;
  text-shadow: 0 0 6px #ff2d4f;
  animation: crt-rec-blink 1.2s steps(2, start) infinite;
}

.vcr-led {
  background: #000;
  border: 2px solid #3a3a44;
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: var(--pink);
  text-shadow: 0 0 5px var(--pink);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.vcr-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.vcr-btn {
  background: linear-gradient(180deg, #ece2cc, #c2b89c);
  border: 2px solid var(--ink);
  border-radius: 5px;
  font-family: 'VT323', monospace;
  font-size: 15px;
  padding: 5px 11px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  letter-spacing: 1px;
  color: var(--ink);
  text-transform: uppercase;
}

.vcr-btn:hover { background: var(--yellow); }
.vcr-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.vcr-btn.vcr-play { background: var(--pink); color: white; }
.vcr-btn.vcr-play:hover { background: var(--pink-deep); }

.vcr-btn.vcr-eject { background: var(--cyan); }
.vcr-btn.vcr-eject:hover { background: var(--green); }

@media (max-width: 720px) {
  .pelis-window { width: 96vw; }
  .pelis-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pelis-card:nth-child(3) { display: none; }
  .crt-tv {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .crt-side {
    flex-direction: row;
    justify-content: center;
    gap: 14px;
  }
  .crt-speaker { width: 80px; height: 40px; margin-top: 0; }
  .vcr-top { flex-direction: column; gap: 6px; }
  .vcr-btn { font-size: 13px; padding: 4px 8px; }
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  html, body { overflow: auto; }
  .desktop {
    height: auto;
    min-height: 100vh;
    padding: 16px 8px 60px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  .icons {
    position: relative !important;
    top: auto !important; left: auto !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    width: 100%;
  }
  .icon { width: 64px; }
  .icon-img { width: 42px; height: 42px; }
  .icon-label { font-size: 14px; }
  .window {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 92vw !important;
    max-width: 92vw !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
  }
  .blog-window .window-body, .chat-window .window-body {
    flex-direction: column;
    height: auto;
  }
  .blog-sidebar, .chat-sidebar {
    width: 100%;
    border-right: 0;
    border-left: 0;
    border-bottom: 2px solid var(--ink);
  }
  .about-grid { grid-template-columns: 1fr; }
  .achievements-window { display: none; }
  .sticker { display: none; }
  .hero-title { font-size: 16px; }
  .task-item .task-label { display: none; }
  .task-item { padding: 1px 4px; }
}
