/* ==========================================================================
   STYLE.CSS - COZY LOFI GAMER PORTFOLIO (100% NO SCROLLING, RESPONSIVE OS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RESET & SYSTEM TOKENS
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none; /* Emulate desktop OS feel */
}

:root {
  /* Dynamic Ambient Lighting variables, updated via JS classes */
  --ambient-color: rgba(147, 51, 234, 0.12); /* Purple default */
  --ambient-glow: rgba(147, 51, 234, 0.35);
  
  --os-bg: rgba(20, 20, 28, 0.75);
  --os-border: rgba(255, 255, 255, 0.12);
  --os-glow: rgba(0, 0, 0, 0.4);
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-pixel: 'VT323', monospace;
  
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* ABSOLUTELY NO SCROLLING */
  background-color: #0b0b0e;
  font-family: var(--font-display);
  color: #f5f5f7;
}

/* --------------------------------------------------------------------------
   1. OVERLAYS & SCENE DECORATIONS
   -------------------------------------------------------------------------- */
/* Ambient tint matching selected lamp mood */
.ambient-overlay {
  display: none !important;
}

/* Analog noise screen grid texture */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. MAIN ROOM CONTAINER & DECORATIONS
   -------------------------------------------------------------------------- */
#room-container {
  position: relative;
  width: 100vw;
  height: 100dvh;
  background-color: #0b0b0e;
  overflow: hidden;
  opacity: 0;
}

#room-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78dvh);
  height: max(56.25vw, 100dvh);
  background-image: url('/assets/images/bg_static.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
}

.room-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* No necesitamos media query de aspect ratio porque vmax se adapta siempre manteniendo el 1:1 cuadrado, llenando toda la pantalla y centrando la imagen. */

/* Interactive Desk Lamp Micro-glow hover (Positioned perfectly on left light in front-view) */
.interactive-desk-lamp {
  position: absolute;
  bottom: 23.206%;
  right: 12.834%;
  width: 10%;
  height: 15%;
  cursor: pointer;
  z-index: 4; /* Below #virtual-screen (z-index 10) */
  border-radius: 30px;
  transition: var(--transition-smooth);
}
.interactive-desk-lamp:hover {
  background: rgba(255, 220, 100, 0.04);
  box-shadow: 0 0 50px rgba(255, 220, 100, 0.1);
}

/* Animated Steaming Mug (Positioned perfectly on wood desk mug in front-view) */
.steaming-mug {
  position: absolute;
  bottom: 16.127%;
  left: 20.571%;
  width: 8%;
  height: 10%;
  z-index: 12;
  border-radius: 50%;
}
.steam {
  position: absolute;
  top: -12px;
  left: 45%;
  width: 12px;
  height: 25px;
  background: rgba(255, 255, 255, 0.25);
  filter: blur(2px);
  border-radius: 50%;
  animation: floatSteam 3s infinite linear;
}

@keyframes floatSteam {
  0% { transform: translateY(5px) scaleX(0.8); opacity: 0; }
  50% { transform: translateY(-5px) scaleX(1.2); opacity: 0.4; }
  100% { transform: translateY(-15px) scaleX(0.5); opacity: 0; }
}



/* --------------------------------------------------------------------------
   4. COZY LOFI OS SCREEN & DESKTOP SYSTEM
   -------------------------------------------------------------------------- */
#rain-canvas {
  display: none !important;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

#virtual-screen {
  position: absolute;
  top: 22.083%;
  left: 29.453%;
  width: 41.074%;
  height: 42.500%;
  background-color: #000;
  background-image: url('/assets/images/pc/img_wallpaper.webp');
  background-size: cover;
  background-position: center;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

/* Glass glare reflection across the screen to make it feel like a real glass monitor in 2K */
#virtual-screen::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 30%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.005) 70%, rgba(255, 255, 255, 0.01) 100%);
  z-index: 998;
  pointer-events: none;
}

/* Screen overlay grid scanlines for vintage CRT feeling */
#virtual-screen::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.03) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.007), rgba(0, 255, 0, 0.002), rgba(0, 0, 255, 0.007));
  z-index: 999;
  background-size: 100% 3px, 4px 100%;
  pointer-events: none;
}

/* Virtual OS Wallpaper layer */
.os-wallpaper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(31, 26, 48, 0.15) 0%, rgba(13, 11, 18, 0.35) 100%);
  z-index: 1;
  transition: var(--transition-smooth);
}


