/* ─────────────────────────────────────────
   SILENCE — SS25
   style.css
   ───────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: #080808;
  overflow: hidden;
  height: 100vh;
}

/* ─── DESKTOP ─── */
#desk {
  width: 100vw;
  height: 100vh;

  background: url("assets/bg.png") center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

/* overlay scuro cinematografico */
#desk::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
}

#wall {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
#wall .bg-s {
  /* ✏️ Modifica la dimensione della S di sfondo */
  font-size: clamp(120px, 25vw, 220px);
  font-weight: 700;
  color: #111;
  letter-spacing: -8px;
}

/* ─── MENU BAR ─── */
#mbar {
  position: absolute; top: 0; left: 0; right: 0; height: 28px;
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 0.5px solid #1e1e1e;
  z-index: 200;
}
#mbar .left { display: flex; align-items: center; gap: 20px; }
.mbrand { font-weight: 600; font-size: 13px; color: #fff; letter-spacing: .1em; }
.mitem { font-size: 12px; color: #aaa; cursor: pointer; transition: color .15s; }
.mitem:hover { color: #fff; }
#clock { font-size: 12px; color: #aaa; }

/* ─── WINDOWS ─── */
.win {
  position: absolute;
  background: #0f0f0f;
  border: 0.5px solid #252525;
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 24px 64px rgba(0,0,0,.9);
  min-width: 300px;
}
.wh {
  height: 36px; background: #161616;
  display: flex; align-items: center; padding: 0 14px; gap: 8px;
  cursor: grab; border-bottom: 0.5px solid #222; flex-shrink: 0;
}
.wh:active { cursor: grabbing; }
.dot { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.dr { background: #ff5f57; }
.dy { background: #febc2e; }
.dg { background: #28c840; }
.wtitle {
  flex: 1; text-align: center; font-size: 12px;
  color: #555; font-weight: 400; letter-spacing: .05em;
}
.wb { padding: 20px; color: #e0e0e0; overflow: auto; }

/* ─── DESKTOP ICONS ─── */
.ico {
  position: absolute;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  cursor: pointer; padding: 8px;
  border-radius: 8px;
  transition: background .15s;
  width: 80px;
}
.ico:hover { background: rgba(255,255,255,.06); }
.ico:active { background: rgba(255,255,255,.1); }
.ibox {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.ico span { font-size: 11px; color: #ccc; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.8); }

/* ─── DOCK ─── */
#dock {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255,255,255,.1);
  border-radius: 18px; padding: 8px 14px;
  display: flex; align-items: center; gap: 6px;
  z-index: 200;
}
.di {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; cursor: pointer;
  transition: transform .15s; position: relative;
}
.di:hover { transform: scale(1.25) translateY(-6px); }
.da {
  position: absolute; bottom: -4px; width: 4px; height: 4px;
  border-radius: 50%; background: #fff;
  left: 50%; transform: translateX(-50%);
}

/* ─── NOTIFICATION ─── */
.notif {
  position: fixed; top: 38px; right: 12px;
  background: #1a1a1a; border: 0.5px solid #333;
  border-radius: 12px; padding: 12px 16px;
  font-size: 12px; color: #e0e0e0; width: 260px;
  z-index: 500; opacity: 0;
  transition: opacity .3s; pointer-events: none;
}
.ntitle { font-weight: 600; font-size: 12px; color: #fff; margin-bottom: 3px; }

/* ─── PROGRESS HUD ─── */
#hud {
  position: fixed; top: 40px; right: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  z-index: 150;
}
.hud-label { font-size: 10px; color: #333; letter-spacing: .15em; }
#hud-steps { display: flex; gap: 5px; }
.p-step {
  width: 28px; height: 4px; border-radius: 2px;
  background: #222; transition: background .4s;
}
.p-step.done { background: #fff; }
.p-step.active { background: #555; }

/* ─── INPUTS / BUTTONS ─── */
input[type=text] {
  background: #0f0f0f; border: 0.5px solid #333;
  border-radius: 6px; padding: 7px 12px;
  font-size: 12px; color: #fff; outline: none;
  user-select: text; transition: border-color .15s;
}
input[type=text]:focus { border-color: #555; }

.btn {
  background: #fff; color: #000; border: none;
  border-radius: 6px; padding: 7px 16px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; letter-spacing: .05em;
}
.btn:hover { background: #ddd; }

.btn-ghost {
  background: transparent; color: #aaa;
  border: 0.5px solid #333; border-radius: 6px;
  padding: 7px 16px; font-size: 11px;
  cursor: pointer; letter-spacing: .05em;
}
.btn-ghost:hover { color: #fff; border-color: #555; }

/* ─── TERMINAL ─── */
.term-body {
  background: #000;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px; color: #00ff41;
  padding: 16px; min-height: 200px;
}
.term-line { margin-bottom: 4px; }
.term-prompt { color: #fff; }
input.term-in {
  background: transparent; border: none; outline: none;
  color: #00ff41;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px; width: calc(100% - 160px);
  user-select: text;
}

/* ─── PUZZLE TILES ─── */
#puzzle-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin: 16px 0;
}
.tile {
  height: 64px; background: #1a1a1a;
  border: 0.5px solid #2a2a2a; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; transition: background .2s;
}
.tile:hover { background: #222; }
.tile.selected { border: 1px solid #fff; background: #222; }
.tile.wrong { border-color: #ff5f57; animation: shake .3s; }
.tile.correct { border-color: #28c840; background: #0a1a0a; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ─── MAZE ─── */
#maze-canvas {
  border: 0.5px solid #222; border-radius: 8px;
  cursor: crosshair; display: block;
}

/* ─── SECRET PRODUCT ─── */
.secret-reveal { text-align: center; padding: 10px 0; }

.final-code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 20px; font-weight: 600;
  color: #fff; letter-spacing: .3em;
  background: #1a1a1a; border: 0.5px solid #333;
  border-radius: 8px; padding: 14px 20px;
  margin: 16px auto; display: inline-block;
}
.secret-product {
  background: #161616; border: 0.5px solid #2a2a2a;
  border-radius: 10px; padding: 16px; margin-top: 16px;
  text-align: left; display: flex; gap: 14px; align-items: center;
}
.sp-thumb {
  width: 64px; height: 64px; background: #fff;
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 28px; flex-shrink: 0;
}

/* ─── ERROR MESSAGES ─── */
.err-msg {
  font-size: 11px; color: #ff5f57;
  margin-top: 8px; display: none;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.file {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background .15s;
}

.file:hover {
  background: rgba(255,255,255,.06);
}

.file-icon {
  font-size: 28px;
}

.file span {
  font-size: 11px;
  color: #aaa;
  text-align: center;
}

.hidden-img {
  display: none;
}
.ico {
  position: absolute;
  cursor: grab;
}

.ico:active {
  cursor: grabbing;
}
#calendar-box {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  color: #ddd;
  font-size: 12px;
}

.cal-header {
  display:flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color:#fff;
  font-weight:600;
}

.cal-grid {
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap:6px;
}

.cal-day {
  width: 30px;
  height: 30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  background:#151515;
  border:0.5px solid #222;
  font-size:11px;
  color:#aaa;
}

.cal-day.today {
  background:#fff;
  color:#000;
  font-weight:600;
}