 @font-face { src: url(https://conandrum.neocities.org/fonts/Heatwave%20Regular.otf); font-family: "Heatwave"; }
  @font-face { src: url(https://conandrum.neocities.org/fonts/Gotham%20Book.otf); font-family: "Gotham"; }
 
  :root {
    --thumb-size: 110px;
    --bg: #F5F1EB;
    --surface: #FAF7F2;
    --primary: #DB6A28;
    --primary-hover: #B84F16;
    --secondary: #17375E;
    --accent: #6B4FA3;
    --highlight: #E8B24E;
    --text: #38352F;
    --text-muted: #6D7075;
    --border: #DDD7D0;
    --success: #4BAA84;
    --error: #C74A3A;
    --black: #0a0908;
  }
 
  * { box-sizing: border-box; }
 
  body {
  margin: 0;
  font-family: "Gotham";
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url(https://conandrum.neocities.org/img/starsagain.gif);
  background-color: var(--black);
  color: var(--text);
}
 
  header {
    text-align: center;
    padding: 30px 20px 10px;
  }
 
  header img {
    width: 500px;
    max-width: 60%;
  }
 
  header h1 {
    margin: 10px 0 4px;
    font-size: 1.8rem;
    font-family: "Heatwave", cursive;
    color: var(--primary);
    letter-spacing: 0.5px;
  }
 
  header p {
    color: var(--highlight);
    margin: 0 0 16px;
  }
 
  header a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
  }
 
  header a:hover { color: var(--primary-hover); text-decoration: underline; }
 
  main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
  }
 
  .pageLinks {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 0;
    margin: 20px 0;
  }
 
  .pageLinks li a,
  .pageLinks li b {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: "Gotham", sans-serif;
  }
 
  .pageLinks li a {
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
  }
 
  .pageLinks li a:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
  }
 
  .pageLinks li b {
    background: var(--accent);
    color: #fff;
  }
 
  /* Preview area: shows the hovered image, plain and simple */
  #preview {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 30px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
 
  #preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
 
  #preview .placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
  }
 
  /* Size toggle */
  .sizeToggle {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0 0 20px;
  }
 
  .sizeToggle button {
    font-family: "Gotham", sans-serif;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
  }
 
  .sizeToggle button:hover {
    border-color: var(--primary);
    color: var(--primary-hover);
  }
 
  .sizeToggle button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
 
  /* Gallery grid */
  #textures {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 90px), 1fr));
    gap: 12px;
  }
 
  #textures li a {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.7rem;
    font-family: "Gotham", sans-serif;
    word-wrap: break-word;
  }
 
  #textures img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    display: block;
    margin-bottom: 4px;
    background: var(--surface);
  }
 
  #textures a:hover img,
  #textures a:focus img {
    border-color: var(--primary);
  }
  
   /* Only items with a data-credit attribute get a tooltip.
     Leave the attribute off any <a> to keep it uncredited. */
  #textures a[data-credit] {
    position: relative;
  }
 
  /* The tooltip bubble */
  #textures a[data-credit]::after {
    content: attr(data-credit);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    background: var(--secondary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    white-space: nowrap;
    padding: 5px 9px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
  }
 
  /* Little arrow under the bubble, pointing at the thumbnail */
  #textures a[data-credit]::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    margin-bottom: -1px;
    border: 5px solid transparent;
    border-top-color: var(--secondary);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    z-index: 20;
    pointer-events: none;
  }
 
  /* Reveal on hover (mouse) and focus (keyboard tab) */
  #textures a[data-credit]:hover::after,
  #textures a[data-credit]:hover::before,
  #textures a[data-credit]:focus::after,
  #textures a[data-credit]:focus::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
 
  /* Mobile / touch devices have no hover state, so instead of a
     hover bubble, show a small always-visible credit line under
     the thumbnail. Only affects items that have data-credit. */
  @media (hover: none), (pointer: coarse) {
    #textures a[data-credit]::before {
      display: none;
    }
    #textures a[data-credit]::after {
      position: static;
      display: block;
      opacity: 1;
      visibility: visible;
      transform: none;
      pointer-events: auto;
      white-space: normal;
      text-align: center;
      box-shadow: none;
      margin: 4px auto 0;
      max-width: 100%;
    }
  }
 
  footer {
    text-align: center;
    padding: 30px 0 50px;
  }
 
  footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
  }
 
  footer a:hover { color: var(--primary-hover); text-decoration: underline; }