/* h4x0r.icu/library — early 2000s directory look
   silver gradients, beveled borders, blue links, Verdana/Tahoma */

body {
  background: #7b8ca5;
  background-image: linear-gradient(#8a9bb4, #6a7b94);
  color: #000;
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 12px;
  margin: 0;
  padding: 16px 0;
}

#wrap {
  width: 780px;
  margin: 0 auto;
  background: #ece9d8;
  border: 2px solid #0a246a;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
}

/* Windows-XP-ish title bar */
.titlebar {
  background: #0a246a;
  background-image: linear-gradient(#3a6ea5, #0a246a);
  border-bottom: 1px solid #001a4d;
}
.titlebar td {
  padding: 5px 10px;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.titlebar-right {
  text-align: right;
  font-weight: normal !important;
  font-size: 11px !important;
  color: #cdd9ef !important;
}

/* nav toolbar of beveled buttons */
.toolbar {
  background: #d4d0c8;
  background-image: linear-gradient(#ece9e0, #cfcabb);
  border-bottom: 1px solid #9a9686;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.btn {
  display: inline-block;
  padding: 4px 14px;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #003 !important;
  text-decoration: none !important;
  background: #f4f2ea;
  background-image: linear-gradient(#ffffff, #e2ddcf);
  border: 1px solid #7f7c6f;
  border-radius: 3px;
  box-shadow: inset 1px 1px 0 #fff;
  cursor: pointer;
}
.btn:hover {
  background-image: linear-gradient(#ffffff, #eef4ff);
  border-color: #3a6ea5;
  color: #0a246a !important;
}
.btn:active {
  background-image: linear-gradient(#e2ddcf, #ffffff);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.25);
}
.btn-donate {
  color: #fff !important;
  background-image: linear-gradient(#3a8f3a, #1f6b1f);
  border-color: #145214;
}
.btn-donate:hover {
  color: #fff !important;
  background-image: linear-gradient(#4aa54a, #257325);
  border-color: #0f3d0f;
}

#main { padding: 14px 18px; }

.intro {
  margin: 0 0 14px 0;
  padding: 8px 10px;
  background: #fffbe6;
  border: 1px solid #d9c96a;
  line-height: 1.5;
}

/* search bar */
.searchbox {
  background: #dcdcc8;
  border: 1px solid #b0b096;
  border-radius: 0;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.searchbox label { margin-right: 6px; }
#q {
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 12px;
  padding: 3px 5px;
  width: 300px;
  border: 2px inset #cfcfbf;
  background: #fff;
}
#stat {
  margin-left: 10px;
  color: #444;
  font-size: 11px;
  font-style: italic;
}

/* the shelf table */
.shelf {
  border-collapse: collapse;
  border: 1px solid #808080;
  background: #fff;
}
.shelf th {
  background: #d4d0c8;
  background-image: linear-gradient(#f0ede4, #cfcabb);
  border: 1px solid #808080;
  padding: 4px 8px;
  text-align: left;
  font-size: 11px;
  color: #003;
}
.shelf td {
  border: 1px solid #d8d8d8;
  padding: 4px 8px;
  vertical-align: top;
}
.shelf tbody tr.row:nth-child(even) { background: #f3f3ea; }
.shelf tbody tr.row:hover { background: #fff6c9; }

.c-fmt, .c-size, .c-date { white-space: nowrap; }
.c-author { color: #333; }

.fmt {
  display: inline-block;
  background: #0a246a;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 5px;
  letter-spacing: 0.5px;
}

/* links */
a { color: #0033cc; text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: #cc0000; }
.c-title a { font-weight: bold; }

.empty {
  text-align: center;
  color: #666;
  padding: 20px;
  font-style: italic;
}
code {
  background: #eee;
  border: 1px solid #ccc;
  padding: 1px 4px;
  font-family: "Courier New", monospace;
}

/* footer */
#footer {
  padding: 10px 18px 16px 18px;
  text-align: center;
  color: #333;
  font-size: 11px;
}
#footer hr {
  border: 0;
  border-top: 1px solid #b0b096;
  margin: 0 0 12px 0;
}
.donate {
  margin: 0 0 12px 0;
}
.donate-msg {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 11px;
}
.coindrop-btn {
  border-radius: 10px;
  height: 57px;
  width: 229px;
  max-width: 100%;
  vertical-align: middle;
  transition: transform 0.1s ease;
}
.coindrop-btn:hover { transform: translateY(-1px); }
.foot-links {
  margin: 0 0 6px 0;
}
.foot-meta {
  margin: 0 0 8px 0;
  color: #666;
}
.counter {
  display: inline-block;
  margin-top: 8px;
  background: #000;
  color: #33ff33;
  font-family: "Courier New", monospace;
  padding: 2px 8px;
  letter-spacing: 2px;
  border: 1px solid #333;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

/* Tablet / small desktop: let the fixed shell become fluid. */
@media (max-width: 800px) {
  #wrap { width: auto; margin: 0 8px; }
  #main { padding: 12px 14px; }
  #q { width: 100%; box-sizing: border-box; }
  .searchbox label { display: block; margin: 0 0 4px 0; }
  #stat { display: block; margin: 6px 0 0 0; }
}

/* Phones: collapse the 5-column table into stacked "cards". */
@media (max-width: 560px) {
  body { padding: 8px 0; font-size: 13px; }
  #wrap { margin: 0 6px; }
  #main { padding: 10px 10px; }
  .intro { line-height: 1.45; }

  /* Toolbar buttons share the row evenly and stay tap-friendly. */
  .toolbar { padding: 8px; gap: 8px; }
  .btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 9px 10px;
    font-size: 12px;
  }

  /* Hide the table header; each row becomes its own labelled block. */
  .shelf thead { display: none; }
  .shelf, .shelf tbody, .shelf tr.row, .shelf td { display: block; width: auto; }

  .shelf tr.row {
    border: 1px solid #808080;
    margin-bottom: 8px;
    background: #fff;
    padding: 2px 0;
  }
  .shelf tbody tr.row:nth-child(even) { background: #fff; }

  .shelf td {
    border: 0;
    border-bottom: 1px dotted #d8d8d8;
    padding: 6px 10px 6px 96px;
    position: relative;
    min-height: 20px;
    white-space: normal;
  }
  .shelf tr.row td:last-child { border-bottom: 0; }

  /* Field name drawn from data-label, in the old greyed cell style. */
  .shelf td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 6px;
    width: 76px;
    font-weight: bold;
    font-size: 10px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Title gets more room and a bigger tap target. */
  .shelf td.c-title { padding-left: 10px; }
  .shelf td.c-title::before { display: none; }
  .shelf td.c-title a {
    display: block;
    padding: 4px 0;
    font-size: 14px;
  }
}