/* --------------------------------------------------------------------------
   5. DESKTOP INTERACTIVES (GRID & ICONS)
   -------------------------------------------------------------------------- */
.desktop-grid {
  position: relative;
  z-index: 5;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 1.25rem;
  width: 180px;
  height: calc(100% - 40px);
  align-content: flex-start;
}

.desktop-icon {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 10px 6px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5; /* Ensure they stack above os-wallpaper (z-index 1) when absolute and flattened */
}

.desktop-icon:hover {
  background: rgba(255, 110, 196, 0.08);
  border-color: rgba(255, 110, 196, 0.25);
  box-shadow: 0 8px 24px rgba(255, 110, 196, 0.15), inset 0 0 12px rgba(255, 255, 255, 0.05);
  transform: translateY(-3px) scale(1.02);
}

.desktop-icon:active {
  background: rgba(120, 115, 245, 0.15);
  transform: scale(0.95);
}

.icon-image {
  width: 58px;
  height: 58px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.75rem;
  border-radius: 16px;
  margin-bottom: 8px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.desktop-icon:hover .icon-image {
  transform: scale(1.12) rotate(8deg);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 20px rgba(255, 110, 196, 0.25);
}

/* Unique Icon Neon Glow Colors for Vaporwave/Holo feel */
.profile-icon i { color: #ff6ec4; filter: drop-shadow(0 0 6px rgba(255, 110, 196, 0.7)); }
.folder-icon i { color: #ffb300; filter: drop-shadow(0 0 6px rgba(255, 179, 0, 0.7)); }
.skills-icon i { color: #00f0ff; filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.7)); }
.tape-icon i { color: #00ffaa; filter: drop-shadow(0 0 6px rgba(0, 255, 170, 0.7)); }
.linkedin-icon i { color: #0077b5; filter: drop-shadow(0 0 6px rgba(0, 119, 181, 0.7)); }
.term-icon i { color: #39ff14; filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.7)); }

.right-desktop-column {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 5;
}

.icon-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9), 0 0 4px rgba(255, 110, 196, 0.2);
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  transition: all 0.3s ease;
}

.desktop-icon:hover .icon-label {
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(255, 110, 196, 0.8);
}

/* --------------------------------------------------------------------------
   6. OS WINDOW SYSTEM (GLASSMORPHISM)
   -------------------------------------------------------------------------- */
#window-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 40px); /* Leave room for taskbar */
  z-index: 10;
  pointer-events: none; /* Let clicks pass to desktop when no window active */
}

.os-window {
  position: absolute;
  top: 5%;
  left: 10%;
  width: 720px;
  max-width: 92%;
  height: 500px;
  max-height: 88%;
  background: var(--os-bg);
  border: 1px solid var(--os-border);
  box-shadow: 0 15px 35px var(--os-glow);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(14px);
  pointer-events: all;
  transition: none;
}

#win-profile,
#win-skills {
  width: 880px;
  max-width: 95%;
}

.win-header {
  height: 34px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--os-border);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move; /* Dragging vibe */
}

.win-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  order: 2;
}

.win-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.win-dot.close { background-color: #ef4444; }
.win-dot.minimize { background-color: #f59e0b; }
.win-dot.maximize { background-color: #22c55e; }

.win-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  order: 1;
}

.win-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

/* --------------------------------------------------------------------------
   6A. APP THEMES (NOTEPAD, EXPLORER, TERMINAL)
   -------------------------------------------------------------------------- */

/* Notepad Theme (About/Profile) */
.notepad-theme {
  background: #fdfdfb;
  color: #0b0b0f;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.notepad-header {
  background: #f3f3f2;
  border-bottom: 1px solid #e5e5e4;
  padding: 6px 1rem;
  font-size: 0.75rem;
  display: flex;
  gap: 1.25rem;
  color: #374151;
  font-weight: 500;
  font-family: var(--font-display);
}
.notepad-content {
  padding: 2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.65;
  color: #0b0b0f;
  flex-grow: 1;
  overflow-y: auto;
}
.notepad-content hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  margin: 1.5rem 0;
}
.avatar-container {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.pixel-avatar {
  width: 85px;
  height: 85px;
  background: #8b5cf6;
  color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.25rem;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-bio h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}
.avatar-bio .tagline {
  font-size: 0.85rem;
  font-weight: 500;
  color: #4b5563;
}
.bio-text {
  margin-bottom: 1.25rem;
  font-weight: 500; /* Hace que el texto sea más nítido y legible con las scanlines */
  color: #0f1016;
}


/* Explorer Theme (Projects Grid Folder) */
.explorer-content {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1.25rem;
  overflow-y: auto;
  align-content: start;
}
.project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: center;
  align-items: center;
  border-radius: 4px;
  padding: 6px;
  border: 1px solid transparent;
  transition: var(--transition-fast);
}
.project-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}
.project-thumb {
  width: 90px;
  height: 128px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
}
.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-fast);
}
.project-card:hover .project-overlay {
  opacity: 1;
}
.p-view-btn {
  font-size: 0.55rem;
  font-weight: bold;
  background: #fff;
  color: #000;
  padding: 4px 6px;
  border-radius: 2px;
}
.play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: rgba(139, 92, 246, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .play-indicator {
  background: rgba(168, 85, 247, 0.95);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 15px rgba(168, 85, 247, 0.4);
}
.project-card.video-card {
  grid-column: span 2;
  width: 100%;
}
.video-card .project-thumb {
  width: 180px;
  height: 101px;
  border-radius: 6px;
}
.video-card .project-info h4 {
  width: 180px;
}
.p-placeholder {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.project-info h4 {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  width: 100%;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
}
.project-info .detail-tag {
  display: inline-block !important;
  font-size: 0.62rem !important;
  line-height: 1.35;
  text-align: center;
  width: 100%;
  white-space: normal;
  box-sizing: border-box;
}
.project-info p {
  font-size: 0.6rem;
  opacity: 0.6;
  text-align: justify;
  line-height: 1.25;
  width: 100%;
}

/* App: Project Detail Window */
.detail-theme {
  display: flex;
  flex-direction: column;
}
.back-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: var(--transition-fast);
}
.back-btn:hover {
  color: #fff;
}
.detail-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  flex-grow: 1;
}
.detail-image {
  border-radius: 6px;
  border: 1px solid var(--os-border);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.2);
  min-height: 180px;
}
.detail-description {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.detail-description h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.detail-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  padding: 4px 8px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.detail-text-body {
  font-size: 0.8rem;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.pixel-btn {
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.75rem;
  color: #000;
  background: #fff;
  border: 1px solid #000;
  padding: 8px 16px;
  box-shadow: 3px 3px 0 #000;
  text-align: center;
  align-self: flex-start;
  transition: var(--transition-fast);
}
.pixel-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #000;
}


/* CV / PDF Viewer Theme */
.cv-theme {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 100%;
}
.cv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cv-filename {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cv-filename i { color: #e44; }
.cv-download-btn {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  background: rgba(139, 92, 246, 0.85);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.cv-download-btn:hover { background: rgba(109, 62, 216, 1); }
.cv-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
  display: block;
}

/* Skills/Stats Theme */
.skills-theme {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.skills-header h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #3b82f6;
  margin-bottom: 2px;
}
.skills-header p {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 1.25rem;
}
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skill-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.skill-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.9;
}
.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 5px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.skills-footer {
  margin-top: 1.5rem;
  display: flex;
  gap: 8px;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--os-border);
  padding: 4px 8px;
  border-radius: 12px;
  color: rgba(255,255,255,0.65);
}

/* Terminal Theme (Contact command console) */
.terminal-theme {
  background: #0d0d12;
  color: #22c55e;
  font-family: var(--font-mono);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.terminal-output {
  padding: 1.25rem;
  flex-grow: 1;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}
.terminal-input-row {
  display: flex;
  align-items: center;
  background: #08080a;
  border-top: 1px solid rgba(34, 197, 94, 0.15);
  padding: 8px 1.25rem;
}
.term-prompt {
  margin-right: 8px;
  font-size: 0.8rem;
  color: #3b82f6;
}
#term-input-field {
  flex-grow: 1;
  background: none;
  border: none;
  outline: none;
  color: #22c55e;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.term-highlight { color: #eab308; }
.term-error { color: #ef4444; }

/* --------------------------------------------------------------------------
   7. VIRTUAL SYSTEM TASKBAR & START MENU
   -------------------------------------------------------------------------- */
#virtual-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: none;
  width: 100%;
  height: 40px;
  background: rgba(10, 10, 18, 0.75);
  border: none;
  border-top: 1px solid transparent;
  background-image: linear-gradient(rgba(10, 10, 18, 0.75), rgba(10, 10, 18, 0.75)), linear-gradient(90deg, #ff6ec4, #7873f5, #00e0ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: blur(25px);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(120, 115, 245, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.taskbar-btn {
  background: linear-gradient(135deg, rgba(255, 110, 196, 0.2) 0%, rgba(120, 115, 245, 0.2) 100%);
  border: 1px solid rgba(255, 110, 196, 0.3);
  color: #fff;
  border-radius: 0;
  padding: 4px 14px;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 110, 196, 0.1);
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.taskbar-btn i {
  color: #ff6ec4;
  filter: drop-shadow(0 0 4px rgba(255, 110, 196, 0.8));
}

.taskbar-btn span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.taskbar-btn:hover {
  background: linear-gradient(135deg, rgba(255, 110, 196, 0.35) 0%, rgba(120, 115, 245, 0.35) 100%);
  border-color: rgba(255, 110, 196, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 110, 196, 0.2);
}

.taskbar-shortcuts {
  display: flex;
  gap: 6px;
  margin-left: 12px;
  margin-right: auto;
}

.shortcut-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255,255,255,0.7);
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 0;
  transition: all 0.2s ease;
}

.shortcut-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Active Taskbar Indicators */
.active-tasks {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}

.task-tab {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255, 255, 255, 0.65);
  padding: 3px 10px;
  border-radius: 0;
  font-size: 0.65rem;
  font-family: var(--font-display);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-tab.active {
  background: rgba(120, 115, 245, 0.12);
  border-color: rgba(120, 115, 245, 0.35);
  color: #a5b4fc;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(120, 115, 245, 0.1);
}

.task-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.tray-clock {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0;
  padding: 2px 10px;
  color: #fff;
}

/* START MENU */
#start-menu {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 290px;
  background: rgba(12, 12, 22, 0.8);
  border: none;
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  background-image: linear-gradient(rgba(12, 12, 22, 0.8), rgba(12, 12, 22, 0.8)), linear-gradient(135deg, #ff6ec4, #7873f5, #00e0ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(120, 115, 245, 0.15);
  border-radius: 0;
  z-index: 101;
  backdrop-filter: blur(30px);
  display: grid;
  grid-template-columns: 90px 1fr;
  overflow: hidden;
  transition: none;
}

.start-sidebar {
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 10px;
  align-items: center;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.user-profile i {
  font-size: 2rem;
  color: #ff6ec4;
  filter: drop-shadow(0 0 8px rgba(255, 110, 196, 0.6));
}

.user-profile span {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: bold;
  letter-spacing: 0.8px;
}

.start-links {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.start-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.start-item {
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.25s ease;
}

.start-item i {
  font-size: 0.95rem;
  transition: transform 0.25s ease;
}

.start-item[data-app="profile"] i { color: #ff6ec4; }
.start-item[data-app="projects"] i { color: #ffb300; }
.start-item[data-app="skills"] i { color: #00f0ff; }
.start-item[data-app="lofi-player"] i { color: #00ffaa; }
.start-item[data-app="terminal"] i { color: #39ff14; }

.start-item:hover {
  background: rgba(255, 110, 196, 0.08);
  color: #fff;
  transform: translateX(4px);
}

.start-item:hover i {
  transform: scale(1.15) rotate(5deg);
}

/* --------------------------------------------------------------------------
   8. MOBILE & TABLET RESPONSIVENESS (FULL SCREEN OS FOR PORTABLE DEVICES)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  #room-inner {
    transform: none;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background: none !important;
    box-shadow: none !important;
  }
  
  #virtual-screen {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    background-image: url('/assets/images/pc/img_wallpaper_mobile.webp') !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: #030305 !important;
  }

  .os-window:not([data-maximized="true"]) {
    width: 96%;
    left: 2% !important;
    top: 5% !important;
    height: 75%;
  }
  
  .desktop-grid, .right-desktop-column {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    pointer-events: none !important;
  }

  .desktop-icon {
    position: absolute !important;
    pointer-events: auto !important;
  }

  /* Top Row (aligned at top: 3.5%) */
  #icon-profile {
    left: 8% !important;
    top: 3.5% !important;
    right: auto !important;
    bottom: auto !important;
  }
  #icon-projects {
    left: 50% !important;
    top: 3.5% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
  }
  #icon-webs {
    right: 8% !important;
    top: 3.5% !important;
    left: auto !important;
    bottom: auto !important;
  }

  /* Middle Row (aligned at top: 55%) */
  #icon-linkedin {
    right: 8% !important;
    top: 55% !important;
    left: auto !important;
    bottom: auto !important;
  }

  /* Bottom Row (aligned at bottom: 55px) */
  #icon-lofi {
    left: 8% !important;
    bottom: 55px !important;
    top: auto !important;
    right: auto !important;
  }
  #icon-skills {
    left: 50% !important;
    bottom: 55px !important;
    top: auto !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
  #icon-terminal {
    right: 8% !important;
    bottom: 55px !important;
    top: auto !important;
    left: auto !important;
  }

  /* Prevent translation jump on hover for centered icons */
  #icon-projects:hover, #icon-skills:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.02) !important;
  }

  /* Hide minimize button on windows for mobile view */
  .win-dot.minimize {
    display: none !important;
  }

  /* Make close and maximize buttons larger on mobile for better usability */
  .win-dot {
    width: 15px !important;
    height: 15px !important;
  }
  /* Taskbar mobile responsiveness */
  #virtual-taskbar {
    padding: 0 8px !important;
  }
  .taskbar-tray {
    flex-shrink: 0 !important;
    gap: 6px !important;
  }
  .tray-clock {
    padding: 2px 6px !important;
    font-size: 0.62rem !important;
  }
  .tray-lang-btn {
    padding: 2px 5px !important;
    font-size: 0.68rem !important;
  }
  .taskbar-shortcuts {
    gap: 4px !important;
    margin-left: 6px !important;
  }
  .active-tasks {
    overflow: hidden;
    max-width: 35vw;
  }
}

