:root {
  --aqua: #22d8ee;
  --aqua-deep: #008fc4;
  --blue: #086dca;
  --blue-dark: #06416e;
  --lime: #8bd847;
  --orange: #ff9d20;
  --cream: #f9fff2;
  --silver: #d8edf3;
  --ink: #06324c;
  --panel: rgba(235, 255, 255, 0.92);
  --line: #62c8da;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Tahoma, Verdana, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  background:
    linear-gradient(rgba(255, 255, 255, 0.22), rgba(25, 178, 206, 0.58)),
    url("thumbs/1.png") center top / cover fixed,
    #57d1df;
}

a {
  color: #034c9f;
  text-decoration: none;
}

a:hover {
  color: #c65b00;
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16) 0,
      rgba(255, 255, 255, 0.16) 1px,
      transparent 1px,
      transparent 86px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(0, 79, 125, 0.08) 0,
      rgba(0, 79, 125, 0.08) 1px,
      transparent 1px,
      transparent 64px
    );
  mix-blend-mode: screen;
}

.page-shell {
  position: relative;
  width: min(1080px, calc(100% - 28px));
  margin: 18px auto 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(190, 246, 255, 0.88)),
    rgba(226, 252, 255, 0.92);
  box-shadow:
    0 22px 60px rgba(0, 67, 102, 0.38),
    inset 0 0 0 1px rgba(0, 116, 170, 0.28),
    inset 0 1px 0 #fff;
  overflow: hidden;
}

.utility-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 10px;
  color: #eaffff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  background:
    linear-gradient(#47b7e9, #096ba9 48%, #06497d 49%, #0c86c1);
  border-bottom: 1px solid #7be8ff;
  text-shadow: 0 1px 0 #003b65;
}

.brand-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  min-height: 236px;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.22) 48%, rgba(10, 160, 213, 0.18)),
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.98) 0 8%, rgba(255, 255, 255, 0) 18%),
    url("thumbs/5.png") center / cover;
  border-bottom: 1px solid #80dfe8;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  pointer-events: none;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.7);
}

.brand-copy {
  position: relative;
  z-index: 1;
  align-self: end;
  min-width: 0;
  width: 100%;
  max-width: 620px;
  padding: 18px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(210, 249, 255, 0.8)),
    rgba(255, 255, 255, 0.74);
  box-shadow:
    inset 0 1px 0 #fff,
    0 10px 26px rgba(0, 92, 136, 0.24);
}

.eyebrow {
  margin: 0 0 6px;
  color: #057d9f;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  color: #03437a;
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 #fff,
    0 3px 8px rgba(16, 154, 196, 0.48);
}

.tagline {
  max-width: 540px;
  margin-bottom: 0;
  color: #245a6c;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.update-badge {
  position: relative;
  z-index: 1;
  align-self: start;
  min-width: 156px;
  padding: 11px 12px 12px;
  color: #054969;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(#ffffff, #c7f5ff 48%, #8fe6f4 49%, #f9ffff);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 20px rgba(0, 88, 130, 0.25);
}

.update-badge strong {
  display: block;
  margin-bottom: 2px;
  color: #075d1b;
  font-size: 18px;
  text-shadow: 0 1px 0 #fff;
}

.update-badge span:last-child {
  display: block;
  font-size: 11px;
}

.badge-light {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff, #b7ff76 36%, #28a413 70%);
  box-shadow: 0 0 10px #8eff5b;
}

.site-grid {
  padding: 14px;
}

.main-window {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 20px rgba(0, 105, 140, 0.12);
}

.window-title {
  color: #fff;
  text-shadow: 0 1px 0 #024067;
  border-bottom: 1px solid #55d6e9;
  background:
    linear-gradient(#6adcff, #128dca 48%, #086aa8 49%, #13a4d7);
}

.main-window {
  min-width: 0;
  overflow: hidden;
}

.window-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px;
}

.window-title h2 {
  margin: 0;
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-size: 18px;
}

.window-buttons {
  display: flex;
  gap: 4px;
}

