/* SnipeOffice XP — Luna theme for Neocities */
@import url('https://fonts.googleapis.com/css2?family=Tahoma&display=swap');

:root {
  --xp-title-start: #0a246a;
  --xp-title-end: #3a6ea5;
  --xp-title-active-start: #1f4f9e;
  --xp-title-active-end: #6b9fd4;
  --xp-face: #ece9d8;
  --xp-border-light: #fff;
  --xp-border-dark: #808080;
  --xp-border-darker: #404040;
  --xp-btn-face: #ece9d8;
  --xp-btn-hover: #fff;
  --xp-link: #0000ee;
  --xp-link-visited: #551a8b;
  --xp-selection: #316ac5;
  --xp-green: #73d216;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  font-size: 13px;
  color: #000;
  background: #004e98 url('../images/bliss.png') center center / cover fixed no-repeat;
  line-height: 1.45;
  padding-bottom: 40px;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 80, 0.35);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--xp-link); }
a:visited { color: var(--xp-link-visited); }
a:hover { color: #ff0000; }

/* Desktop shell */
.desktop {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 12px 48px;
}

/* XP Window */
.xp-window {
  background: var(--xp-face);
  border: 2px solid;
  border-color: var(--xp-border-light) var(--xp-border-darker) var(--xp-border-darker) var(--xp-border-light);
  box-shadow: 2px 2px 8px rgba(0,0,0,0.45);
  margin-bottom: 14px;
}

.xp-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 3px 6px;
  background: linear-gradient(180deg, var(--xp-title-end) 0%, var(--xp-title-start) 8%, var(--xp-title-start) 100%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.02em;
  user-select: none;
}

.xp-titlebar.active {
  background: linear-gradient(180deg, var(--xp-title-active-end) 0%, var(--xp-title-active-start) 8%, var(--xp-title-active-start) 100%);
}

.xp-titlebar .title {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.xp-titlebar img.icon {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.xp-titlebar .buttons {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.xp-btn-chrome {
  width: 21px;
  height: 21px;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  background: linear-gradient(180deg, #3a8fd8 0%, #1e5fa8 100%);
  color: #000;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  font-weight: bold;
  font-family: Tahoma, sans-serif;
}

.xp-body {
  padding: 12px 14px 14px;
}

.xp-menubar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--xp-border-dark);
  margin: -4px -6px 12px;
  padding: 2px 4px;
  background: var(--xp-face);
}

.nav-toggle {
  display: none;
  width: 100%;
  margin: 2px 0 4px;
  padding: 10px 12px;
  font-family: Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  text-align: left;
  color: #000;
  background: linear-gradient(180deg, #fff 0%, #d4d0c8 100%);
  border: 2px solid;
  border-color: var(--xp-border-light) var(--xp-border-darker) var(--xp-border-darker) var(--xp-border-light);
  cursor: pointer;
}

.nav-links {
  display: contents;
}

.xp-menubar a {
  padding: 2px 8px;
  text-decoration: none;
  color: #000;
  font-size: 12px;
  line-height: 1.4;
}

.xp-menubar a:hover,
.xp-menubar a.current {
  background: var(--xp-selection);
  color: #fff;
}

/* Toolbar */
.xp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--xp-border-dark);
  background: linear-gradient(180deg, #fff 0%, var(--xp-face) 100%);
}

.xp-toolbar a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  text-decoration: none;
  color: #000;
  border: 1px solid transparent;
  font-size: 12px;
}

.xp-toolbar a:hover {
  border-color: var(--xp-border-dark);
  background: var(--xp-btn-hover);
  color: #000;
}

/* Buttons */
.xp-button {
  display: inline-block;
  padding: 4px 14px;
  background: var(--xp-btn-face);
  border: 2px solid;
  border-color: var(--xp-border-light) var(--xp-border-darker) var(--xp-border-darker) var(--xp-border-light);
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  margin: 2px;
}

.xp-button:hover {
  background: var(--xp-btn-hover);
}

.xp-button.primary {
  border-color: #fff #2d6b2d #2d6b2d #fff;
  background: linear-gradient(180deg, #8fdf5a 0%, var(--xp-green) 100%);
  font-weight: bold;
}

/* Typography */
h1, h2, h3 {
  font-family: Tahoma, "Trebuchet MS", sans-serif;
  color: #003399;
  margin: 0 0 8px;
}

h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; border-bottom: 1px solid var(--xp-border-dark); padding-bottom: 4px; margin-top: 18px; }
h3 { font-size: 1rem; margin-top: 14px; }

p { margin: 0 0 10px; }

.lead {
  font-size: 14px;
  color: #1a1a1a;
}

.note {
  background: #ffffcc;
  border: 1px solid #e6c200;
  padding: 8px 10px;
  margin: 10px 0;
}

.warn {
  background: #ffe4e4;
  border: 1px solid #cc0000;
  padding: 8px 10px;
  margin: 10px 0;
}

.tip {
  background: #e8f4e8;
  border: 1px solid #73d216;
  padding: 8px 10px;
  margin: 10px 0;
}

/* Tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0 14px;
  border: 1px solid var(--xp-border-dark);
  background: #fff;
}

.table-scroll .xp-table {
  margin: 0;
  min-width: 480px;
}

.xp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}

.xp-table th,
.xp-table td {
  border: 1px solid var(--xp-border-dark);
  padding: 5px 8px;
  text-align: left;
  vertical-align: top;
}

.xp-table th {
  background: linear-gradient(180deg, #fff 0%, #d4d0c8 100%);
  font-weight: bold;
}

.xp-table tr:nth-child(even) td {
  background: #f7f5ef;
}

.xp-table a.http-dl {
  display: inline-block;
  min-width: 3.25rem;
  padding: 4px 10px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff 0%, #ece9d8 100%);
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  text-decoration: none;
}

.xp-table a.http-dl:hover {
  background: linear-gradient(180deg, #fff 0%, #d8e8ff 100%);
}

/* Lists */
ol, ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

li { margin-bottom: 4px; }

/* Layout helpers */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  border: 1px solid var(--xp-border-dark);
  padding: 10px;
  background: #fff;
}

.card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  border: 1px solid var(--xp-border-dark);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--xp-border-dark);
  background: #d4e8ff;
  margin-right: 4px;
}

