/* ===== VEZPYRE // PS2-STYLE MENU ENVIRONMENT ===== */
/* PS2 OSDSYS Faithful Recreation — BLACK + GREEN LIME ONLY */


:root {
  --vezpyre-app-width: 100vw;
  --vezpyre-app-height: 100vh;
  --vezpyre-crt-blend-mode: overlay;
  --vezpyre-crt-filter:
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.40) 0px,
      rgba(0, 0, 0, 0.40) 1px,
      transparent 1px,
      transparent 4px),
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.40) 0px,
      rgba(0, 0, 0, 0.40) 2px,
      transparent 2px,
      transparent 4px),
    repeating-linear-gradient(90deg,
      rgba(255, 0, 0, 0.15) 0px,
      rgba(255, 0, 0, 0.15) 2px,
      rgba(0, 255, 0, 0.15) 2px,
      rgba(0, 255, 0, 0.15) 3px,
      rgba(0, 0, 255, 0.15) 3px,
      rgba(0, 0, 255, 0.15) 4px,
      transparent 4px,
      transparent 4px);
  --vezpyre-crt-filter-mobile:
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.35) 0px,
      rgba(0, 0, 0, 0.35) 0.75px,
      transparent 0.75px,
      transparent 2.75px),
    repeating-linear-gradient(0deg,
      rgba(0, 0, 0, 0.35) 0px,
      rgba(0, 0, 0, 0.35) 1.5px,
      transparent 1.5px,
      transparent 2.75px),
    repeating-linear-gradient(90deg,
      rgba(255, 0, 0, 0.12) 0px,
      rgba(255, 0, 0, 0.12) 1.35px,
      rgba(0, 255, 0, 0.12) 1.35px,
      rgba(0, 255, 0, 0.12) 2.05px,
      rgba(0, 0, 255, 0.12) 2.05px,
      rgba(0, 0, 255, 0.12) 2.75px,
      transparent 2.75px,
      transparent 2.75px);
  --vezpyre-crt-vignette: radial-gradient(ellipse at center,
      transparent 60%,
      rgba(0, 0, 0, 0.6) 100%);
}

/* ===== BOOT SEQUENCE ===== */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  background: #000;
  z-index: 100000;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.boot-screen.fade-out {
  opacity: 0;
}

/* ===== DESKTOP / PS2 ENVIRONMENT ===== */
html, body {
  overflow: hidden !important;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  min-height: var(--vezpyre-app-height, 100vh);
}

/* VIDEO DI SFONDO */
#bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  min-width: 100vw;
  min-height: var(--vezpyre-app-height, 100vh);
  max-width: none;
  max-height: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  display: block;
  object-fit: cover;
}

/* CANVAS THREE.JS — sopra al video, sfondo trasparente */
/* will-change: transform forces a separate GPU compositing layer,
   workaround for Nvidia Blackwell (50-series) WebGL color shift */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 1;
}

#site-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: var(--vezpyre-crt-filter), var(--vezpyre-crt-vignette), #fff; 
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

html.site-transition-white #site-transition-overlay {
  background: var(--vezpyre-crt-filter), var(--vezpyre-crt-vignette), #fff;
}

html.site-transition-white,
html.site-transition-white body {
  background: #fff !important;
}

html.site-transition-white #site-transition-overlay {
  opacity: 1;
  pointer-events: all;
}

/* Eventuali contenuti HTML sopra al canvas */
#ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 2;
  pointer-events: none;
}

#gpu-compositing-fix {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(0.5px);
  -webkit-backdrop-filter: blur(0.5px);
  opacity: 0.01;
}

html.webkit-browser.device-tablet #gpu-compositing-fix,
html.webkit-browser.device-phone #gpu-compositing-fix {
  display: none;
}

/* EFFETTO CRT */
#crt {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: var(--vezpyre-crt-blend-mode);
  background: var(--vezpyre-crt-filter);
}

#crt::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--vezpyre-crt-vignette);
}