@media (max-width: 480px) {
  .taskbar-shortcuts {
    display: none !important; /* Ocultar accesos rápidos duplicados en móviles estrechos */
  }
  .taskbar-btn span {
    display: none !important; /* Mantener solo el icono de Inicio en pantallas muy estrechas */
  }
  .taskbar-btn {
    padding: 4px 8px !important;
  }
  .taskbar-tray {
    gap: 4px !important;
  }
  .tray-clock {
    padding: 2px 4px !important;
  }
}

/* Compact desktop icons for shorter virtual screens (1080p, 1050p, etc.) */
@media (max-height: 1080px) {
  .desktop-grid {
    padding: 0.75rem !important;
    gap: 0.75rem !important;
  }
  .desktop-icon {
    padding: 6px 4px !important;
    gap: 4px !important;
  }
  .right-desktop-column {
    gap: 0.75rem !important;
    right: 0.75rem !important;
  }
}



/* ==========================================================================
   ADDITIONAL RETRO FEATURES: THEMES, MUSIC PLAYER, NOTEPAD & SYSTEM SETTINGS
   ========================================================================== */

/* 1. RETRO PALETTES & THEME SELCTORS */
body.theme-teal {
  --os-bg: rgba(10, 35, 35, 0.82);
  --os-border: rgba(0, 255, 255, 0.2);
  --os-glow: rgba(0, 30, 30, 0.6);
  --theme-accent: #008080;
  --theme-accent-rgb: 0, 128, 128;
  --theme-accent-glow: rgba(0, 128, 128, 0.4);
  --ambient-color: rgba(0, 128, 128, 0.12);
  --ambient-glow: rgba(0, 128, 128, 0.3);
}

