/* =========================================================
   RESET + BASE
   ========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'W95FA', 'MS Sans Serif', sans-serif;
}

@font-face {
  font-family: 'W95FA';
  src: url('fonts/W95FA.otf') format('opentype');
}

/* =========================================================
   DESKTOP + ICONS  (the "OS shell" — keep consistent across the site)
   ========================================================= */
#desktop {
  position: relative;
  width: 100%; height: 100%;
  background: url('images/Classic_Clouds_Wallpaper.jpeg') center/cover no-repeat;
}

.desktop-icon {
  width: 85px;
  text-align: center;
  font-size: 16px;
  color: #000;
  position: absolute;
  cursor: pointer;
  user-select: none;
  padding: 4px;
  border-radius: 2px;
}
.desktop-icon img { display: block; margin: 0 auto 4px; width: 63px; height: 63px; }
.desktop-icon span {
  display: block;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.85); /* keeps labels legible over bright cloud areas */
}
.desktop-icon.selected { background: #000080; }
.desktop-icon.selected span { color: #fff; text-shadow: none; }
.desktop-icon.selected img { filter: brightness(0) invert(1); }

.icon-1 { top: 23px; left: 23px; }
.icon-2 { top: 23px; left: 115px; }
.icon-3 { top: 115px; left: 23px; }
.icon-4 { top: 115px; left: 115px; }
.icon-5 { top: 207px; left: 23px; }
.icon-6 { top: 207px; left: 115px; }
.icon-7 { top: 299px; left: 23px; }
.icon-8 { top: 299px; left: 115px; }

/* =========================================================
   WINDOWS — draggable, bevelled, resizable footprint
   ========================================================= */
#windows-layer { position: absolute; inset: 0; pointer-events: none; }
#windows-layer .window { pointer-events: auto; }

.window {
  position: absolute;
  min-width: 260px;
  min-height: 180px;
  max-width: calc(100vw - 8px);
  max-height: calc(100vh - 44px);
  background: #C0C0C0;
  border: 2px solid;
  border-color: #dfdfdf #000 #000 #dfdfdf;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #808080,
    3px 3px 10px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  z-index: 10;
  /* width/height/top/left are set inline by main.js — this class only
     defines the look, not the geometry */
}
.window.active { z-index: 20; }

.titlebar {
  height: 30px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 4px 0 8px;
  font-size: 18px; /* +30% over the original 14px */
  user-select: none;
  cursor: grab;
  touch-action: none; /* we handle dragging ourselves via Pointer Events */
}
.titlebar:active { cursor: grabbing; }
.titlebar .title-text {
  pointer-events: none;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Section icon, sits at the far right of the titlebar, just before the close button */
.titlebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
  image-rendering: pixelated;
}

.close-btn {
  cursor: pointer;
  font-weight: bold;
  font-family: Tahoma, Arial, sans-serif;
  color: #000;
  background: #C0C0C0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.close-btn:active {
  border-color: #000 #fff #fff #000;
}

.content {
  flex: 1;
  background: #FFF;
  overflow: auto;
  font-size: 14px;
  -webkit-overflow-scrolling: touch;
}

/* Corner grip for resizing — classic diagonal-lines look */
.resize-handle {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  z-index: 5;
  background-image:
    linear-gradient(135deg, transparent 0%, transparent 42%, #808080 42%, #808080 48%, transparent 48%),
    linear-gradient(135deg, transparent 0%, transparent 62%, #808080 62%, #808080 68%, transparent 68%),
    linear-gradient(135deg, transparent 0%, transparent 82%, #808080 82%, #808080 88%, transparent 88%);
}

/* =========================================================
   TASKBAR + START MENU
   ========================================================= */
#start-bar {
  position: fixed; bottom: 0; left: 0; width: 100%; height: 36px;
  background: #C0C0C0;
  border-top: 2px solid #FFF; border-left: 2px solid #FFF;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  display: flex; align-items: center; padding: 0 4px;
  z-index: 1000;
}
#start-button {
  background: #C0C0C0;
  border: 2px solid #FFF; border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  display: flex; align-items: center; gap: 4px; padding: 0 6px; height: 32px;
  font-size: 16px; cursor: pointer; user-select: none;
}
#start-button:active {
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #FFF; border-right: 2px solid #FFF;
}
.start-icon { width: 14px; height: 14px; }
#clock {
  margin-left: auto; padding: 0 6px; font-size: 16px; position: relative;
  user-select: none; cursor: default;
}
#clock:hover::after {
  content: attr(data-date);
  position: absolute; bottom: 100%; right: 0;
  background: #ffffe0; border: 1px solid #000; padding: 2px 4px;
  white-space: nowrap; font-size: 12px; z-index: 1000;
}