/* ===== DESKTOP ICONS ===== */
.ac-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.ac-orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---- Desktop icon tiles ---- */
.ac-icon {
  position: absolute;
  width: 100px;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  transition: transform 0.3s ease, opacity 0.35s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ac-icon .ac-icon-inner {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgb(55, 55, 55) 0%, rgb(30, 30, 30) 10%, rgb(15, 15, 15) 100%);
  border: 1px solid rgb(56, 56, 56);
  border-top-color: rgb(111, 111, 111);
  border-bottom-color: rgb(40, 40, 40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.ac-icon .ac-icon-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Label below icon */
.ac-icon-label {
  display: block;
  margin-top: 20px;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 15px;
  color: rgba(255, 255, 255, 100);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 1);
  white-space: nowrap;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {

  /* Hover state */
  .ac-icon:hover .ac-icon-inner {
    border-color: var(--accent, #C8F40F);
    background: linear-gradient(180deg, rgb(55, 55, 55) 0%, rgb(30, 30, 30) 10%, rgb(15, 15, 15) 100%);
    border: 1px solid rgb(56, 56, 56);
    border-top-color: rgb(111, 111, 111);
    border-bottom-color: rgb(40, 40, 40);
    box-shadow: 0 0 20px rgba(200, 244, 15, 0.2), 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
  }

  .ac-icon:hover .ac-icon-label {
    color: var(--accent, #C8F40F);
  }
}

/* Dragging state */
.ac-icon.ac-dragging {
  cursor: grabbing;
  z-index: 30 !important;
}

.ac-icon.ac-dragging .ac-icon-inner {
  border-color: var(--accent, #C8F40F);
  box-shadow: 0 0 30px rgba(200, 244, 15, 0.3), 0 8px 24px rgba(0, 0, 0, 0.6);
  transform: scale(1.08);
}

/* Keyboard focus */
.ac-icon.ac-kb-focus .ac-icon-inner {
  border-color: var(--accent, #C8F40F);
  box-shadow: 0 0 0 2px rgba(200, 244, 15, 0.4), 0 0 20px rgba(200, 244, 15, 0.2);
}

.ac-icon.ac-kb-focus .ac-icon-label {
  color: var(--accent, #C8F40F);
}

/* Entrance animation */
.ac-icon.ac-entering {
  animation: acIconEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes acIconEnter {
  0% {
    filter: drop-shadow(0 0 20px rgba(200, 244, 15, 0.6)) blur(4px);
  }

  60% {
    filter: drop-shadow(0 0 12px rgba(200, 244, 15, 0.3)) blur(0px);
  }

  100% {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)) blur(0px);
  }
}

/* Hide icons when window is open */
.ac-icon.ac-hiding {
  opacity: 0 !important;
  transform: scale(0.8) !important;
  pointer-events: none !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show icons returning */
.ac-icon.ac-showing {
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Context menu (reset positions) ---- */
.ac-context-menu {
  position: fixed;
  z-index: 200;
  background: rgba(5, 5, 5, 0.96);
  border: 1px solid rgba(200, 244, 15, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 1px rgba(200, 244, 15, 0.1);
  overflow: hidden;
  animation: ctxMenuOpen 0.15s ease-out;
}

@keyframes ctxMenuOpen {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.ac-context-item {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  text-align: left;
  white-space: nowrap;
  transition: all 0.2s;
}

.ac-context-item:hover {
  background: rgba(200, 244, 15, 0.08);
  color: var(--accent, #C8F40F);
}

/* ===== PS2 NAVIGATION BAR (Bottom) ===== */
.ps2-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 44px;
  z-index: 9999;
  display: flex;
  align-items: center;
  padding: 2px 24px;
  gap: 4px;
  background: linear-gradient(180deg, rgb(55, 55, 55) 0%, rgb(30, 30, 30) 10%, rgb(15, 15, 15) 100%);
  border-top: 1px solid rgb(111, 111, 111);
  border-bottom: 1px solid rgb(40, 40, 40);
  border-left: none;
  border-right: none;
  transition: opacity 0.6s ease 0.6s;
}

.desktop-ready .ps2-navbar {
  opacity: 1;
}

.nav-logo-svg {
  width: 100px;
  max-width: 100%;
  height: auto;
  display: block;
  flex-shrink: 0;
  fill: var(--text);
  color: var(--text);
  transition: fill 0.2s, color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
  .start-btn:hover .nav-logo-svg {
    fill: var(--accent);
    color: var(--accent);
  }
}

.start-btn.active .nav-logo-svg {
  fill: var(--accent);
  color: var(--accent);
}

.ps2-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  cursor: default;
}

.ps2-nav-symbol {
  font-size: 13px;
  color: var(--accent, #C8F40F);
  line-height: 1;
  text-shadow: 0 0 4px rgba(200, 244, 15, 0.2);
}

.ps2-nav-text {
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ps2-nav-spacer {
  flex: 1;
}

/* Vertical divider in taskbar */
.ps2-nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(200, 244, 15, 0.2);
  margin: 0 15px;
}

/* Taskbar window buttons (minimized windows appear here) */
.taskbar-windows {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.taskbar-windows::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.taskbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 14px;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: linear-gradient(180deg, rgba(55, 55, 55, 0.9) 0%, rgba(30, 30, 30, 0.9) 10%, rgba(15, 15, 15, 0.9) 100%);
  border: 1px solid rgb(57, 57, 57);
  border-top-color: rgb(111, 111, 111);
  border-bottom-color: rgb(40, 40, 40);
  border-radius: 3px;
  padding: 0 8px;
  height: 28px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.5);
  flex: 1 1 auto;
  max-width: 160px;
}

.taskbar-btn-icon {
  width: 14px;
  height: 14px;
  filter: brightness(1);
}

.taskbar-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-btn:hover {
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.9) 0%, rgba(40, 40, 40, 0.9) 10%, rgba(20, 20, 20, 0.9) 100%);
  color: var(--accent, #C8F40F);
}

.taskbar-btn.active {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--accent, #C8F40F);
}

.ps2-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ps2-sound-toggle {
  background: linear-gradient(180deg, rgba(55, 55, 55, 0.9) 0%, rgba(30, 30, 30, 0.9) 10%, rgba(15, 15, 15, 0.9) 100%);
  border: 1px solid rgba(57, 57, 57, 100);
  border-top-color: rgba(111, 111, 111, 100);
  border-bottom-color: rgba(40, 40, 40, 100);
  border-radius: 3px;
  color: var(--accent, #C8F40F);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  opacity: 1.0;
}

.ps2-sound-toggle:hover {
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.9) 0%, rgba(40, 40, 40, 0.9) 10%, rgba(20, 20, 20, 0.9) 100%);
  text-shadow: 0 0 8px rgba(200, 244, 15, 0.3);
}

.ps2-sound-toggle.muted {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--text);
}

.ps2-lang {
  display: flex;
}

.ps2-lang a {
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
  padding: 6px 6px;
  background: linear-gradient(180deg, rgba(55, 55, 55, 0.9) 0%, rgba(30, 30, 30, 0.9) 10%, rgba(15, 15, 15, 0.9) 100%);
  border: 1px solid rgba(57, 57, 57, 100);
  border-top-color: rgba(111, 111, 111, 100);
  border-bottom-color: rgba(40, 40, 40, 100);
  border-radius: 3px;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.ps2-lang a:hover {
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.9) 0%, rgba(40, 40, 40, 0.9) 10%, rgba(20, 20, 20, 0.9) 100%);
  text-shadow: 0 0 8px rgba(200, 244, 15, 0.3);
  color: var(--accent, #C8F40F);
}

.ps2-lang a.active-lang {
  color: var(--accent, #C8F40F);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===== OS WINDOWS ===== */
.os-window {
  position: absolute;
  min-width: 320px;
  min-height: 200px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 5, 5, 0.94), rgba(5, 5, 5, 0.94)) padding-box,
    linear-gradient(180deg, rgba(111, 111, 111) 0%, rgba(55, 55, 55) 5%, rgba(30, 30, 30) 100%) border-box;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), 0 0 1px rgba(200, 244, 15, 0.1);
  animation: windowOpen 0.3s ease-out;
  opacity: 1;
  transform: scale(1);
  transition: box-shadow 0.2s;
}

.os-window.focused {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8), 0 0 2px rgba(200, 244, 15, 0.15);
}

.os-window.window-closing {
  animation: windowClose 0.2s ease-in forwards;
}

@keyframes windowOpen {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes windowClose {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
}

.os-window.minimizing {
  animation: windowMinimize 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes windowMinimize {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(0.6) translateY(200px);
    opacity: 0;
  }
}

/* Window Title Bar */
.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(55, 55, 55, 0.9) 0%, rgba(30, 30, 30, 0.9) 10%, rgba(15, 15, 15, 0.9) 100%);
  border-top-color: rgba(111, 111, 111, 100);
  border-bottom-color: rgba(40, 40, 40, 100);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.window-titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  min-width: 0;
  flex: 1;
  margin-right: 12px;
}

.window-titlebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  filter: brightness(0.9);
}

.window-title,
.window-titlebar-text {
  font-family: 'Michroma', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent, #C8F40F);
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.window-ctrl-btn {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(55, 55, 55, 0.9) 0%, rgba(30, 30, 30, 0.9) 10%, rgba(15, 15, 15, 0.9) 100%);
  border: 1px solid rgba(57, 57, 57, 100);
  border-top-color: rgba(111, 111, 111, 100);
  border-bottom-color: rgba(40, 40, 40, 100);
  color: rgba(200, 244, 15, 0.5);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  line-height: 1;
}

.window-ctrl-btn.close-btn {
  background: linear-gradient(180deg, rgba(110, 55, 55, 0.9) 0%, rgba(60, 30, 30, 0.9) 10%, rgba(30, 15, 15, 0.9) 100%);
  border: 1px solid rgba(57, 57, 57, 100);
  border-top-color: rgba(111, 111, 111, 100);
  border-bottom-color: rgba(40, 40, 40, 100);
  color: rgba(200, 244, 15, 0.5);
}

.window-ctrl-btn:hover {
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.9) 0%, rgba(40, 40, 40, 0.9) 10%, rgba(20, 20, 20, 0.9) 100%);
  text-shadow: 0 0 8px rgba(200, 244, 15, 0.3);
  color: var(--accent, #C8F40F);
}

.window-ctrl-btn.close-btn:hover {
  background: linear-gradient(180deg, rgba(125, 70, 70, 0.9) 0%, rgba(70, 40, 40, 0.9) 10%, rgba(35, 20, 20, 0.9) 100%);
  text-shadow: 0 0 8px rgba(200, 15, 15, 0.3);
  color: #ff4444;
}

/* Window Body */
.window-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  color: var(--text, #e0e0e0);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Window resize handle */
.window-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  z-index: 10;
}

.window-resize-handle::after {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--accent-dim);
  border-bottom: 2px solid var(--accent-dim);
  opacity: 0.5
}

