/* ===========================================
   GRUNDSTIL & DESKTOP-HINTERGRUND
   =========================================== */

   * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: url("wallpaper/mac\ background.png") center/cover no-repeat fixed;
    height: 100vh;
    overflow: hidden;
    color: white;
  }
  
  /* ===========================================
     DESKTOP-ICON-GRID
     =========================================== */
  
/* ===========================================
   RECHTSBÜNDIGES, SPALTENWEISES ICON-GRID
   (Verlauf: von rechts nach links)
   =========================================== */

   #video-grid {
    position: absolute;
    top: 7%;
    right: 5%;
    
    display: grid;
    grid-auto-flow: column;                 /* Icons werden spaltenweise gefüllt */
    grid-template-rows: repeat(5, min-content); /* max. 5 Icons pro Spalte */
    gap: 3rem;                              /* gleichmäßiger Abstand */
  
    justify-items: center;                  /* Icons in der Spalte zentrieren */
    align-items: start;                     /* Icons oben ausrichten */
    direction: rtl;                         /* sorgt dafür, dass neue Spalten nach links wachsen */
  }
  
  /* Damit Text und Bilder nicht gespiegelt werden */
  #video-grid * {
    direction: ltr;
  }
  
  
  
  .desktop-icon {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  
  .desktop-icon img {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  }
  
  .desktop-icon p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  }
  
  .desktop-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
  }
  
 /* =====================================================
   MAC OS X LEOPARD DOCK – GLASS TABLE + REFLECTION
   ===================================================== */

#dock {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 30px;
  border-radius: 22px;

  /* Glasiger Dock-Tisch */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(210, 210, 210, 0.25) 25%,
    rgba(160, 160, 160, 0.28) 60%,
    rgba(130, 130, 130, 0.35) 100%
  );

  backdrop-filter: blur(12px) saturate(130%);
  box-shadow:
    0 10px 25px rgba(0,0,0,0.45), /* shadow under table */
    inset 0 1px 2px rgba(255,255,255,0.55), /* top highlight */
    inset 0 -1px 2px rgba(0,0,0,0.25); /* bottom contour */

  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
}

/* Inner container for icons */
#dock ul {
  list-style: none;
  display: flex;
  align-items: flex-end;
  gap: 30px;
}

/* Dock icons with reflection */
#dock .dock-item img {
  width: 64px;
  display: block;
  transform-origin: bottom center;
  transition: transform 0.2s ease;

  /* Spiegelung */
  -webkit-box-reflect: below 2px
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.35),
      rgba(255, 255, 255, 0.1) 30%,
      rgba(255, 255, 255, 0) 75%
    );
}

/* Hover bump */
#dock .dock-item img:hover {
  transform: scale(1.35) translateY(-8px);
}

  
  /* ===========================================
     VIDEO-OVERLAY / LIGHTBOX
     =========================================== */
  
  #video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
  }
  
  #video-overlay[hidden] {
    display: none;
  }
  
  .overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    background: #000;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    overflow: hidden;
  }
  
  .overlay-content video {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .close-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.8rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
    transition: transform 0.2s ease;
  }
  
  .close-overlay:hover {
    transform: scale(1.2);
  }
  
  /* ===========================================
     RESPONSIVE OPTIMIERUNG
     =========================================== */
  
  @media (max-width: 768px) {
    #video-grid {
      grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
      gap: 1.5rem;
    }
  
    .dock-item img {
      width: 48px;
    }
  }

  /* =======================================
   MAC OS X 10.5 LEOPARD MENU BAR (Exact)
   ======================================= */

#menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 22px;

  /* Leopard glossy gradient */
  background: linear-gradient(
    to bottom,
    #f2f2f2 0%,
    #ebebeb 40%,
    #d7d7d7 70%,
    #c9c9c9 100%
  );

  /* thin bottom shadow line */
  border-bottom: 1px solid rgba(80, 80, 80, 0.45);

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;

  font-family: -apple-system, "Lucida Grande", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #000;

  -webkit-user-select: none;
  user-select: none;

  z-index: 9999;
}

/* Left side */
#menu-bar .menu-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

#menu-bar .apple-logo {
  font-size: 16px;
  margin-right: 6px;
}

/* Right side */
#menu-bar .menu-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

#menu-bar .status-item {
  opacity: 0.9;
}

body {
  padding-top: 22px; /* avoid overlap */
}


/* ===== Finder-Fenster (WinBox) Leopard-Style ===== */

.wb-body.finder-window {
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  font-family: "Lucida Grande", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
}