#start-menu {
  position: fixed; bottom: 36px; left: 4px;
  background: #C0C0C0; border: 2px solid #000;
  display: none;
  box-shadow: 2px 2px 0 #808080;
  font-size: 16px; flex-direction: row; align-items: stretch;
  z-index: 1001;
}
.menu-header {
  background: linear-gradient(180deg, #000080, #1084d0);
  color: #FFF;
  border: 2px solid; border-color: #dfdfdf #000 #000 #dfdfdf;
  width: 26px;             /* fixed width — matches the original solapa size */
  padding: 4px 3px 36px;   /* extra bottom padding so the text isn't flush on the edge */
  overflow: hidden;         /* clips the wide pre-rotation text box instead of stretching the column */
  display: flex;
  align-items: flex-end;   /* anchors the text toward the bottom instead of centering it */
  justify-content: center;
}
.menu-header-text {
  display: inline-block;
  white-space: nowrap;
  transform: rotate(-90deg);
  font-size: 16px;
  letter-spacing: 1px;
}
.menu-header-text .brand {
  font-family: Tahoma, 'Arial Black', Arial, sans-serif;
  font-weight: 700;
}
.menu-header-text .year {
  font-family: 'W95FA', 'MS Sans Serif', sans-serif;
  font-weight: 400;
  margin-left: 2px;
}
.menu-content { display: flex; flex-direction: column; background: #C0C0C0; width: 180px; padding: 4px 0; }
.menu-content ul { list-style: none; }
.menu-content li { display: flex; align-items: center; padding: 8px; cursor: pointer; user-select: none; }
.menu-content li img { width: 32px; height: 32px; margin-right: 8px; }
.menu-content li:hover { background: #000080; color: #FFF; }
.separator { border-top: 1px solid #808080; margin: 4px 0; }

/* =========================================================
   MOBILE — windows become near-fullscreen, dragging disabled by JS
   ========================================================= */
@media (max-width: 640px) {
  /* Position/size on mobile are computed and set inline by main.js
     (so they stay draggable/resizable) — this only tweaks touch ergonomics */
  .titlebar { height: 38px; }
  .close-btn { width: 34px; height: 34px; font-size: 18px; }
  .resize-handle { width: 26px; height: 26px; }
}

/* =========================================================
   PER-SECTION CONTENT STYLES
   Each section is visually independent. Everything is scoped
   under its own class so styles never leak into other windows.
   ========================================================= */

/* ---- Default / placeholder content (used until a section has real content) ---- */
.content-default {
  padding: 20px;
  font-family: 'W95FA', 'MS Sans Serif', sans-serif;
  color: #222;
  line-height: 1.5;
}

/* ---- WORKSPACE: contemporary glassmorphism login ---- */
.content-workspace {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, #2b1055 0%, #7597de 100%);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
.workspace-card {
  width: 100%;
  max-width: 320px;
  padding: 32px 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  color: #fff;
}
.workspace-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}
.workspace-card p.subtitle {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 24px;
}
.workspace-field { margin-bottom: 16px; }
.workspace-field label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 6px;
}
.workspace-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  outline: none;
}
.workspace-field input::placeholder { color: rgba(255,255,255,0.55); }
.workspace-field input:focus { border-color: #fff; background: rgba(255,255,255,0.22); }
.workspace-submit {
  width: 100%;
  padding: 11px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #2b1055;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.workspace-submit:hover { background: #f0eaff; }

/* ---- BLOG: bold, colorful, magazine-style ---- */
.content-blog {
  height: 100%;
  overflow-y: auto;
  background: #fff8ec;
  font-family: Georgia, 'Times New Roman', serif;
  padding: 28px 24px 40px;
}
.blog-masthead {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: #1a1a1a;
  border-bottom: 4px solid #1a1a1a;
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.blog-masthead span { color: #e8462d; }
.blog-post {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed #c9bfa8;
  align-items: start;
}
.blog-post:last-child { border-bottom: none; }
.blog-tag {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  color: #fff;
  background: #e8462d;
  padding: 4px 6px;
  border-radius: 3px;
  text-align: center;
  align-self: start;
}
.blog-post h3 {
  font-size: 19px;
  margin-bottom: 4px;
  color: #1a1a1a;
}
.blog-post p {
  font-size: 14px;
  color: #4a4a4a;
  line-height: 1.5;
}
