/**
 * Vetroal Reality 92 - Main Page Styles
 * Requires: vetroal-base.css
 */

/* ===== PAGE SETUP ===== */
html, body { height: 100%; overflow: hidden; }
body { background: #008080; font-family: 'Times New Roman', Times, Georgia, serif; font-size: 12px; }
input, textarea { -webkit-user-select: text; user-select: text; }

/* ===== DESKTOP ===== */
.desktop {
  position: absolute;
  inset: 0;
  bottom: 28px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--space-sm);
}

.desktop-icon {
  width: 70px;
  padding: var(--space-sm);
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  touch-action: none;
  -webkit-touch-callout: none;
}

.desktop-icon:hover {
  background: rgba(0, 0, 128, 0.3);
  border: 1px dotted #fff;
}

.desktop-icon.drop-target {
  background: rgba(255, 0, 0, 0.3);
  border: 2px dashed var(--gold-primary);
  transform: scale(1.1);
}

.desktop-icon.selected {
  background: var(--win95-blue);
  border: 1px dotted #fff;
}

.desktop-icon.selected .icon-label { color: #fff; }

.icon-img {
  width: 32px;
  height: 32px;
  margin: 0 auto var(--space-sm);
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  pointer-events: none;
}

.icon-img * { pointer-events: none; }

.icon-label {
  color: #fff;
  text-shadow: 1px 1px #000;
  font-size: 11px;
  word-wrap: break-word;
  line-height: 1.2;
  pointer-events: none;
}

/* ===== TASKBAR ===== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--win95-bg);
  border-top: 2px solid var(--win95-light);
  display: flex;
  align-items: center;
  padding: 2px var(--space-sm);
  gap: 2px;
  z-index: 999;
}

.start-btn {
  height: 22px;
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-weight: bold;
  font-size: 11px;
}

.start-btn:active, .start-btn.active {
  border: 2px inset var(--win95-dark);
}

.start-logo { font-size: 14px; }

.quick-launch {
  display: flex;
  gap: 2px;
  padding: 0 var(--space-sm);
  border-left: 1px solid var(--win95-dark);
  border-right: 1px solid var(--win95-light);
  margin-left: 2px;
}

.quick-btn {
  width: 20px;
  height: 20px;
  background: var(--win95-bg);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

.quick-btn:hover { border: 1px outset var(--win95-light); }

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 2px;
  min-width: 0;
}

.taskbar-item {
  height: 22px;
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  min-width: 80px;
  max-width: 160px;
  font-size: 11px;
}

.taskbar-item:active, .taskbar-item.active {
  border: 2px inset var(--win95-dark);
  background: #b0b0b0;
}

.taskbar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-sm);
  border-left: 1px solid var(--win95-dark);
  margin-left: auto;
}

.tray-icon { font-size: 12px; cursor: pointer; }

.tray-icon.secret-flower {
  opacity: 0.8;
  font-size: 14px;
  transition: var(--transition-normal);
  color: var(--pink-primary);
}

.tray-icon.secret-flower:hover {
  opacity: 1;
  transform: scale(1.3);
  filter: drop-shadow(0 0 4px var(--pink-primary));
}

.clock {
  border: 1px inset var(--win95-dark);
  padding: 2px var(--space-md);
  font-size: 11px;
  background: var(--win95-bg);
}

/* ===== START MENU ===== */
.start-menu {
  position: fixed;
  bottom: 28px;
  left: 0;
  width: 180px;
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  display: none;
  z-index: 1000;
}

.start-menu.open { display: block; }

.start-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(var(--win95-blue), var(--win95-cyan));
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  padding: var(--space-md) var(--space-sm);
  letter-spacing: 1px;
}

.start-items { margin-left: 24px; }

.start-item {
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
}

.start-item:hover {
  background: var(--win95-blue);
  color: #fff;
}

.start-item-icon { font-size: 16px; width: 20px; text-align: center; }

.start-separator {
  height: 1px;
  background: var(--win95-dark);
  margin: 2px 24px;
  border-bottom: 1px solid var(--win95-light);
}

.start-search {
  display: flex;
  gap: var(--space-sm);
  padding: 6px var(--space-md);
}

.start-search input {
  flex: 1;
  border: 2px inset var(--win95-dark);
  padding: 2px var(--space-sm);
  font-size: 11px;
  font-family: inherit;
}

.start-search button {
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: 0 6px;
  cursor: pointer;
}

#searchPreview { max-height: 120px; overflow: auto; }