.badge.x64 { background: #d4e8ff; }
.badge.x86 { background: #ffe8d4; }

/* Marquee — classic touch */
.marquee-wrap {
  background: #000;
  color: #0f0;
  border: 2px inset var(--xp-border-dark);
  margin-bottom: 12px;
  overflow: hidden;
}

.marquee-wrap marquee {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #00ff00;
  padding: 3px 0;
}

/* Footer taskbar vibe */
.xp-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 30px;
  background: linear-gradient(180deg, #3a8fd8 0%, #1e5fa8 50%, #1a4f8f 100%);
  border-top: 2px solid #5cb3ff;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 0 6px;
  z-index: 100;
  font-size: 11px;
  color: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.xp-start {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, #3dba3d 0%, #1e7a1e 100%);
  border: 1px solid;
  border-color: #6fdf6f #0a4a0a #0a4a0a #6fdf6f;
  padding: 2px 10px 2px 6px;
  font-weight: bold;
  margin-right: 8px;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.xp-start:hover {
  color: #fff;
  background: linear-gradient(180deg, #4fd44f 0%, #2a9a2a 100%);
  text-decoration: none;
}

.xp-taskbar a {
  color: #fff;
  text-decoration: none;
  margin-right: 12px;
}

.xp-taskbar a:hover { text-decoration: none; }

/* Open-window / folder buttons on the taskbar */
.task-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  max-width: 168px;
  padding: 0 10px 0 5px;
  margin-right: 4px;
  background: linear-gradient(180deg, #5cb3ff 0%, #2a7fd4 45%, #1a5fa8 100%);
  border: 1px solid;
  border-color: #8ec8ff #0a3d7a #0a3d7a #6eb5ff;
  border-radius: 2px;
  color: #fff;
  font-size: 11px;
  font-weight: normal;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25);
}

.task-btn:hover {
  background: linear-gradient(180deg, #7fc4ff 0%, #3a8fd8 45%, #2468b0 100%);
  color: #fff;
}

.task-btn:active {
  background: linear-gradient(180deg, #d4e8ff 0%, #a8d0f5 50%, #7eb8eb 100%);
  border-color: #808080 #fff #fff #808080;
  color: #000;
  box-shadow: none;
}

.task-btn img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.task-btn.folder-btn {
  max-width: 148px;
}

.task-btn.app-btn {
  max-width: 156px;
}

.xp-taskbar .xp-legacy-link {
  color: #fff;
  text-decoration: none;
  margin-right: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.9;
}

.xp-taskbar .xp-legacy-link:hover {
  text-decoration: underline;
  opacity: 1;
}

.xp-clock {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px inset rgba(0,0,0,0.3);
  background: rgba(0,0,0,0.15);
}

code, kbd {
  font-family: "Courier New", monospace;
  font-size: 11px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  padding: 1px 4px;
}

.dl-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}

.mirror-note {
  font-size: 11px;
  color: #555;
  font-style: italic;
}

.hero-img {
  float: right;
  max-width: 200px;
  margin: 0 0 10px 14px;
  border: 2px solid;
  border-color: var(--xp-border-light) var(--xp-border-darker) var(--xp-border-darker) var(--xp-border-light);
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

/* Real screenshot figures */
figure.shot.hero-img {
  float: right;
  max-width: 220px;
  margin: 0 0 10px 14px;
}

figure.shot {
  margin: 12px 0 16px;
  padding: 0;
  border: 2px solid;
  border-color: var(--xp-border-light) var(--xp-border-darker) var(--xp-border-darker) var(--xp-border-light);
  background: #fff;
}

figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--xp-border-dark);
}

figure.shot figcaption {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #222;
  background: #f7f5ef;
}

figure.shot figcaption strong {
  display: block;
  color: #003399;
  margin-bottom: 3px;
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.shot-grid figure.shot { margin: 0; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.stat-box {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--xp-border-dark);
  background: #fff;
}

.stat-box .num {
  font-size: 1.4rem;
  font-weight: bold;
  color: #003399;
}

.stat-box .lbl {
  font-size: 11px;
  color: #555;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
  .three-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    font-size: 14px;
    padding-bottom: 48px;
  }

  .desktop {
    padding: 8px 8px 12px;
  }

  .xp-body {
    padding: 10px 10px 12px;
  }

  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.05rem; margin-top: 16px; }

  .lead { font-size: 15px; }

  .two-col,
  .three-col,
  .shot-grid {
    grid-template-columns: 1fr;
  }

  figure.shot.hero-img,
  .hero-img {
    float: none;
    max-width: 100%;
    margin: 0 0 14px;
  }

  .xp-menubar {
    flex-direction: column;
    flex-wrap: nowrap;
    margin: -4px -4px 12px;
    padding: 4px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 2px;
    padding-bottom: 4px;
  }

  .xp-menubar.nav-open .nav-links {
    display: flex;
  }

  .xp-menubar a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid transparent;
  }

  .xp-menubar a:hover,
  .xp-menubar a.current {
    border-color: var(--xp-border-dark);
  }

  .xp-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .xp-toolbar a {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--xp-border-dark);
    background: #fff;
  }

  .xp-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 14px;
    margin: 4px 0;
  }

  .dl-pair {
    flex-direction: column;
  }

  .dl-pair .xp-button {
    width: 100%;
  }

  .stat-box {
    flex: 1 1 calc(50% - 10px);
    min-width: calc(50% - 10px);
  }

  .stat-box .num {
    font-size: 1.25rem;
  }

  .xp-table {
    font-size: 13px;
  }

  .xp-table th,
  .xp-table td {
    padding: 8px 10px;
  }

  .xp-table code {
    word-break: break-word;
  }

  .table-scroll .xp-table {
    min-width: 560px;
  }

  .xp-titlebar .buttons {
    display: none;
  }

  .marquee-wrap marquee {
    font-size: 11px;
  }

  .xp-taskbar {
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .xp-start {
    flex-shrink: 0;
    font-size: 10px;
    padding: 4px 8px;
  }

  .xp-taskbar a {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 4px 6px;
    font-size: 11px;
  }

  .task-btn {
    height: 26px;
    max-width: 140px;
    font-size: 10px;
    padding: 0 8px 0 4px;
  }

  .task-btn.folder-btn,
  .task-btn.app-btn {
    max-width: 130px;
  }

  .xp-taskbar .xp-legacy-link {
    display: none;
  }

  .xp-clock {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 10px;
  }

  figure.shot figcaption {
    font-size: 13px;
    padding: 10px 12px;
  }
}

@media (max-width: 400px) {
  .stat-box {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .badge {
    display: block;
    width: fit-content;
    margin-bottom: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .marquee-wrap marquee {
    animation: none;
  }
}