body.theme-cyberpunk {
  --os-bg: rgba(22, 10, 28, 0.85);
  --os-border: rgba(255, 0, 127, 0.28);
  --os-glow: rgba(0, 0, 0, 0.65);
  --theme-accent: #ff007f;
  --theme-accent-rgb: 255, 0, 127;
  --theme-accent-glow: rgba(255, 0, 127, 0.45);
  --ambient-color: rgba(255, 0, 127, 0.12);
  --ambient-glow: rgba(255, 0, 127, 0.35);
}

body.theme-terminal {
  --os-bg: rgba(16, 12, 8, 0.88);
  --os-border: rgba(255, 176, 0, 0.25);
  --os-glow: rgba(0, 0, 0, 0.7);
  --theme-accent: #ffb000;
  --theme-accent-rgb: 255, 176, 0;
  --theme-accent-glow: rgba(255, 176, 0, 0.4);
  --ambient-color: rgba(255, 176, 0, 0.1);
  --ambient-glow: rgba(255, 176, 0, 0.3);
}

body.theme-dark {
  --os-bg: rgba(20, 20, 28, 0.82);
  --os-border: rgba(255, 255, 255, 0.1);
  --os-glow: rgba(0, 0, 0, 0.75);
  --theme-accent: #8b5cf6;
  --theme-accent-rgb: 139, 92, 246;
  --theme-accent-glow: rgba(139, 92, 246, 0.4);
  --ambient-color: rgba(139, 92, 246, 0.1);
  --ambient-glow: rgba(139, 92, 246, 0.3);
}

