* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
}

#desktop {
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(
      135deg,
      #111827,
      #020617
    );
  position: relative;
  padding: 20px;
}

/* VIDEO WALLPAPER */

#desktop-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  filter: saturate(0.85) contrast(1.05);
}

#desktop-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.76) 0%, rgba(2, 6, 23, 0.34) 45%, rgba(2, 6, 23, 0.54) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.48), transparent 45%);
}

/* LIVING DESKTOP FISH */

#desktop-fish {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  padding: 8px;
  border-radius: 50%;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  will-change: transform;
  filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.45));
}

#desktop-fish:hover {
  background: rgba(255, 255, 255, 0.1);
}

#desktop-fish:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

#fish-emoji {
  display: block;
  transition: transform 180ms ease;
}

.fish-bubble {
  position: absolute;
  z-index: 2;
  color: rgba(191, 233, 255, 0.9);
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  animation: bubble-rise 1.6s ease-out forwards;
}

@keyframes bubble-rise {
  from {
    opacity: 0.9;
    transform: translateY(0) scale(0.7);
  }

  to {
    opacity: 0;
    transform: translateY(-65px) scale(1.25);
  }
}

/* DESKTOP ICONS */

.desktop-icon {
  position: absolute;
  z-index: 2;
  width: 90px;
  padding: 7px 4px;
  text-align: center;
  color: white;
  cursor: grab;
  margin: 0;
  user-select: none;
  touch-action: none;
  border: 1px solid transparent;
  border-radius: 10px;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

.desktop-icon:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.desktop-icon.is-dragging {
  z-index: 5;
  cursor: grabbing;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.icon {
  font-size: 40px;
}

.desktop-icon p {
  margin: 5px;
}

/* WINDOWS */

.window {
  width: 420px;
  max-width: calc(100vw - 24px);
  min-height: 250px;
  position: absolute;
  top: 120px;
  left: 250px;
  background: rgba(20, 20, 30, 0.95);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.5);
  display: none;
  overflow: hidden;
}

/* TITLE BAR */

.title-bar {
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(255,255,255,0.08);
  cursor: move;
  user-select: none;
}

.title-bar button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.title-bar button:hover {
  background: #ef4444;
}

/* WINDOW CONTENT */

.window-content {
  padding: 20px;
}

.window-content img {
  width: 100%;
  border-radius: 10px;
}

/* ME? FOLDER */

.me-window {
  width: 500px;
  min-height: 350px;
}

.folder-content {
  min-height: 305px;
  padding: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #11131c;
  background-size: 22px 22px;
}

.folder-path {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-family: "Courier New", monospace;
  font-size: 13px;
  letter-spacing: 1px;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px;
}

.folder-file {
  min-height: 145px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: white;
  font: inherit;
  line-height: 1.35;
  cursor: pointer;
}

.folder-file:hover,
.folder-file:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.folder-file:active {
  transform: scale(0.98);
}

.file-icon {
  font-size: 54px;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.32));
}

.game-file:hover .file-icon {
  animation: game-pulse 800ms ease-in-out infinite alternate;
}

.photo-thumbnail {
  width: 74px;
  height: 56px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  background: #06182a;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.38);
}

.photo-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-file:hover .photo-thumbnail {
  transform: rotate(-2deg) scale(1.05);
}

@keyframes game-pulse {
  to {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px rgba(99, 255, 170, 0.65));
  }
}

/* PHOTO VIEWER */

.photo-window {
  width: 720px;
  max-height: calc(100vh - 100px);
}

.training-photo-window,
.portrait-photo-window {
  width: 500px;
}

.photo-viewer {
  padding: 14px;
  background:
    radial-gradient(circle at top, rgba(20, 98, 138, 0.2), transparent 45%),
    #070b12;
}

.photo-viewer figure {
  margin: 0;
}

.photo-viewer img {
  width: 100%;
  max-height: calc(100vh - 205px);
  display: block;
  object-fit: contain;
  background: #020912;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
}

.photo-viewer figcaption {
  padding: 12px 5px 4px;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Courier New", monospace;
  font-size: 14px;
  text-align: center;
}

/* ME? STICKY NOTE */

.intro-note-window {
  width: 390px;
  min-height: 430px;
}

.note-area {
  min-height: 385px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 55%),
    #11131c;
  perspective: 1000px;
}

.sticky-note {
  width: 290px;
  height: 290px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #211b08;
  font: inherit;
  perspective: 1000px;
}

.sticky-note:focus-visible {
  outline: 3px solid #f8e36e;
  outline-offset: 8px;
  border-radius: 4px;
}

.sticky-note-inner {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1.15);
}