.search-preview-item {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

.search-preview-item:hover {
  background: var(--win95-blue);
  color: #fff;
}

.search-preview-item:hover * { color: #fff !important; }

/* ===== WINDOWS ===== */
.window {
  position: absolute;
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  min-width: 200px;
  min-height: 100px;
  display: none;
  z-index: 100;
}

.window.open { display: block; }

.window-titlebar {
  background: linear-gradient(90deg, var(--win95-blue), var(--win95-cyan));
  color: #fff;
  font-weight: bold;
  padding: 2px var(--space-sm);
  display: flex;
  align-items: center;
  cursor: move;
  touch-action: none;
}

.window-titlebar span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-btns { display: flex; gap: 2px; }

.window-btns button {
  width: 16px;
  height: 14px;
  background: var(--win95-bg);
  border: 1px outset var(--win95-light);
  font-size: 10px;
  cursor: pointer;
  padding: 0;
}

.window-btns button:active { border: 1px inset var(--win95-dark); }

.window-content {
  padding: var(--space-md);
  overflow: auto;
  max-height: calc(100vh - 100px);
}

.window.inactive .window-titlebar {
  background: linear-gradient(90deg, var(--win95-dark), #a0a0a0);
}

/* Folder view */
.folder-view {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md);
}

.folder-item {
  width: 70px;
  text-align: center;
  padding: var(--space-sm);
  cursor: pointer;
}

.folder-item:hover {
  background: var(--win95-blue);
  color: #fff;
}

.folder-item-icon { font-size: 28px; margin-bottom: var(--space-sm); }

/* Error dialog */
.error-icon { font-size: 32px; margin-right: 15px; }
.error-content { display: flex; align-items: flex-start; padding: 15px; }
.error-text { flex: 1; }

.error-btns {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  padding: 10px;
  border-top: 1px solid var(--win95-dark);
}

.error-btns button {
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: var(--space-sm) 20px;
  cursor: pointer;
  min-width: 75px;
}

.about-btn {
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: var(--space-sm) 20px;
  cursor: pointer;
  margin-top: 10px;
}

.about-btn:active { border: 2px inset var(--win95-dark); }

/* ===== BOOT SCREEN ===== */
.boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: var(--win95-bg);
  font-family: 'Courier New', monospace;
  padding: 20px;
  z-index: 9999;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

.boot-screen.hidden { display: none; }

.boot-logo {
  font-size: 24px;
  color: var(--win95-light);
  margin-bottom: var(--space-xl);
}

.boot-line { margin: var(--space-sm) 0; }

.loading-bar {
  width: 300px;
  height: 20px;
  background: #333;
  border: 2px inset var(--win95-dark);
  margin-top: var(--space-lg);
}

.loading-fill {
  height: 100%;
  background: var(--win95-blue);
  width: 0%;
  transition: width 0.3s;
}

/* ===== RAIN EFFECT ===== */
.rain-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  overflow: hidden;
}

.rain-drop {
  position: absolute;
  width: 1px;
  background: linear-gradient(transparent, rgba(174, 194, 224, 0.6));
  animation: rain linear infinite;
}

@keyframes rain {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ===== NOTES ON BACKGROUND (fb-note) ===== */
.fb-note {
  position: fixed;
  width: 120px;
  min-height: 120px;
  padding: 10px;
  padding-top: 16px;
  margin-top: 12px;
  border-radius: 2px;
  background: #FFFFC5;
  box-shadow: 3px 5px 12px rgba(0,0,0,0.3);
  transform: rotate(var(--tilt, -1deg));
  color: #083c74;
  border: 1px solid rgba(8,60,116,.1);
  cursor: grab;
  user-select: none;
  touch-action: none;
  font-size: 12px;
  line-height: 1.3;
  overflow: visible;
  z-index: 10;
}

.fb-note.empty {
  cursor: pointer;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  color: #a05070;
  background: #ffcce0;
  border-color: #e8a0b8;
}

.fb-note.empty:hover {
  opacity: 1;
  box-shadow: 4px 6px 16px rgba(0,0,0,0.4);
}

.fb-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pin-color, radial-gradient(circle at 30% 30%, #ff8a96 0%, #e11b39 55%, #a80f26 100%));
  border: 1px solid rgba(0,0,0,.2);
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  z-index: 1;
  animation: pinGlow 3s ease-in-out infinite;
  animation-delay: var(--pin-delay, 0s);
}

@keyframes pinGlow {
  0%, 100% { opacity: 0.85; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
}

.fb-pin::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 12px;
  background: linear-gradient(#888, #555);
  border-radius: 0 0 1px 1px;
}

.fb-note p { margin: 0; word-wrap: break-word; }

/* Trash notes */
.trash-note {
  position: relative;
  background: #e8e8e8;
  border: 1px solid #ccc;
  padding: 8px;
  margin: 4px;
  font-size: 11px;
  max-width: 150px;
  opacity: 0.7;
  cursor: pointer;
}

.trash-note:hover {
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.trash-note p { margin: 0; overflow: hidden; text-overflow: ellipsis; }

/* ===== NOTE MODAL ===== */
.note-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1500;
}

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

.note-modal-box {
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  width: 300px;
  max-width: 90vw;
}

.note-modal-title {
  background: linear-gradient(90deg, var(--win95-blue), var(--win95-cyan));
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
}

.note-modal-content {
  padding: 12px;
}

.note-modal-content textarea {
  width: 100%;
  height: 100px;
  border: 2px inset var(--win95-dark);
  font-family: inherit;
  font-size: 12px;
  resize: none;
  margin-bottom: 10px;
}

.note-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.note-modal-btns button {
  background: var(--win95-bg);
  border: 2px outset var(--win95-light);
  padding: 4px 16px;
  cursor: pointer;
  font-family: inherit;
}

.note-modal-btns button:active {
  border: 2px inset var(--win95-dark);
}

/* ===== ASCII ART ===== */
.ascii-jesus {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: monospace;
  font-size: 16px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  white-space: pre;
  pointer-events: auto;
  z-index: 4;
  text-decoration: none;
  cursor: pointer;
}

.ascii-jesus:hover {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Flying doves */
.ascii-dove {
  position: fixed;
  font-family: monospace;
  white-space: pre;
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  font-size: 7px;
  pointer-events: none;
  z-index: 2;
}
.dove1 { top: 15%; left: -20%; animation: flyRight 80s linear infinite; }
.dove2 { top: 25%; right: -20%; animation: flyLeft 90s linear infinite; }
@keyframes flyRight { 0% { transform: translateX(0); } 100% { transform: translateX(150vw); } }
@keyframes flyLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-150vw); } }

/* Cross and fish */
.ascii-cross { position: fixed; bottom: 15%; left: 3%; font-family: monospace; color: #ffd84d; font-size: 14px; pointer-events: none; z-index: 2; }
.ascii-fish { position: fixed; bottom: 12%; right: 140px; font-family: monospace; color: #a8ffb5; font-size: 12px; pointer-events: none; z-index: 2; }

/* ===== GIFIGAN TV (in Jesus belly) ===== */
.gifigan-tv {
  position: fixed;
  left: calc(50% - 60px - 120px - 110px + 720px + 110px + 10px);  /* +10px höger */
  top: calc(50% - 30px);  /* -30px upp */
  transform: translateY(-50%);
  z-index: 55;
  cursor: pointer;
  width: 110px;
  height: 80px;
  background: transparent;
  border: none;
  padding: 0;
}

.gifigan-belly {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  border: none;
}

.gifigan-belly img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.7;
  transition: opacity 0.3s, filter 0.3s;
}

.gifigan-tv:hover {
  width: auto;
  height: auto;
  z-index: 500;
}

.gifigan-tv:hover .gifigan-belly img {
  opacity: 1;
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 80vh;
  filter: none;
}

.gifigan-fullscreen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
  cursor: pointer;
}

.gifigan-fullscreen.active { display: flex; }

.gifigan-fullscreen img {
  max-width: 90vw;
  max-height: 85vh;
  image-rendering: pixelated;
}

.gifigan-close {
  color: #888;
  font-size: 12px;
  margin-top: 15px;
  font-family: monospace;
}

/* ===== RECYCLE BIN ===== */
.recycle-bin-icon {
  transition: var(--transition-fast);
}

.recycle-bin-icon.highlight {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px var(--gold-primary));
}