/* Custom interactive notes icons coloring */
.desktop-icon[data-app="notes"] .notes-icon { color: #f59e0b; }
.desktop-icon[data-app="music-player"] .disc-icon { color: #06b6d4; }
.desktop-icon[data-app="settings"] .config-icon { color: #10b981; }

body.theme-teal .desktop-icon:hover {
  background: rgba(0, 128, 128, 0.08);
  border-color: rgba(0, 128, 128, 0.25);
  box-shadow: 0 0 10px rgba(0, 128, 128, 0.2);
}
body.theme-cyberpunk .desktop-icon:hover {
  background: rgba(255, 0, 127, 0.08);
  border-color: rgba(255, 0, 127, 0.25);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.2);
}
body.theme-terminal .desktop-icon:hover {
  background: rgba(255, 176, 0, 0.08);
  border-color: rgba(255, 176, 0, 0.25);
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.2);
}
body.theme-dark .desktop-icon:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

/* 2. BLOC DE NOTAS NOTEPAD UPGRADE */
.notepad-textarea {
  width: 100%;
  height: 100%;
  flex-grow: 1;
  background: #fdfdfb;
  border: none;
  outline: none;
  padding: 1.25rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.6;
  color: #0b0b0f;
  resize: none;
}
.notes-menu-btn {
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  font-size: 0.7rem;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.notes-menu-btn:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.25);
  color: #000;
}
.notes-status-text {
  margin-left: auto;
  font-size: 0.68rem;
  color: #6b7280;
}