.finder-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Leopard Toolbar – schmal */
.finder-toolbar {
  flex: 0 0 32px;
  height: 32px;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background:
    linear-gradient(#eeeeee 0%, #dadada 45%, #c5c5c5 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.22) 0px,
      rgba(255, 255, 255, 0.22) 1px,
      rgba(180, 180, 180, 0.22) 1px,
      rgba(180, 180, 180, 0.22) 3px
    );
  background-blend-mode: overlay;

  border-bottom: 1px solid #a0a0a0;
  cursor: default; /* Drag-Logik kommt über JS */
}

.finder-body {
  flex: 1;
  display: grid;
  grid-template-columns: 180px 1fr;
  height: 100%;
}




/* Linke Seite */
.finder-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Ampel-Buttons */
.finder-window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.finder-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.35);
  cursor: pointer;
}

.finder-btn-red    { background: #ff5f57; }
.finder-btn-yellow { background: #febc2e; }
.finder-btn-green  { background: #28c840; }

/* Zurück / Vor – kleiner, grauer Buttonblock */
.finder-nav-group {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.35);
  background: linear-gradient(#f4f4f4, #d1d1d1);
}

.finder-nav-btn {
  border: none;
  padding: 2px 8px;
  font-size: 11px;
  background: transparent;
  cursor: default;
}

.finder-nav-btn + .finder-nav-btn {
  border-left: 1px solid rgba(0,0,0,0.25);
}

.finder-nav-btn.disabled {
  opacity: 0.4;
}

/* Ort: Haus + Guest */
.finder-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 10px;
  background: linear-gradient(#f6f6f6, #dcdcdc);
  border: 1px solid rgba(0,0,0,0.28);
}

.finder-location-icon {
  font-size: 11px;
}

.finder-location-text {
  font-size: 11px;
}

/* Ansichtsschalter (Icons / Liste / Spalten) – segmentierter Control */
.finder-view-group {
  display: inline-flex;
  margin-left: 12px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.35);
  background: linear-gradient(#f6f6f6, #dcdcdc);
}

.finder-view-btn {
  border: none;
  padding: 3px 9px;
  font-size: 11px;
  background: transparent;
  cursor: default;
}

.finder-view-btn + .finder-view-btn {
  border-left: 1px solid rgba(0,0,0,0.25);
}

/* Back/Forward Hover */
.finder-nav-btn:not(.disabled):hover {
  background: linear-gradient(#ffffff, #e5e5e5);
}

/* View-Buttons Hover */
.finder-view-btn:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Aktiver View-Button */
.finder-view-btn.active {
  background: linear-gradient(#6fb4ff, #2c73d6);
  color: #fff;
}

/* Rechte Seite der Toolbar */
.finder-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Augen- & Zahnrad-Buttons */
.finder-tool-btn {
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.35);
  padding: 2px 6px;
  font-size: 11px;
  background: linear-gradient(#f6f6f6, #dcdcdc);
  cursor: default;
}

/* Suche rechts – wie OS X-Leiste */
.finder-search-wrapper {
  margin-left: 4px;
  border-radius: 12px;
  padding: 1px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.35);
}

.finder-search {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 11px;
  border: none;
  outline: none;
  background: transparent;
}

.finder-body {
  flex: 1;
  display: grid;
  grid-template-columns: 180px 1fr;
  height: 100%;
}



.finder-sidebar {
  background: linear-gradient(#e8e8e8, #d8d8d8);
  border-right: 1px solid #b3b3b3;
  padding: 10px 6px;
}

.finder-sidebar ul {
  list-style: none;
}

.finder-sidebar li {
  padding: 4px 8px;
  margin-bottom: 2px;
  border-radius: 4px;
  cursor: default;
}

.finder-sidebar li:hover {
  background: rgba(40, 120, 220, 0.15);
}

.finder-sidebar li.active {
  background: linear-gradient(#6fb4ff, #2c73d6);
  color: #fff;
}

.finder-main {
  padding: 10px;
  background: #ffffff;
}

.finder-main-panel {
  width: 100%;
  height: 100%;
  overflow: auto;
  color: #000;
}

/* Basis für Status-Icons */
.status-icon {
  height: 15px;
  width: auto;
  opacity: 0.90;
  margin-right: 10px;

  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

.status-icon.audio,
.status-icon.bluetooth,
.status-icon.wifi {
  transform: translateY(1px);
}

/* Grid-Ansicht im Finder-Hauptbereich – wie Icon-View */
.finder-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  grid-auto-rows: min-content;
  gap: 24px 32px;
  align-content: flex-start;
  padding: 4px 6px;
}

.finder-item {
  text-align: center;
  font-size: 11px;
  color: #000;
  cursor: default;
}

.finder-item img {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 4px auto;
}

.finder-item span {
  display: block;
  line-height: 1.2;
}

/* Hover-Highlight wie im Finder */
.finder-item:hover {
  background: rgba(80, 140, 230, 0.15);
  border-radius: 6px;
}

/* „Ausgewählt“-Zustand könntest du später per JS setzen */
.finder-item.selected {
  background: linear-gradient(#6fb4ff, #2c73d6);
  color: #fff;
  border-radius: 6px;
}

/* WinBox-Header für Finder-Fenster: Drag + Platz für Toolbar */
.winbox.finder-window .wb-header {
  display: flex;
  align-items: stretch;
  padding: 0;
  height: 46px;             /* gleiche Höhe wie .finder-toolbar */
  border: none;
  background: transparent;  /* Brushed-Metal kommt von .finder-toolbar */
}

/* Drag-Bereich füllt den Header, Toolbar kommt hinein */
.winbox.finder-window .wb-drag {
  flex: 1;
  display: flex;
}

/* Standard-WinBox-Buttons verstecken */
.winbox.finder-window .wb-control {
  display: none !important;
}

/* Body direkt unter dem Header starten lassen */
.winbox.finder-window .wb-body {
  top: 46px !important;
}


/* === Leopard Fensterrahmen / Schatten für Finder-WinBox === */

/* Äußeres WinBox-Element – Brushed Metal wie Toolbar */
.winbox.finder-window {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.7);

  /* gleiches Metall-Muster wie .finder-toolbar */
  background:
    linear-gradient(#eeeeee 0%, #dadada 45%, #c5c5c5 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.22) 0px,
      rgba(255, 255, 255, 0.22) 1px,
      rgba(180, 180, 180, 0.22) 1px,
      rgba(180, 180, 180, 0.22) 3px
    );
  background-blend-mode: overlay;
}


/* Innenbereich (Body) — leicht heller Rahmen */
.wb-body.finder-window {
  padding: 0;
  background: #f0f0f0;
  font-family: "Lucida Grande", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}

/* ===== View-Modi: Icons / Liste / Spalten ===== */

/* Standard: Icon-Ansicht */
.finder-main[data-view="icons"] .finder-items {
  display: grid;
}

/* Listenansicht */
.finder-main[data-view="list"] .finder-items {
  display: block;
}

.finder-main[data-view="list"] .finder-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 4px 8px;
}

.finder-main[data-view="list"] .finder-item img {
  margin: 0;
}

/* Spaltenansicht (sehr simple Fake-Columns) */
.finder-main[data-view="columns"] .finder-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finder-main[data-view="columns"] .finder-item {
  text-align: left;
  justify-content: flex-start;
  padding: 2px 8px;
}

/* ===== WinBox-Header für Finder-Fenster ===== */

/* Header sichtbar & schmal – gleiche Höhe wie .finder-toolbar */
.winbox.finder-window .wb-header {
  display: flex;
  align-items: stretch;
  padding: 0;
  height: 32px;
  border: none;
  background: transparent;  /* Brushed-Metal kommt von .finder-toolbar */
}

/* Drag-Bereich, in den wir die Toolbar hängen */
.winbox.finder-window .wb-drag {
  flex: 1;
  display: flex;
}

/* Standard-WinBox-Buttons verstecken */
.winbox.finder-window .wb-control {
  display: none !important;
}

/* Body startet direkt unter dem Header */
.winbox.finder-window .wb-body {
  top: 32px !important;
}

.wb-body.finder-window {
  padding: 0;
  background: #f5f5f5; /* statt #f0f0f0, etwas heller */
  font-family: "Lucida Grande", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
}

/* === OS-X Mail Style === */

.mail-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  font-family: "Lucida Grande", sans-serif;
}

.mail-toolbar {
  height: 32px;
  background: linear-gradient(#f0f0f0, #d0d0d0);
  border-bottom: 1px solid #a0a0a0;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-weight: bold;
}

.mail-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mail-input, .mail-textarea {
  width: 100%;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 6px;
  font-size: 13px;
}

.mail-textarea {
  height: 160px;
  resize: none;
}

.mail-send {
  margin-top: 10px;
  align-self: flex-start;
  padding: 6px 14px;
  background: linear-gradient(#6fb4ff, #2c73d6);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
}