.window-buttons i {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 2px;
  background: linear-gradient(#fff, #98e5f5 49%, #1092c5 50%, #e4fbff);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.window-status {
  font-size: 11px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #a9dfe8;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(210, 250, 255, 0.72)),
    #d9f8ff;
}

.glass-button,
.search-box {
  border: 1px solid #4aa5c5;
  border-radius: 7px;
  background:
    linear-gradient(#ffffff, #dffaff 45%, #80ddeb 46%, #f7ffff);
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(255, 255, 255, 0.72);
}

.search-box {
  display: flex;
  align-items: center;
  min-width: min(420px, 100%);
  padding: 3px 4px 3px 9px;
}

.search-box span {
  margin-right: 7px;
  color: #13627d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-box input {
  width: 310px;
  min-width: 0;
  border: 1px solid #85c6d8;
  border-radius: 5px;
  padding: 5px 7px;
  color: #07324b;
  background: linear-gradient(#f5ffff, #fff);
  box-shadow: inset 0 1px 3px rgba(0, 81, 120, 0.16);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.wallpaper-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #72cad8;
  border-radius: 8px;
  background:
    linear-gradient(#ffffff, #e7fcff 42%, #d7f6fb),
    #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 16px rgba(0, 92, 138, 0.15);
}

.preview-button {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #a7dfe9;
  background: #caeff7;
  cursor: zoom-in;
}

.preview-button img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: filter 160ms ease, transform 160ms ease;
}

.preview-button:hover img {
  filter: saturate(1.12) contrast(1.04);
  transform: scale(1.012);
}

.card-body {
  padding: 10px;
}

.card-title {
  margin: 0;
  padding: 7px 10px 6px;
  color: #043e70;
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.1;
  border-bottom: 1px solid #a7dfe9;
  background: linear-gradient(#ffffff, #dffaff);
}

.meta {
  margin-bottom: 8px;
  color: #075e88;
  font-size: 11px;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.tag {
  padding: 2px 7px;
  color: #075473;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #9dd6e0;
  border-radius: 7px;
  background: linear-gradient(#fff, #d6f9ff);
  box-shadow: inset 0 1px 0 #fff;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.tag:hover,
.tag:focus-visible {
  color: #8b104f;
  border-color: #ff73bd;
  outline: 0;
  background: linear-gradient(#fff, #ffd5ec 45%, #ff8ac7 46%, #fff4fa);
  box-shadow:
    inset 0 1px 0 #fff,
    0 0 0 2px rgba(255, 113, 189, 0.22);
}

.card-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 11px;
  color: #084d73;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.glass-button:hover {
  color: #853f00;
  text-decoration: none;
  background:
    linear-gradient(#fff, #fff6bf 45%, #ffc955 46%, #fffdf1);
}

.glass-button.primary {
  color: #fff;
  border-color: #08659a;
  background:
    linear-gradient(#64e8ff, #118ec9 48%, #0666a5 49%, #18aedb);
  text-shadow: 0 1px 0 #003d64;
}

.glass-button.primary:hover {
  color: #fff;
  background:
    linear-gradient(#adff6c, #4cb91f 48%, #278c0e 49%, #7ce044);
}

.empty-state,
.noscript {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  color: #24556a;
  text-align: center;
  border: 1px dashed #7ecbd8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  color: #eaffff;
  border-top: 1px solid #98eefb;
  background:
    linear-gradient(#2bb7df, #075d9a 48%, #064873 49%, #0c7fb6);
  text-shadow: 0 1px 0 #003a5f;
}

.site-footer a {
  color: #fff;
  font-weight: 700;
}

.wallpaper-dialog {
  width: min(960px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid #55cfe5;
  border-radius: 8px;
  background: rgba(235, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(0, 45, 79, 0.55);
}

.wallpaper-dialog::backdrop {
  background: rgba(0, 45, 70, 0.58);
  backdrop-filter: blur(4px);
}

.dialog-chrome {
  position: relative;
  margin: 0;
  background:
    linear-gradient(#ffffff, #dffaff),
    #eaffff;
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: #fff;
  font-weight: 700;
  border: 1px solid #8b260a;
  border-radius: 4px;
  background: linear-gradient(#ffbe77, #e14b1e 50%, #b5200b 51%, #f58d44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.dialog-image-wrap {
  padding: 10px;
  border-bottom: 1px solid #8fd9e5;
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(182, 239, 249, 0.62)),
    #c9f4fb;
}

.dialog-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  object-fit: cover;
  border: 1px solid #fff;
  background: #cdf5ff;
  box-shadow: 0 10px 28px rgba(0, 91, 130, 0.24);
}

.dialog-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 14px;
}

.dialog-info h3 {
  margin-bottom: 5px;
  color: #043e70;
  font-size: 24px;
  font-family: "Trebuchet MS", Tahoma, sans-serif;
}

.dialog-info p {
  margin-bottom: 5px;
}

.dialog-meta {
  color: #0b658c;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 880px) {
  .brand-panel,
  .dialog-info {
    grid-template-columns: 1fr;
  }

  .update-badge {
    justify-self: start;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .page-shell {
    width: calc(100% - 16px);
    margin-top: 8px;
  }

  .utility-strip,
  .site-footer {
    flex-direction: column;
    gap: 3px;
  }

  .brand-panel {
    padding: 16px;
    overflow: hidden;
  }

  .brand-copy {
    padding: 14px;
  }

  .tagline {
    max-width: 275px;
  }

  h1 {
    font-size: 28px;
    overflow-wrap: anywhere;
  }

  .site-grid {
    padding: 8px;
  }

  .toolbar {
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .search-box {
    min-width: 0;
  }

  .search-box input {
    flex: 1 1 auto;
    width: auto;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