.os-window.maximized .window-resize-handle {
  display: none !important;
}

/* Window body scrollbar */
.window-body::-webkit-scrollbar {
  width: 5px;
}

.window-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

.window-body::-webkit-scrollbar-thumb {
  background: rgba(200, 244, 15, 0.12);
  border-radius: 3px;
}

.window-body::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 244, 15, 0.25);
}

.os-window.scanlines::before {
  position: absolute;
  z-index: 5;
}

/* ===== CRT POWER-ON ===== */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 99998;
  pointer-events: none;
}

.crt-overlay.power-on {
  animation: crtPowerOn 1s ease-out forwards;
}

@keyframes crtPowerOn {
  0% {
    background: #fff;
    opacity: 1;
  }

  20% {
    background: #C8F40F;
    opacity: 0.5;
  }

  40% {
    opacity: 0.2;
  }

  100% {
    opacity: 0;
  }
}

/* ===== START BUTTON + MENU ===== */
.start-btn-wrap {
  position: relative;
  flex-shrink: 0;
  min-width: max-content;
}

.start-btn {
  background: linear-gradient(180deg, rgb(55, 55, 55) 0%, rgb(30, 30, 30) 10%, rgb(15, 15, 15) 100%);
  border: 1px solid rgb(56, 56, 56);
  border-top-color: rgb(111, 111, 111);
  border-bottom-color: rgb(40, 40, 40);
  border-radius: 3px;
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  height: 28px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: max-content;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.nav-logo-img {
  height: 15px;
  width: auto;
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .start-btn:hover {
    background: linear-gradient(180deg, rgb(70, 70, 70) 0%, rgb(40, 40, 40) 10%, rgb(20, 20, 20) 100%);
    text-shadow: 0 0 8px rgba(200, 244, 15, 0.3);
  }
}

.start-btn.active {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.start-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  
  /* Bordo sfumato in stile OS-Window */
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 5, 5, 0.94), rgba(5, 5, 5, 0.94)) padding-box,
    linear-gradient(180deg, rgba(111, 111, 111) 0%, rgba(55, 55, 55) 5%, rgba(30, 30, 30) 100%) border-box;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7), 0 0 1px rgba(200, 244, 15, 0.1);
  display: none;
  z-index: 100;
}

