/* ---------------- Global Desktop & Font ---------------- */
.desktop {
  background: linear-gradient(to bottom, #1e1e1e, #101010);
  background-image: url("/assets/images/desktop-bg.jpeg");
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------------- Dock ---------------- */
.dock {
  display: flex;
  gap: 20px;
  padding: 15px 25px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.dock-icon {
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

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

.dock-icon:hover {
  transform: scale(1.2);
}

.dock-icon::after {
  content: attr(data-app);
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.dock-icon:hover::after {
  opacity: 1;
}

/* ---------------- Safari & Windows ---------------- */
.window {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.window.active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  z-index: 10;
}

.window-header {
  height: 32px;
  background: #f3f3f3;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: grab;
}

.window-buttons {
  display: flex;
  gap: 6px;
  margin-right: 10px;
}

.window-buttons span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.window-buttons .close { background: #ff5f57; }
.window-buttons .minimize { background: #ffbd2e; }
.window-buttons .maximize { background: #28c840; }

.window-title {
  font-size: 13px;
  color: #333;
}

.window-content {
  flex: 1;
  background: #fff;
  overflow: auto;
  font-size: 14px;
  padding: 10px;
}

.window-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------------- Safari Specific ---------------- */
.safari-window {
  display: flex;
  flex-direction: column;
  overflow: hidden; 
}

.safari-topbar {
  display: flex;
  align-items: flex-start; /* push items to top */
  padding: 8px 12px;       /* still needed for horizontal spacing */
  background: #f5f5f5;
  border-bottom: 1px solid #dcdcdc;
  height: 60px;            /* taller bar for more visual space */
  box-sizing: border-box;
}

.safari-url-bar {
  flex: 1;
  background: #e9e9ea;
  border-radius: 6px;
  padding: 4px 12px;   /* less vertical padding */
  font-size: 14px;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: 8px;    /* spacing from traffic lights */
  margin-top: 0;       
  margin-bottom: 0;
  height: 24px;         /* set explicit height */
  box-sizing: border-box;
  align-items: center;    /* vertical centering */ 
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.traffic-lights {
  display: flex;
  gap: 6px;
  margin-right: 10px;
}

.circle { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f57; }
.yellow { background: #febc2e; }
.green { background: #28c840; }

/* ---------------- Resizing Handles ---------------- */
.resize-handle {
  position: absolute;
  z-index: 5;
}

.resize-handle.top { top: -2px; left: 0; right: 0; height: 5px; cursor: ns-resize; }
.resize-handle.bottom { bottom: -2px; left: 0; right: 0; height: 5px; cursor: ns-resize; }
.resize-handle.left { top: 0; bottom: 0; left: -2px; width: 5px; cursor: ew-resize; }
.resize-handle.right { top: 0; bottom: 0; right: -2px; width: 5px; cursor: ew-resize; }

/* ---------------- Notes Window ---------------- */
.notes-window {
  width: 320px;
  height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 60px;
  right: 20px;
  transform-origin: bottom right;
  transition: transform 0.4s ease, opacity 0.4s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.notes-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 15px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #f2c200;
  cursor: grab;
}

.notes-header .title {
  font-weight: 600;
  color: #000;
  font-size: 18px;
}

.notes-header .window-buttons {
  margin-right: 0;
}

.notes-content {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #222;
  overflow-y: auto;
}

.notes-content h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #000;
}


.notes-content .highlight {
  background: #ded7ece5;
  padding: 2px 5px;
  border-radius: 4px;
}

.note-tips {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 10px 0 12px;
}

.tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #f1f1f1;
  border-radius: 10px;
  padding: 6px 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.tip:hover {
  background: #ded7ece5;
  transform: translateY(-2px);
}

.tip strong {
  display: block;
  font-weight: 600;
  color: #000;
  margin-bottom: 2px;
}

.tip p {
  margin: 0;
  font-size: 13px;
  color: #444;
}

.end-note {
  font-style: italic;
  font-size: 12px;
  color: #555;
  text-align: center;
  margin-top: 10px;
}

.notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 50px;
  padding: 0 10px;
  border-top: 1px solid #e0e0e0; /* fixed missing footer border */
  background: #fff;
}

.notes-footer img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.notes-footer img:hover {
  transform: scale(1.2);
}


/* ---------------- Top Bar ---------------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  font-size: 13px;
  user-select: none;
  z-index: 10000;
}

.top-left { display: flex; align-items: center; gap: 12px; }

.apple-logo {
  height: 20px; /* smaller logo */
  width: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.menu-item {
  cursor: default;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
  color: inherit; /* keeps the same color as before */
  color: #fff;
  font-weight: 400;
}

.menu-item.active { font-weight: 600; }

.menu-item:hover { background: rgba(255, 255, 255, 0.1); }

.top-right { display: flex; align-items: center; gap: 14px; }

.top-right img {
  height: 12px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

#clock { margin-left: 8px; }