.sticky-note.is-flipped .sticky-note-inner {
  transform: rotateY(180deg);
}

.note-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 34px 28px 26px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), transparent 30%),
    #f8df69;
  box-shadow:
    0 24px 35px rgba(0, 0, 0, 0.35),
    inset 0 -18px 30px rgba(184, 137, 20, 0.12);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-family: "Marker Felt", "Comic Sans MS", cursive;
  text-align: center;
  transform: rotate(-1.5deg);
}

.note-face::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-style: solid;
  border-width: 0 0 28px 28px;
  border-color: transparent transparent #d4b941 transparent;
  filter: drop-shadow(-3px -3px 4px rgba(0, 0, 0, 0.08));
}

.note-pin {
  position: absolute;
  top: 17px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #df5147;
  box-shadow: 0 3px 0 #992d2a;
}

.note-front strong {
  font-size: 42px;
  letter-spacing: 3px;
}

.note-arrow {
  font-family: Arial, sans-serif;
  font-size: 52px;
  line-height: 0.8;
}

.note-face small {
  font-size: 14px;
  opacity: 0.65;
}

.note-back {
  gap: 14px;
  transform: rotateY(180deg) rotate(1.5deg);
}

.note-back strong {
  font-size: 25px;
  letter-spacing: 1px;
}

.note-back span:not(.note-pin) {
  font-size: 19px;
  line-height: 1.45;
}

.note-back b {
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.35);
  border-bottom: 2px solid #211b08;
  letter-spacing: 2px;
}

.note-back em {
  font-size: 22px;
  font-style: normal;
  font-weight: bold;
  text-decoration: underline;
}

/* MIND READER GAME */

.game-window {
  width: 500px;
  min-height: 390px;
}

.game-area {
  min-height: 345px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(56, 255, 150, 0.09), transparent 62%),
    #080d0b;
}

.game-card {
  position: relative;
  width: 100%;
  min-height: 285px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  overflow: hidden;
  border: 1px solid rgba(93, 255, 164, 0.35);
  border-radius: 10px;
  background: rgba(3, 14, 9, 0.82);
  box-shadow: inset 0 0 30px rgba(50, 255, 140, 0.07);
  text-align: center;
}

.game-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 13px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(93, 255, 164, 0.2);
  color: rgba(128, 255, 181, 0.72);
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 1px;
}

.game-card h2 {
  max-width: 390px;
  margin: 24px 0 0;
  color: #73ffad;
  font-family: "Courier New", monospace;
  font-size: 26px;
  line-height: 1.2;
  text-shadow: 0 0 15px rgba(76, 255, 153, 0.42);
}

.game-card p {
  max-width: 390px;
  min-height: 52px;
  margin: 0;
  color: rgba(233, 255, 242, 0.9);
  font-size: 18px;
  line-height: 1.5;
}

.game-next {
  min-width: 170px;
  padding: 12px 18px;
  border: 1px solid #5dffa4;
  border-radius: 7px;
  background: rgba(63, 255, 147, 0.1);
  color: #8affbb;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
}

.game-next:hover,
.game-next:focus-visible {
  background: #5dffa4;
  color: #041009;
  outline: none;
  box-shadow: 0 0 20px rgba(93, 255, 164, 0.42);
}

.game-scanline {
  position: absolute;
  inset: -100% 0 auto;
  height: 80px;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(80, 255, 155, 0.06), transparent);
  animation: scan 4s linear infinite;
}

.game-card.is-reveal {
  animation: reveal-glitch 350ms steps(2, end) 2;
  border-color: rgba(93, 255, 164, 0.85);
}

.game-card.is-reveal h2 {
  font-size: 38px;
}

@keyframes scan {
  to {
    transform: translateY(520px);
  }
}

@keyframes reveal-glitch {
  25% { transform: translateX(4px); }
  50% { transform: translateX(-5px); filter: hue-rotate(60deg); }
  75% { transform: translateX(2px); }
}

/* VISITOR MESSAGE FILE */

.message-window {
  width: 540px;
  min-height: 535px;
}

.message-area {
  max-height: calc(100vh - 135px);
  overflow-y: auto;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #0d1018;
  background-size: 100% 28px;
}

.visitor-form,
.message-ready {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.visitor-form[hidden],
.message-ready[hidden] {
  display: none;
}

.message-intro h2,
.message-ready h2 {
  margin: 3px 0 6px;
  font-size: 24px;
}

.message-intro p,
.message-ready p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.5;
}

.message-status {
  color: #7dffb3;
  font-family: "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 1.4px;
}

.message-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.message-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.message-fields label:last-child {
  grid-column: 1 / -1;
}