.start-menu.open {
  display: block;
  animation: startMenuOpen 0.2s ease-out;
}

@keyframes startMenuOpen {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.start-menu-header {
  padding: 10px 16px;
  background: linear-gradient(180deg, rgb(55, 55, 55) 0%, rgb(30, 30, 30) 10%, rgb(15, 15, 15) 100%);
  font-family: 'Michroma', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  color: rgba(200, 244, 15, 255);
  text-transform: uppercase;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 255);
  letter-spacing: 1px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.start-menu-item:hover {
  background: rgba(200, 244, 15, 0.06);
  color: var(--accent, #C8F40F);
}

.start-menu-item .start-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.7;
  color: var(--accent, #C8F40F);
}

.start-menu-item .start-menu-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.start-menu-item .start-menu-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(89%) sepia(45%) saturate(1000%) hue-rotate(22deg) brightness(104%) contrast(97%);
}

.start-menu-item:hover .start-menu-icon {
  opacity: 1;
}

.start-menu-sep {
  height: 1px;
  /* Linea interiore con sfumatura trasparente ai lati */
  background: linear-gradient(90deg, transparent, rgba(111, 111, 111, 1), transparent);
  margin: 2px 0;
}

/* ===== STILE PERSONALIZZATO SHUTDOWN ===== */
/* Colore rosso dell'Iconcina SVG sempre attivo (l'effetto spento/acceso è gestito dall'opacità standard degli altri tasti!) */
/* Usa filter: none e color esatto per evitare le imprecisioni matematiche dei filtri CSS sul testo */
#shutdown-btn .start-menu-icon {
  color: #ff4444;
}

