/* ===================================
   MOOD BOARD — Corkboard + Glitch
   =================================== */

/* ----- SIGNALS PAGE ----- */
.signals-content {
  display: flex;
  flex-direction: column;
}

/* ----- TV SIGNAL OVERLAY ----- */
.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.glitch-overlay.hidden {
  display: none;
}

/* Heavy TV static noise - primary layer */
.glitch-overlay::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 .3 .7 1'/%3E%3CfeFuncG type='discrete' tableValues='0 .3 .7 1'/%3E%3CfeFuncB type='discrete' tableValues='0 .3 .7 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
  animation: tv-static 0.03s steps(1) infinite;
}

@keyframes tv-static {
  0% { transform: translate(0, 0) scale(1.5); }
  25% { transform: translate(-5%, -3%) scale(1.6); }
  50% { transform: translate(3%, -5%) scale(1.4); }
  75% { transform: translate(-3%, 4%) scale(1.55); }
  100% { transform: translate(5%, 2%) scale(1.5); }
}

/* Secondary noise layer for more intensity */
.glitch-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1px,
      rgba(255, 255, 255, 0.03) 1px,
      rgba(255, 255, 255, 0.03) 2px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.02) 0px,
      rgba(0,0,0,0.02) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  z-index: 2;
  animation: scanline-flicker 0.08s steps(2) infinite;
}

@keyframes scanline-flicker {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

/* Secondary static noise layer */
.glitch-layer {
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='turbulence' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  animation: static-shift 0.04s steps(1) infinite;
}

@keyframes static-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-10%, 5%); }
  50% { transform: translate(5%, -10%); }
  75% { transform: translate(-5%, -5%); }
  100% { transform: translate(10%, 10%); }
}

/* Third noise layer - fine grain */
.glitch-layer-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 15 -7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.6;
  animation: grain-shift 0.02s steps(1) infinite;
  mix-blend-mode: screen;
}

@keyframes grain-shift {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2%); }
  100% { transform: translateY(1%); }
}

/* Noise blocks - random screen tearing effect */
.glitch-bars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.glitch-bar {
  position: absolute;
  left: 0;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 10%,
    rgba(200, 200, 200, 0.3) 20%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(150, 150, 150, 0.25) 80%,
    transparent 100%
  );
  animation: noise-block 0.1s steps(1) infinite;
}

.glitch-bar:nth-child(1) {
  height: 8px;
  top: 15%;
  animation: noise-block-1 0.08s steps(1) infinite;
}
.glitch-bar:nth-child(2) {
  height: 4px;
  top: 35%;
  animation: noise-block-2 0.12s steps(1) infinite;
}
.glitch-bar:nth-child(3) {
  height: 12px;
  top: 55%;
  animation: noise-block-3 0.1s steps(1) infinite;
}
.glitch-bar:nth-child(4) {
  height: 6px;
  top: 72%;
  animation: noise-block-4 0.09s steps(1) infinite;
}
.glitch-bar:nth-child(5) {
  height: 3px;
  top: 88%;
  animation: noise-block-5 0.11s steps(1) infinite;
}

@keyframes noise-block-1 {
  0%, 20% { transform: translateX(0); opacity: 0; }
  21%, 24% { transform: translateX(-20px); opacity: 1; }
  25%, 100% { transform: translateX(0); opacity: 0; }
}

@keyframes noise-block-2 {
  0%, 40% { transform: translateX(0); opacity: 0; }
  41%, 46% { transform: translateX(30px); opacity: 1; }
  47%, 100% { transform: translateX(0); opacity: 0; }
}

@keyframes noise-block-3 {
  0%, 10% { transform: translateX(0); opacity: 0; }
  11%, 18% { transform: translateX(-15px); opacity: 1; }
  19%, 60% { transform: translateX(0); opacity: 0; }
  61%, 65% { transform: translateX(25px); opacity: 1; }
  66%, 100% { transform: translateX(0); opacity: 0; }
}

@keyframes noise-block-4 {
  0%, 55% { transform: translateX(0); opacity: 0; }
  56%, 62% { transform: translateX(-35px); opacity: 1; }
  63%, 100% { transform: translateX(0); opacity: 0; }
}