/* 3. REPRODUCTOR DE MÚSICA VISUAL DE CASSETTE */
.music-player-theme {
  background: #0f0f14;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  height: 100%;
  font-family: var(--font-display);
}
.cassette-container {
  width: 100%;
  max-width: 320px;
  background: #181820;
  border: 2px solid #282832;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  margin-bottom: 12px;
}
.cassette {
  background: #20202a;
  border: 2px solid #323242;
  border-radius: 6px;
  height: 120px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  overflow: hidden;
}
.cassette-label {
  background: #f3f4f6;
  color: #111;
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  text-align: center;
  z-index: 2;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.cassette-label .song-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cassette-label .song-timer {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 2px;
}
.cassette-reels {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 15px;
  z-index: 2;
}
.wheel {
  width: 36px;
  height: 36px;
  background: #0d0d12;
  border: 4px solid #4b5563;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: spinReel 4s infinite linear;
}
.wheel.paused {
  animation-play-state: paused;
}
.wheel-spokes {
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: 
    linear-gradient(0deg, transparent 45%, #4b5563 45%, #4b5563 55%, transparent 55%),
    linear-gradient(90deg, transparent 45%, #4b5563 45%, #4b5563 55%, transparent 55%),
    linear-gradient(45deg, transparent 45%, #4b5563 45%, #4b5563 55%, transparent 55%),
    linear-gradient(135deg, transparent 45%, #4b5563 45%, #4b5563 55%, transparent 55%);
}
@keyframes spinReel {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.music-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.music-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.music-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.05);
}
.music-btn.play-btn {
  background: var(--theme-accent);
  color: #fff;
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 0 10px var(--theme-accent-glow);
}
.music-btn.play-btn:hover {
  background: var(--theme-accent);
  box-shadow: 0 0 15px var(--theme-accent);
  transform: scale(1.1);
}

.track-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0,0,0,0.25);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  max-height: 100px;
  overflow-y: auto;
}
.track-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
}
.track-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.track-item.active {
  background: rgba(var(--theme-accent-rgb), 0.15);
  border: 1px solid rgba(var(--theme-accent-rgb), 0.3);
  color: var(--theme-accent);
  font-weight: bold;
}
.track-num {
  font-weight: 700;
  opacity: 0.8;
}

/* 4. SETTINGS THEME (WINDOWS 95 TAB CONTROL PANEL) */
.settings-theme {
  background: #f0f0eb;
  color: #111;
  padding: 12px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  height: 100%;
}
.settings-tabs {
  display: flex;
  border-bottom: 2px solid #ccc;
  gap: 4px;
  margin-bottom: 12px;
}
.settings-tabs .tab-btn {
  background: #e0e0da;
  border: 1px solid #aaa;
  border-bottom: none;
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px 4px 0 0;
  color: #555;
  transition: all 0.15s ease;
}
.settings-tabs .tab-btn:hover {
  background: #eaeaea;
  color: #111;
}
.settings-tabs .tab-btn.active {
  background: #f0f0eb;
  border-color: #ccc;
  color: #111;
  transform: translateY(2px);
  position: relative;
  z-index: 2;
  box-shadow: inset 0 2px 0 var(--theme-accent);
}
.settings-tab-content {
  display: none;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.settings-tab-content.active {
  display: flex;
}
.settings-tab-content h4 {
  font-size: 0.8rem;
  margin-bottom: 4px;
  font-weight: 700;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 3px;
  color: #111;
}
.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.theme-option {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.theme-option span {
  font-size: 0.7rem;
  font-weight: 700;
  color: #333;
}
.theme-option:hover {
  border-color: #999;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}
.theme-option.active {
  border: 2px solid var(--theme-accent);
  box-shadow: 0 0 8px var(--theme-accent-glow);
}
.theme-preview {
  width: 100%;
  height: 40px;
  border-radius: 2px;
  border: 1px solid #eee;
}
.theme-preview.teal-bg { background: radial-gradient(circle, #008080 30%, #004d4d 100%); }
.theme-preview.cyberpunk-bg { background: radial-gradient(circle, #ff007f 30%, #99004c 100%); }
.theme-preview.terminal-bg { background: radial-gradient(circle, #ffb000 30%, #885d00 100%); }
.theme-preview.dark-bg { background: radial-gradient(circle, #8b5cf6 30%, #4c1d95 100%); }

.settings-desc {
  font-size: 0.7rem;
  color: #666;
  line-height: 1.3;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #eee;
  padding: 6px 10px;
  border-radius: 6px;
}
.toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #333;
}

/* SWITCH TOGGLE BUTTON STYLE */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--theme-accent);
}
input:checked + .slider:before {
  transform: translateX(16px);
}

.test-sound-btn {
  background: var(--theme-accent);
  color: #fff;
  border: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 5px var(--theme-accent-glow);
  align-self: flex-start;
  transition: all 0.2s ease;
  margin-top: 6px;
}
.test-sound-btn:hover {
  background: var(--theme-accent);
  filter: brightness(1.1);
  box-shadow: 0 4px 10px var(--theme-accent-glow);
}

/* 5. CRT EFFECTS & SCREEN STATE DYNAMICS */
#virtual-screen:not(.crt-effects)::after {
  display: none !important;
}
#virtual-screen:not(.crt-effects) {
  animation: none !important;
}

/* CRT monitor turn-off collapsing animation */
#virtual-screen.monitor-off {
  animation: turnOffCRT 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  pointer-events: none;
}

@keyframes turnOffCRT {
  0% { transform: scale(1); opacity: 1; filter: brightness(1); }
  40% { transform: scaleY(0.005) scaleX(1.05); filter: brightness(3); opacity: 0.9; }
  100% { transform: scaleY(0.005) scaleX(0); filter: brightness(10); opacity: 0; display: none; }
}

/* Rain matrix rain overlay */
.matrix-mode {
  text-shadow: 0 0 5px #0f0, 0 0 10px #0f0;
}


/* ==========================================================================
   BIOS BOOT SEQUENCE & INTERACTIVE ROOM STYLES
   ========================================================================== */

#bios-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #030303;
  color: #39ff14; /* Toxic green */
  font-family: 'Share Tech Mono', 'VT323', monospace;
  z-index: 99999;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.5);
}

#bios-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 0.65rem;
}

.bios-cursor {
  display: inline-block;
  width: 10px;
  height: 1.1rem;
  background: #39ff14;
  animation: biosBlink 0.8s infinite steps(2, start);
  vertical-align: middle;
  margin-left: 2px;
}

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

#virtual-screen {
  z-index: 10;
}

.steaming-mug {
  z-index: 2 !important; /* Behind room-dark-overlay so it dims properly */
}

.room-dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 3, 12, 0.84);
  z-index: 3; /* Above rain-canvas (z-index 2), below virtual-screen (z-index 10) */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.lamp-off .room-dark-overlay {
  opacity: 1;
}

.interactive-window {
  position: absolute;
  top: 11.056%;
  left: 8.819%;
  width: 18%;
  height: 36%;
  cursor: pointer;
  z-index: 4; /* Below #virtual-screen (z-index 10) to avoid blocking */
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.interactive-window:hover {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.05);
}

.desktop-icon.dragging {
  transition: none !important;
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(255, 110, 196, 0.25);
  background: rgba(255, 110, 196, 0.12);
  border-color: rgba(255, 110, 196, 0.4);
}

/* --------------------------------------------------------------------------
   12. RETRO COOKIE CONSENT BANNER
   -------------------------------------------------------------------------- */
#cookie-banner {
  position: absolute;
  bottom: 50px; /* Aligned above the taskbar */
  right: 15px;
  width: 320px;
  max-width: calc(100% - 30px);
  background: var(--os-bg);
  border: 1.5px solid var(--os-border);
  box-shadow: 0 10px 30px var(--os-glow);
  border-radius: 6px;
  z-index: 999999; /* highest z-index */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(12px);
  font-family: var(--font-display);
}