#shutdown-btn .start-menu-icon img {
  filter: brightness(0) saturate(100%) invert(35%) sepia(100%) saturate(3000%) hue-rotate(340deg) brightness(95%) contrast(100%);
}

/* Sfondo e Testo sul momento del Passaggio Mouse */
#shutdown-btn:hover {
  background: rgba(255, 68, 68, 0.08);
  color: #ff4444;
}

/* ===== CRT SHUTDOWN ===== */
.crt-shutdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: var(--vezpyre-app-height, 100vh);
  z-index: 999999;
  pointer-events: all;
  background: #000;
  opacity: 0;
}

.crt-shutdown.active {
  animation: crtShutdown 0.8s ease-in forwards;
}

@keyframes crtShutdown {
  0% {
    opacity: 0;
    background: #000;
  }

  10% {
    opacity: 1;
    background: #fff;
  }

  30% {
    opacity: 1;
    background: #fff;
    clip-path: inset(0 0 0 0);
  }

  60% {
    opacity: 1;
    background: #fff;
    clip-path: inset(48% 0 48% 0);
  }

  80% {
    opacity: 1;
    background: #C8F40F;
    clip-path: inset(49.5% 10% 49.5% 10%);
  }

  100% {
    opacity: 0;
    background: #000;
    clip-path: inset(50% 50% 50% 50%);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  /* Desktop icons — mobile adjustments */
  html:not(.device-tablet) .ac-icon {
    width: 76px;
    overflow: visible;
  }

  html:not(.device-tablet) .ac-icon .ac-icon-inner {
    width: 76px;
    height: 76px;
    min-height: 76px;
    padding: 14px;
    /* backdrop-filter can cause invisible elements on some mobile browsers */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html:not(.device-tablet) .ac-icon-label {
    font-size: 12px;
    letter-spacing: 1px;
  }

  /* CRT — pixel più piccoli su mobile per simulare la densità del desktop */
  html:not(.device-tablet) #crt {
    background: var(--vezpyre-crt-filter-mobile);
  }

  /* Transition overlay — match mobile CRT density for seamless splash→site switch */
  html:not(.device-tablet).site-transition-white #site-transition-overlay {
    background: var(--vezpyre-crt-filter-mobile), var(--vezpyre-crt-vignette), #fff;
  }

  html:not(.device-tablet) .window-titlebar {
    height: 45px;
  }

  html:not(.device-tablet) .window-title,
  html:not(.device-tablet) .window-titlebar-text {
    font-size: 15px;
    letter-spacing: 3px;
  }

  /* Window control buttons — larger touch targets */
  html:not(.device-tablet) .window-ctrl-btn {
    width: 25px;
    height: 25px;
    font-size: 16px;
  }

  html:not(.device-tablet) .ps2-navbar {
    height: 38px;
    padding: 0 8px;
  }

  html:not(.device-tablet) .ps2-nav-text {
    display: none;
  }

  html:not(.device-tablet) .ps2-nav-symbol {
    font-size: 15px;
  }

  html:not(.device-tablet) .os-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(var(--vezpyre-app-height, 100vh) - 38px) !important;
    max-height: calc(var(--vezpyre-app-height, 100vh) - 38px) !important;
    min-width: unset !important;
    min-height: unset !important;
    overflow: hidden;
  }

  html:not(.device-tablet) #os-window-credits {
    height: 200px !important;
    max-height: calc(var(--vezpyre-app-height, 100vh) - 38px) !important;
    top: calc((var(--vezpyre-app-height, 100vh) / 2) - 140px) !important;
    /* Optional: add some shadow to separate from desktop */
    box-shadow: 0 0 20px rgba(0,0,0,0.8) !important;
  }

  html:not(.device-tablet) #os-window-credits .window-body {
    overflow: hidden !important;
  }

  html:not(.device-tablet) .window-resize-handle {
    display: none;
  }
}