.desktop-icon.trashed {
  opacity: 0.5;
  pointer-events: none;
}

/* Easter egg */
.easter-egg {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 3000;
  color: var(--pink-primary);
  font-family: monospace;
}

.easter-egg.active { display: flex; }

.easter-egg-content {
  text-align: center;
  animation: fadeIn 2s ease;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .desktop {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    padding: var(--space-sm);
    gap: 2px;
  }

  .desktop-icon { width: 60px; }
  .icon-img { width: 28px; height: 28px; font-size: 20px; }
  .icon-label { font-size: 10px; }

  .taskbar { height: 32px; }
  .start-btn { height: 26px; padding: 0 var(--space-md); }
  .taskbar-item { min-width: 60px; max-width: 100px; }

  .quick-launch { display: none; }

  .start-menu { width: 200px; }

  .window {
    left: 5px !important;
    right: 5px !important;
    width: auto !important;
    max-width: none;
  }

  .window-content { max-height: calc(100vh - 140px); }

  .fb-note { width: 100px; min-height: 100px; font-size: 10px; }

  .ascii-jesus { display: none; }
  .gifigan-tv { display: none; }
  .ascii-flowers { display: none; }
}

@media (max-width: 480px) {
  .desktop-icon { width: 55px; }
  .taskbar-windows { display: none; }
  .tray { gap: var(--space-xs); }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .ascii-jesus { font-size: 12px; right: 5px; }
  .gifigan-tv { left: calc(50% - 50px - 100px - 50px); width: 50px; height: 35px; }
}

/* ===== ASCII FLOWERS ===== */
.ascii-flowers {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 30px;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 3;
}

.ascii-flower {
  font-family: monospace;
  white-space: pre;
  line-height: 1;
  font-size: 10px;
  animation: flowerGrow 4s ease-in-out infinite alternate;
}

.ascii-flower.c1 { color: #ff8ad1; }
.ascii-flower.c2 { color: #a8ffb5; }
.ascii-flower.c3 { color: #ffd84d; }
.ascii-flower.c4 { color: #9cc7ff; }
.ascii-flower.c5 { color: #b8a8ff; }

.ascii-flower-link {
  text-decoration: none;
  pointer-events: auto;
}
.ascii-flower-link:hover .ascii-flower {
  filter: brightness(1.3);
  text-shadow: 0 0 8px currentColor;
}

@keyframes flowerGrow {
  0% { transform: scaleY(0.7); opacity: 0.6; }
  100% { transform: scaleY(1); opacity: 1; }
}