.cookie-header {
  height: 28px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--os-border);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.5px;
}

.cookie-close {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.cookie-close:hover {
  color: #fff;
}

.cookie-body {
  padding: 12px 15px;
}

.cookie-body p {
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-btn {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.cookie-btn.accept {
  background: linear-gradient(135deg, rgba(255, 110, 196, 0.2) 0%, rgba(120, 115, 245, 0.2) 100%);
  border: 1px solid rgba(255, 110, 196, 0.3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 110, 196, 0.1);
}
.cookie-btn.accept:hover {
  background: linear-gradient(135deg, rgba(255, 110, 196, 0.35) 0%, rgba(120, 115, 245, 0.35) 100%);
  border-color: rgba(255, 110, 196, 0.45);
}

.cookie-btn.decline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}
.cookie-btn.decline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Mobile responsive adjustment */
@media (max-width: 991px) {
  #cookie-banner {
    bottom: 50px !important; /* Above mobile taskbar */
    right: 5% !important;
    left: 5% !important;
    width: 90% !important;
    max-width: 90% !important;
  }
}

/* Tablet landscape / Small screen height fix for desktop layout */
@media (min-width: 992px) and (max-height: 850px) {
  .desktop-icon {
    width: 56px !important; /* Reduced to fit perfectly in tight tablet monitors */
    padding: 3px !important;
  }
  .desktop-icon i {
    font-size: 1.1rem !important;
  }
  .desktop-icon img {
    width: 20px !important;
    height: 20px !important;
  }
  .desktop-icon span {
    font-size: 0.58rem !important;
  }
  .desktop-grid {
    width: calc(100% - 220px) !important; /* Leave more space on the right */
    gap: 1.5rem !important; /* Separated columns of icons beautifully */
    padding: 0.5rem !important;
  }
  .right-desktop-column {
    top: 0.3rem !important;
    right: 0.8rem !important; /* Give some margin from the right edge */
    transform: none !important; /* Cancel base translation */
    display: flex !important;
    flex-direction: row !important; /* Row instead of Column */
    gap: 1.25rem !important; /* Separated the icons from each other as requested */
    align-items: center !important; /* Center icons horizontally */
  }
}

/* ROTATION WARNING OVERLAY STYLE */
#rotation-warning {
  display: none;
}

/* Mobile landscape view adjustments: block rotation and show retro warning overlay */
@media (max-width: 991px) and (orientation: landscape) {
  #rotation-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #0b0b0e;
    z-index: 99999999; /* Highest possible stack */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    text-align: center;
    padding: 20px;
  }
  
  #rotation-warning .warning-box {
    background: rgba(255, 110, 196, 0.03);
    border: 1.5px solid var(--os-border);
    box-shadow: 0 0 25px var(--os-glow);
    padding: 30px;
    border-radius: 8px;
    max-width: 420px;
  }
  
  #rotation-warning i {
    font-size: 2.8rem;
    color: #ff6ec4;
    margin-bottom: 15px;
    animation: spinRotate 3s infinite linear;
    display: inline-block;
  }
  
  #rotation-warning h3 {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #00f0ff;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  #rotation-warning p {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
  }
}

@keyframes spinRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Clase de accesibilidad para SEO y Lectores de pantalla (Oculto visualmente) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}