/* ===== BLINK ===== */
@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* ===== POST CONTENT (inline blog posts in OSWindows) ===== */
.window-body .post-content h1,
.window-body .post-content h2,
.window-body .post-content h3,
.window-body .post-content h4 {
  font-family: 'Michroma', sans-serif;
  color: var(--accent, #C8F40F);
  letter-spacing: 2px;
  margin: 25px 0 10px;
}

.window-body .post-content h2 {
  font-size: 16px;
}

.window-body .post-content h3 {
  font-size: 14px;
}

.window-body .post-content p {
  margin: 10px 0;
}

.window-body .post-content a {
  color: var(--accent, #C8F40F);
}

.window-body .post-content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border, #2a2a2c);
  margin: 15px 0;
}

.window-body .post-content pre,
.window-body .post-content code {
  background: #0a0a0a;
  border: 1px solid var(--border, #2a2a2c);
  padding: 2px 6px;
  font-family: var(--font-body, 'Share Tech Mono'), monospace;
  font-size: 13px;
  color: var(--accent, #C8F40F);
}

.window-body .post-content pre {
  padding: 15px;
  overflow-x: auto;
  margin: 15px 0;
}

.window-body .post-content blockquote {
  border-left: 3px solid var(--accent, #C8F40F);
  padding: 10px 20px;
  margin: 15px 0;
  background: rgba(200, 244, 15, 0.03);
}

.window-body .post-content ul,
.window-body .post-content ol {
  padding-left: 25px;
  margin: 10px 0;
}

.window-body .post-content li {
  margin: 5px 0;
}

/* ===== UTILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== MOBILE EXCEPTIONS ===== */
@media (max-width: 768px) {

  /* Hide minimize and maximize buttons on mobile windows */
  html:not(.device-tablet) .window-ctrl-btn.min-btn,
  html:not(.device-tablet) .window-ctrl-btn.max-btn {
    display: none !important;
  }

  /* Hide taskbar dividers on mobile to save space */
  html:not(.device-tablet) .ps2-nav-divider {
    display: none !important;
  }

  /* Hide minimized windows list in taskbar on mobile */
  html:not(.device-tablet) .taskbar-windows {
    display: none !important;
  }

  /* Space out Start button and controls (push controls to the right) */
  html:not(.device-tablet) .ps2-navbar {
    justify-content: space-between !important;
  }
}