.message-fields small {
  color: rgba(255, 255, 255, 0.4);
  font-weight: normal;
}

.message-fields input,
.message-fields textarea,
#messagePreview {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: white;
  font: inherit;
}

.message-fields input {
  height: 42px;
  padding: 0 12px;
}

.message-fields textarea {
  min-height: 100px;
  padding: 11px 12px;
  resize: vertical;
}

.message-fields input:focus,
.message-fields textarea:focus,
#messagePreview:focus {
  border-color: #6affaa;
  outline: none;
  box-shadow: 0 0 0 3px rgba(106, 255, 170, 0.1);
}

.transmit-button,
.message-secondary {
  min-height: 43px;
  padding: 10px 17px;
  border-radius: 7px;
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 0.8px;
  cursor: pointer;
}

.transmit-button {
  border: 1px solid #6affaa;
  background: rgba(106, 255, 170, 0.12);
  color: #89ffba;
}

.transmit-button:hover,
.transmit-button:focus-visible {
  background: #6affaa;
  color: #07110b;
  outline: none;
}

.message-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
}

#messagePreview {
  min-height: 155px;
  padding: 12px;
  resize: vertical;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.message-actions {
  display: flex;
  gap: 10px;
}

.copy-status {
  min-height: 20px;
  color: #7dffb3 !important;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.form-submit-status {
  min-height: 18px;
  margin: -8px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.form-submit-status.is-error {
  color: #ff8b8b;
}

.transmit-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

/* VISITOR WALL */

.visitor-wall-window {
  width: 650px;
  max-height: calc(100vh - 110px);
}

.visitor-wall-content {
  max-height: calc(100vh - 155px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 90% 0%, rgba(34, 211, 238, 0.12), transparent 34%),
    #0b1018;
}

.visitor-wall-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-wall-kicker {
  color: #67e8f9;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
}

.visitor-wall-header h2 {
  margin: 7px 0 5px;
  font-size: 26px;
}

.visitor-wall-header p {
  max-width: 400px;
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.5;
}

.visitor-counter {
  min-width: 105px;
  padding: 13px;
  text-align: center;
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 12px;
}

.visitor-counter strong,
.visitor-counter span {
  display: block;
  font-family: "Courier New", monospace;
}

.visitor-counter strong {
  color: #a5f3fc;
  font-size: 30px;
}

.visitor-counter span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.visitor-sync-notice {
  margin: 14px 0;
  padding: 8px 10px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0ea5e9;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.4px;
}

.visitor-sync-notice.is-local {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
}

.visitor-wall-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.5fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 20px;
}

.visitor-wall-form label span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.visitor-wall-form label small {
  color: rgba(255, 255, 255, 0.38);
}

.visitor-wall-form input,
.visitor-wall-form textarea {
  width: 100%;
  height: 42px;
  padding: 10px 11px;
  resize: none;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  outline: none;
  font: inherit;
}

.visitor-wall-form input:focus,
.visitor-wall-form textarea:focus {
  border-color: rgba(103, 232, 249, 0.7);
  box-shadow: 0 0 0 2px rgba(103, 232, 249, 0.1);
}

.visitor-wall-form .transmit-button {
  min-width: 130px;
  height: 42px;
  padding: 0 14px;
}

.visitor-wall-privacy,
.visitor-wall-form .form-submit-status {
  grid-column: 1 / -1;
  margin: 0;
}

.visitor-wall-privacy {
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}

.visitor-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.visitor-entry {
  min-height: 88px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
}

.visitor-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visitor-entry strong {
  color: #a5f3fc;
  font-family: "Courier New", monospace;
}

.visitor-entry time {
  color: rgba(255, 255, 255, 0.32);
  font-size: 10px;
}

.visitor-entry p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.visitor-wall-empty {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.42);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

@media (max-width: 560px) {
  .message-fields {
    grid-template-columns: 1fr;
  }

  .message-fields label:last-child {
    grid-column: auto;
  }

  .visitor-wall-header {
    flex-direction: column;
  }

  .visitor-wall-form,
  .visitor-entries {
    grid-template-columns: 1fr;
  }

  .visitor-wall-form .transmit-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sticky-note-inner,
  .game-scanline,
  .game-card.is-reveal,
  .game-file:hover .file-icon {
    transition: none;
    animation: none;
  }

  .fish-bubble {
    animation-duration: 0.01ms;
  }
}

/* TASKBAR */

#taskbar {
  position: absolute;
  z-index: 100;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: 55px;
  min-width: 300px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  color: white;
}

#start {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: black;
  border-radius: 10px;
  font-weight: bold;
}