@keyframes noise-block-5 {
  0%, 30% { transform: translateX(0); opacity: 0; }
  31%, 35% { transform: translateX(20px); opacity: 1; }
  36%, 75% { transform: translateX(0); opacity: 0; }
  76%, 82% { transform: translateX(-10px); opacity: 1; }
  83%, 100% { transform: translateX(0); opacity: 0; }
}

/* Signal cut off animation */
.glitch-overlay.signal-lost {
  animation: signal-cutoff 0.6s steps(4) forwards;
}

@keyframes signal-cutoff {
  0% {
    opacity: 1;
    transform: scaleY(1);
  }
  25% {
    opacity: 1;
    transform: scaleY(1);
    filter: brightness(1.5);
  }
  50% {
    opacity: 1;
    transform: scaleY(0.02);
    filter: brightness(2);
  }
  75% {
    opacity: 1;
    transform: scaleY(0.02);
    filter: brightness(3);
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
    filter: brightness(0);
  }
}

/* Bright line that appears during cutoff */
.tv-cutoff-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 20px #fff, 0 0 40px #fff, 0 0 60px #fff;
  transform: translateY(-50%);
  opacity: 0;
  z-index: 10;
}

.glitch-overlay.signal-lost .tv-cutoff-line {
  animation: cutoff-line 0.6s ease-out forwards;
}

@keyframes cutoff-line {
  0% { opacity: 0; }
  25% { opacity: 0; }
  50% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

/* ----- COUNTDOWN ----- */
.countdown-container {
  text-align: center;
  z-index: 2;
}

.countdown-number {
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 120px;
  font-weight: 200;
  color: #fff;
  line-height: 1;
  opacity: 0.9;
  animation: countdown-pulse 1s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.countdown-text {
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 14px;
  color: #00ff00;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-top: 1rem;
  text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

@keyframes countdown-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

.countdown-container.fade-out {
  animation: countdown-fade 0.5s ease-out forwards;
}

@keyframes countdown-fade {
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* ----- SIGNALS DISCLAIMER ----- */
.signals-disclaimer {
  margin: 0.5rem 0 1.5rem 0;
  padding: 1rem 1.5rem;
  background: #fff9e6;
  border-left: 3px solid #e6c200;
  font-size: 13px;
  color: #5d4e37;
}

/* ----- MOODBOARD LAUNCHER (Terminal Style) ----- */
.moodboard-launcher-terminal {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem 0;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 14px;
}

.moodboard-launcher-terminal:hover {
  background: #222;
  border-color: #444;
}

.launcher-prompt {
  color: #888;
}

.launcher-command {
  color: #4ec9b0;
  font-weight: 500;
}

.launcher-flag {
  color: #ce9178;
}

.launcher-cursor {
  color: #fff;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ----- HIDDEN BOARD (default state) ----- */
.signals-board.hidden-board {
  display: none;
  min-height: 0;
  max-height: 0;
}

.board-expanded .signals-board.hidden-board {
  display: block;
}

/* ----- SIGNALS BOARD ----- */
.signals-board {
  position: relative;
  min-height: 400px;
  max-height: 50vh;
  overflow-x: hidden;
  overflow-y: scroll;
  margin: 0.5rem 0;
  border: 1px solid #333;
  border-radius: 4px;
  background: #1a1a1a;
}

.signals-board::-webkit-scrollbar {
  width: 8px;
}

.signals-board::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.signals-board::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.signals-board::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* ----- SIGNALS ACTION BUTTONS ----- */
.signals-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem 0;
}

.signals-btn {
  padding: 0.5rem 1rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #888;
  font-family: "SF Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.signals-btn:hover {
  background: #222;
  color: #fff;
}

/* ----- EXPANDED/FULLSCREEN MODE ----- */
.board-expanded {
  overflow: hidden;
}

.board-expanded .video-bg,
.board-expanded .window-bar,
.board-expanded nav,
.board-expanded .terminal-line,
.board-expanded .signals-disclaimer,
.board-expanded .moodboard-launcher,
.board-expanded .moodboard-launcher-terminal,
.board-expanded footer {
  display: none !important;
}

.board-expanded .window {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  border: none;
  z-index: 1000;
  background: transparent;
}

.board-expanded .signals-content {
  height: 100vh;
  padding: 0 !important;
  background: transparent;
}

.board-expanded .signals-board {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-height: none;
  min-height: 100vh;
  border-radius: 0;
  border: none;
  margin: 0;
  overflow: hidden;
}

.board-expanded .signals-actions {
  display: none;
}

/* ----- UPDATE HISTORY ----- */

.update-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.update-modal.active {
  display: flex;
}

.update-modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  max-height: 60vh;
  overflow: hidden;
}

.update-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.update-modal-header h3 {
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #fff;
  margin: 0;
}

.update-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.update-modal-close:hover {
  color: #fff;
}

.update-modal-body {
  padding: 1rem 1.25rem;
  max-height: 50vh;
  overflow-y: auto;
}

.update-entry {
  padding: 0.75rem 0;
  border-bottom: 1px solid #222;
}

.update-entry:last-child {
  border-bottom: none;
}

.update-date {
  font-family: "SF Mono", monospace;
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.update-text {
  font-family: "SF Mono", monospace;
  font-size: 12px;
  color: #ccc;
  margin-top: 0.25rem;
  line-height: 1.5;
}


/* ----- ICON CONTENT MODAL ----- */
.icon-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.icon-modal.active {
  display: flex;
}

.icon-modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.icon-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-modal-header h3 {
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-modal-header .file-ext {
  color: #666;
  font-weight: 400;
}

.icon-modal-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.icon-modal-close:hover {
  color: #fff;
}

.icon-modal-body {
  padding: 1.25rem;
  max-height: 60vh;
  overflow-y: auto;
}

/* Image modal */
.icon-modal-body img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Text modal */
.icon-modal-body .text-content {
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #ccc;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Quote modal */
.icon-modal-body .quote-content {
  font-family: Georgia, serif;
  font-size: 18px;
  font-style: italic;
  color: #fff;
  line-height: 1.6;
  padding: 1rem 0;
}

.icon-modal-body .quote-author {
  font-family: "SF Mono", monospace;
  font-size: 12px;
  color: #666;
  margin-top: 1rem;
}

/* Link modal */
.icon-modal-body .link-content {
  text-align: center;
  padding: 1rem 0;
}

.icon-modal-body .link-content a {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #333;
  color: #fff;
  text-decoration: none;
  font-family: "SF Mono", monospace;
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.icon-modal-body .link-content a:hover {
  background: #444;
}

/* Info modal (for title) */
.info-modal-body {
  padding: 1.5rem;
}

.info-modal-body p {
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #ccc;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}

.info-modal-body ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.info-modal-body li {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  color: #888;
  background: #2a2a2a;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #333;
}

/* ----- DRAGGABLE ICON STATE ----- */
.desktop-icon.dragging {
  opacity: 0.8;
  z-index: 100;
  cursor: grabbing;
}

.desktop-icon {
  cursor: grab;
}

/* ----- LIGHTBOX (for images/videos) ----- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  cursor: default;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-content video {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-content iframe {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: 1rem;
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #888;
}

/* ----- POST-IT NOTE MODAL (for links) ----- */
.postit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.postit-modal.active {
  display: flex;
}

.postit-note {
  position: relative;
  width: 280px;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
  box-shadow:
    4px 4px 15px rgba(0,0,0,0.3),
    0 0 1px rgba(0,0,0,0.1);
  transform: rotate(-2deg);
  cursor: default;
}

.postit-tack {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
  border-radius: 50%;
  box-shadow:
    0 3px 6px rgba(0,0,0,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.3);
}

.postit-tack::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  background: linear-gradient(to bottom, #888, #555);
  border-radius: 0 0 2px 2px;
}

.postit-header {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8b7355;
  margin-bottom: 0.75rem;
}

.postit-body {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.5;
  color: #5d4e37;
  margin-bottom: 1.25rem;
}

.postit-link {
  display: inline-block;
  font-family: "SF Mono", monospace;
  font-size: 12px;
  color: #5d4e37;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.postit-link:hover {
  background: rgba(0,0,0,0.15);
}

/* ----- FOLDER BROWSER MODAL ----- */
.folder-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.folder-modal.active {
  display: flex;
}

.folder-modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.folder-modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
}

.folder-modal-header h3 {
  font-family: "SF Mono", monospace;
  font-size: 14px;
  color: #fff;
  margin: 0;
}

.folder-file-list {
  padding: 0.5rem;
  max-height: 55vh;
  overflow-y: auto;
}

.folder-file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.folder-file-item:hover {
  background: #2a2a2a;
}

.folder-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.folder-file-icon.img {
  background: #2a2a2a;
  border: 1px solid #444;
  overflow: hidden;
}

.folder-file-icon.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.folder-file-icon.text {
  background: linear-gradient(135deg, #fff9e6 0%, #ffe082 100%);
}

.folder-file-icon.link {
  background: linear-gradient(135deg, #e8f5e9 0%, #81c784 100%);
}

.folder-file-icon.video {
  background: linear-gradient(135deg, #e3f2fd 0%, #64b5f6 100%);
}

.folder-file-info {
  flex: 1;
  min-width: 0;
}

.folder-file-name {
  font-family: "SF Mono", monospace;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-file-type {
  font-family: "SF Mono", monospace;
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ----- DESKTOP STYLE BOARD ----- */
.signals-board.desktop-style {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 19px,
      rgba(255,255,255,0.03) 19px,
      rgba(255,255,255,0.03) 20px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 19px,
      rgba(255,255,255,0.03) 19px,
      rgba(255,255,255,0.03) 20px
    ),
    #1a1a1a;
  min-height: 500px;
}

.board-expanded .signals-board.desktop-style {
  background: transparent;
}

/* ----- DESKTOP VIDEO BACKGROUND ----- */
.desktop-video-bg {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.desktop-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Show video only in expanded mode */
.board-expanded .desktop-video-bg {
  display: block;
}

/* Keep grid pattern over video in expanded mode */
.board-expanded .desktop-icons {
  position: relative;
  z-index: 1;
}

/* ----- macOS MENU BAR ----- */
.mac-menubar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1002;
  padding: 0 12px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 13px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.board-expanded .mac-menubar {
  display: flex;
}

.menubar-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.apple-logo {
  font-size: 15px;
  opacity: 0.9;
}

.apple-logo::before {
  content: "";
}

.menu-item {
  opacity: 0.85;
  cursor: default;
  transition: opacity 0.15s ease;
}

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

.menu-item.active {
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}

.menu-item.clickable {
  cursor: pointer;
  opacity: 0.7;
}

.menu-item.clickable:hover {
  opacity: 1;
}

/* macOS Traffic Light Buttons */
.traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 14px;
}

.traffic-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  padding: 0;
  transition: all 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.traffic-btn.red {
  background: #ff5f57;
  cursor: pointer;
}

.traffic-btn.red:hover {
  background: #ff3b30;
}

.traffic-btn.yellow {
  background: #4a4a4a;
  cursor: default;
}

.traffic-btn.green {
  background: #4a4a4a;
  cursor: default;
}

/* Disco easter egg */
.disco-egg {
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
  margin-right: 12px;
}

.disco-egg:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* Disco mode overlay */
.disco-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: transparent;
  animation: disco-flash 0.5s ease infinite;
}

@keyframes disco-flash {
  0% { background: rgba(255, 0, 128, 0.15); }
  20% { background: rgba(0, 255, 255, 0.15); }
  40% { background: rgba(255, 255, 0, 0.15); }
  60% { background: rgba(128, 0, 255, 0.15); }
  80% { background: rgba(0, 255, 128, 0.15); }
  100% { background: rgba(255, 0, 128, 0.15); }
}

.disco-mode .desktop-icon {
  animation: disco-bounce 0.5s ease infinite alternate;
}

.disco-mode .desktop-icon:nth-child(odd) {
  animation-delay: 0.1s;
}

.disco-mode .desktop-icon:nth-child(even) {
  animation-delay: 0.2s;
}

@keyframes disco-bounce {
  from { transform: scale(1.15) rotate(-2deg); }
  to { transform: scale(1.25) rotate(2deg); }
}

.menubar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.menubar-time {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  opacity: 0.85;
}

.menubar-tz {
  font-size: 11px;
  opacity: 0.5;
}

/* Adjust desktop icons when menubar is visible */
.board-expanded .desktop-icons {
  padding-top: 40px;
}

.desktop-icons {
  position: relative;
  width: 100%;
  height: 600px;
  padding: 1rem;
}

/* Individual desktop icon */
.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  max-width: 80px;
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.08);
  transform: scale(1.05);
}

.desktop-icon:active {
  transform: scale(0.98);
}

/* Icon thumbnail container */
.icon-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: box-shadow 0.15s ease;
}

.desktop-icon:hover .icon-thumb {
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* Image thumbnail */
.icon-thumb.img-thumb {
  background: #2a2a2a;
  border: 2px solid rgba(255,255,255,0.1);
}

.icon-thumb.img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Folder icon */
.icon-thumb.folder-icon {
  background: linear-gradient(135deg, #5c9eff 0%, #3d7dd8 100%);
  font-size: 28px;
}

.icon-thumb.folder-icon.blue {
  background: linear-gradient(135deg, #64b5f6 0%, #1976d2 100%);
}

/* Note/text file icon */
.icon-thumb.note-icon {
  background: linear-gradient(135deg, #fff9e6 0%, #ffe082 100%);
  font-size: 24px;
}

/* Link/bookmark icon */
.icon-thumb.link-icon-box {
  background: linear-gradient(135deg, #e8f5e9 0%, #81c784 100%);
  font-size: 24px;
}

/* App icon */
.icon-thumb.app-icon {
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  border: 2px solid #fff;
  font-size: 24px;
  color: #fff;
}

.icon-thumb.app-icon.alt {
  background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
  border: 2px solid #333;
  color: #000;
}

/* Video icon */
.icon-thumb.video-icon {
  background: linear-gradient(135deg, #e3f2fd 0%, #64b5f6 100%);
  font-size: 20px;
  color: #1565c0;
}

/* Custom icon image */
.icon-thumb.custom-icon {
  background: transparent;
  border: none;
  box-shadow: none;
}

.icon-thumb.custom-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Icon label */
.icon-label {
  font-family: "SF Mono", monospace;
  font-size: 10px;
  color: #fff;
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0,0,0,0.3);
}

/* Expanded mode adjustments */
.board-expanded .desktop-icons {
  height: 100vh;
  width: 100vw;
}

.board-expanded .desktop-icon {
  transform: scale(1.15);
}

.board-expanded .desktop-icon:hover {
  transform: scale(1.25);
}

.board-expanded .desktop-icon.dragging {
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 600px) {
  .desktop-icons {
    height: 500px;
  }

  .icon-thumb {
    width: 48px;
    height: 48px;
  }

  .icon-label {
    font-size: 9px;
    max-width: 60px;
  }
}

/* ----- PINNED ITEMS (Base) ----- */
.pinned-item {
  position: absolute;
  cursor: grab;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
  user-select: none;
}

.pinned-item:hover {
  z-index: 50;
}

.pinned-item.dragging {
  cursor: grabbing;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  z-index: 1000 !important;
}

/* ----- PIN ----- */
.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #c92a2a);
  border-radius: 50%;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.3);
  z-index: 10;
}

.pin::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: linear-gradient(to bottom, #888, #666);
  border-radius: 0 0 1px 1px;
}

/* ----- TITLE CARD ----- */
.title-card {
  background: #2a2a2a;
  padding: 1.5rem 2rem;
  border: 1px solid #444;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.title-card h1 {
  font-family: "SF Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.title-card p {
  font-family: "SF Mono", monospace;
  font-size: 0.75rem;
  color: #888;
  margin: 0.25rem 0 0 0;
  text-transform: lowercase;
}

/* ----- STICKY NOTES ----- */
.note {
  width: 180px;
  padding: 1.25rem;
  font-family: "SF Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  box-shadow:
    2px 2px 8px rgba(0,0,0,0.1),
    0 0 1px rgba(0,0,0,0.1);
}

.note.yellow {
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
  color: #5d4e37;
}

.note.pink {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
  color: #5d3a4d;
}

.note.blue {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #2c4a5e;
}

.note.green {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e5a32;
}

.note p {
  margin: 0;
}

.note .note-author {
  display: block;
  margin-top: 0.75rem;
  font-size: 11px;
  opacity: 0.7;
}

.note ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1rem;
  list-style: disc;
}

.note li {
  margin: 0.25rem 0;
}

.note .big-text {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.note .small {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* ----- PHOTOS ----- */
.photo {
  background: #2a2a2a;
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  border: 1px solid #444;
}

.photo-placeholder {
  width: 200px;
  height: 150px;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #555;
  font-family: "SF Mono", monospace;
  font-size: 12px;
  border: 1px dashed #444;
}

.photo-placeholder.wide {
  width: 300px;
  height: 120px;
}

.photo-placeholder.square {
  width: 150px;
  height: 150px;
}

.photo-placeholder .photo-size {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* Actual pinned photos */
.pinned-photo {
  width: 200px;
  height: 150px;
  object-fit: cover;
  display: block;
}

.pinned-photo.wide {
  width: 300px;
  height: 120px;
}

.pinned-photo.square {
  width: 150px;
  height: 150px;
}

.photo-caption {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  color: #888;
  margin: 0.5rem 0 0 0;
  text-align: center;
}

/* Polaroid style */
.polaroid {
  padding: 8px 8px 40px 8px;
}

.polaroid-caption {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "SF Mono", monospace;
  font-size: 12px;
  color: #666;
}

/* ----- CLIPPINGS ----- */
.clipping {
  max-width: 250px;
  background: #2a2a2a;
  border: 1px solid #444;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.clipping-content {
  padding: 1rem;
  border-left: 3px solid #fff;
}

.clipping-source {
  display: block;
  font-family: "SF Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 0.5rem;
}

.clipping p {
  font-family: Georgia, serif;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
  margin: 0;
  font-style: italic;
}

/* ----- STICKERS ----- */
.sticker {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.sticker .pin {
  display: none;
}

.sticker-text {
  color: #0a0a0a;
  font-size: 1.5rem;
}

/* ----- VIDEO CLIPS ----- */
.video-clip {
  background: #2a2a2a;
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  border: 1px solid #444;
}

.video-wrapper {
  width: 280px;
  height: 160px;
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-wrapper.small {
  width: 180px;
  height: 100px;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  font-family: "SF Mono", monospace;
  font-size: 12px;
  gap: 0.5rem;
}

.play-icon {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  transition: all 0.2s ease;
}

.video-clip:hover .play-icon {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.video-caption {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  color: #666;
  margin: 0.5rem 0 0 0;
  text-align: center;
}

/* ----- WEB CLIPS / ARTICLE LINKS ----- */
.web-clip {
  background: #2a2a2a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  min-width: 220px;
  border: 1px solid #444;
}

.web-clip-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.web-clip:hover .web-clip-link {
  background: #333;
}

.web-clip-favicon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.web-clip-info {
  flex: 1;
  min-width: 0;
}

.web-clip-title {
  display: block;
  font-family: "SF Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.web-clip-url {
  display: block;
  font-family: "SF Mono", monospace;
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.web-clip-arrow {
  font-size: 14px;
  color: #555;
  transition: color 0.2s ease, transform 0.2s ease;
}

.web-clip:hover .web-clip-arrow {
  color: #fff;
  transform: translate(2px, -2px);
}

/* ----- MUSIC EMBED (Apple Music) ----- */
.music-embed {
  background: #2a2a2a;
  padding: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  border: 1px solid #444;
  border-radius: 12px;
}

.music-wrapper {
  width: 300px;
  border-radius: 10px;
  overflow: hidden;
}

.music-wrapper iframe {
  display: block;
}

.music-caption {
  font-family: "SF Mono", monospace;
  font-size: 11px;
  color: #666;
  margin: 0.5rem 0 0 0;
  text-align: center;
}

/* Items are visible by default now */
.pinned-item {
  opacity: 1;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .board-nav {
    top: 10px;
    flex-wrap: wrap;
    max-width: 90vw;
  }

  .board-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 10px;
  }
}
