/* ============================================================
   THE VHS VAULT — styled like a hobbyist collection site c. 2003.
   Fixed column, tiled background, beveled panels, Verdana 11px.
   ============================================================ */

:root {
  /* One pixels-per-millimetre value for the whole shelf, so box sizes
     stay true relative to each other. Templates pass --mw/--mh/--md. */
  --ppm: 1.4px;
}

body {
  margin: 0;
  padding: 14px 0 30px;
  background-color: #23262d;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.014) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg,
      rgba(0,0,0,0.16) 0 1px, transparent 1px 5px);
  color: #c3c8d2;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

table { border-collapse: collapse; }

a { color: #7fb0e8; text-decoration: underline; }
a:visited { color: #b394d6; }
a:hover { color: #ffcc33; }

code { font-family: "Courier New", monospace; color: #ff9900; }

.dim { color: #79839a; }
.hi { color: #ff9900; }

/* ---------- page column ---------- */

#page {
  width: 820px;
  margin: 0 auto;
  background: #191c22;
  border-top: 2px solid #565f70;
  border-left: 2px solid #565f70;
  border-right: 2px solid #0a0c0f;
  border-bottom: 2px solid #0a0c0f;
  padding: 5px;
}

/* ---------- banner ---------- */

#banner {
  background: #10131a;
  border: 1px solid #3c4454;
  padding: 16px 18px;
  margin-bottom: 5px;
}

#banner h1 {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 27px;
  letter-spacing: -1px;
  margin: 0;
  text-shadow: 2px 2px 0 #000;
}

#banner h1 a { color: #e8edf5; text-decoration: none; }
#banner h1 a:hover { color: #ffcc33; }
#banner .tag { color: #79839a; font-size: 10px; margin-top: 5px; font-style: italic; }

/* ---------- nav ---------- */

#nav {
  background: linear-gradient(to bottom, #3d4656 0%, #262c38 100%);
  border-top: 1px solid #5d677c;
  border-left: 1px solid #5d677c;
  border-right: 1px solid #101318;
  border-bottom: 1px solid #101318;
  padding: 5px 8px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

#nav a {
  color: #cfd6e2;
  text-decoration: none;
  padding: 2px 9px;
  text-transform: uppercase;
  font-weight: bold;
}

#nav a:hover { color: #ffcc33; text-decoration: underline; }
#nav span { color: #4d5566; }

/* ---------- flash ---------- */

.flash {
  border: 1px solid #7a5c1a;
  background: #2b2413;
  color: #ffcc33;
  padding: 6px 9px;
  margin-bottom: 5px;
  font-size: 10px;
}

/* ---------- layout ---------- */

#layout { width: 100%; }
#layout > tbody > tr > td { vertical-align: top; }
#sidebar { width: 168px; padding-right: 5px; }

/* ---------- beveled pane ---------- */

.pane {
  border-top: 1px solid #5d677c;
  border-left: 1px solid #5d677c;
  border-right: 1px solid #101318;
  border-bottom: 1px solid #101318;
  background: #1e222a;
  margin-bottom: 5px;
}

.pane.narrow { width: 320px; margin: 0 auto; }

.pane .bar {
  background: linear-gradient(to bottom, #3a6ea5 0%, #1f4373 100%);
  border-bottom: 1px solid #101318;
  color: #fff;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 7px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.6);
}

.pane .in { padding: 9px; }

/* ---------- sidebar bits ---------- */

.menu { list-style: none; margin: 0; padding: 0; }
.menu li { border-bottom: 1px dotted #333a47; }
.menu li:last-child { border-bottom: none; }
.menu a { display: block; padding: 4px 7px; text-decoration: none; color: #a9b3c4; }
.menu a:hover { background: #262c38; color: #ffcc33; }
.menu .n { float: right; color: #66707f; }

.stats { width: 100%; font-size: 10px; }
.stats td { padding: 2px 0; border-bottom: 1px dotted #2d3441; }
.stats td.v { text-align: right; color: #ff9900; font-weight: bold; }
.stats.wide td:first-child { width: 90px; color: #79839a; }

/* ---------- filters ---------- */

.filters { padding: 7px; font-size: 10px; }

.filters input,
.filters select,
.form input, .form select, textarea, input[type="password"] {
  font-family: Verdana, sans-serif;
  font-size: 10px;
  background: #10131a;
  color: #c3c8d2;
  border-top: 1px solid #0a0c0f;
  border-left: 1px solid #0a0c0f;
  border-right: 1px solid #4a5364;
  border-bottom: 1px solid #4a5364;
  padding: 3px 4px;
}

.filters input[type="text"] { width: 130px; }
.filters .showing { float: right; color: #66707f; padding-top: 3px; }

.btn {
  font-family: Verdana, sans-serif;
  font-size: 10px;
  font-weight: bold;
  color: #e8edf5;
  background: linear-gradient(to bottom, #3d4656, #262c38);
  border-top: 1px solid #6b7688;
  border-left: 1px solid #6b7688;
  border-right: 1px solid #101318;
  border-bottom: 1px solid #101318;
  padding: 3px 10px;
  cursor: pointer;
  text-decoration: none;
}

.btn:active {
  border-top: 1px solid #101318;
  border-left: 1px solid #101318;
  border-right: 1px solid #6b7688;
  border-bottom: 1px solid #6b7688;
}

.btn.big { padding: 6px 18px; font-size: 11px; }
.btn.inline { display: inline-block; }
.btn.danger { color: #ffb0a8; border-top-color: #8a4a44; border-left-color: #8a4a44; }

/* ---------- shelf ---------- */

.shelf { padding: 9px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.tape {
  border-top: 1px solid #3c4454;
  border-left: 1px solid #3c4454;
  border-right: 1px solid #101318;
  border-bottom: 1px solid #101318;
  background: #15181e;
  padding: 12px 6px 9px;
  text-align: center;
}

.tape:hover { background: #1b1f27; border-top-color: #566274; border-left-color: #566274; }

.tape .boxlink { display: block; text-decoration: none; }

.tape .title {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  display: block;
  margin-bottom: 3px;
}

.tape .spec { font-family: "Courier New", monospace; font-size: 10px; color: #79839a; }
.tape .spec .sp { color: #ff9900; }

.empty { padding: 34px; text-align: center; color: #66707f; }

/* ---------- the 3D box ---------- */

.scene {
  /* mm values arrive as unitless custom properties from the template. */
  width: calc(var(--mw) * var(--ppm));
  height: calc(var(--mh) * var(--ppm));
  perspective: 900px;
  margin: 0 auto 11px;
  position: relative;
  cursor: pointer;
}

.vhs-box {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-6deg) rotateY(-22deg);
  animation: spinVHS 14s linear infinite;
  animation-play-state: paused;
}

.scene:hover .vhs-box,
.scene:focus-within .vhs-box { animation-play-state: running; }

@keyframes spinVHS {
  from { transform: rotateX(-6deg) rotateY(-22deg); }
  to   { transform: rotateX(-6deg) rotateY(338deg); }
}

.face {
  position: absolute;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0d0f14;
  border: 1px solid rgba(255,255,255,0.08);
}

.front, .back {
  width: calc(var(--mw) * var(--ppm));
  height: calc(var(--mh) * var(--ppm));
}

.spine-left, .spine-right {
  width: calc(var(--md) * var(--ppm));
  height: calc(var(--mh) * var(--ppm));
  left: calc((var(--mw) - var(--md)) * var(--ppm) / 2);
}

.top, .bottom {
  width: calc(var(--mw) * var(--ppm));
  height: calc(var(--md) * var(--ppm));
  top: calc((var(--mh) - var(--md)) * var(--ppm) / 2);
  background: #14161d;
}

.front       { transform: translateZ(calc(var(--md) * var(--ppm) / 2)); }
.back        { transform: rotateY(180deg) translateZ(calc(var(--md) * var(--ppm) / 2)); }
.spine-left  { transform: rotateY(-90deg) translateZ(calc(var(--mw) * var(--ppm) / 2)); }
.spine-right { transform: rotateY(90deg)  translateZ(calc(var(--mw) * var(--ppm) / 2)); }
.top         { transform: rotateX(90deg)  translateZ(calc(var(--mh) * var(--ppm) / 2)); }
.bottom      { transform: rotateX(-90deg) translateZ(calc(var(--mh) * var(--ppm) / 2)); }

/* ---------- detail page ---------- */

.detail { width: 100%; }
.detail td { vertical-align: top; padding: 16px; }
.detail-box { width: 300px; text-align: center; }
.detail-box .hint { font-size: 10px; color: #4d5566; margin-top: 12px; }
.overview { color: #a9b3c4; }
.notes { color: #79839a; }
.back { text-align: center; font-size: 10px; }

/* ---------- admin ---------- */

.form { width: 100%; }
.form td { padding: 3px 6px 3px 0; vertical-align: top; }
.form input, .form select { width: 100%; box-sizing: border-box; }

label {
  display: block;
  font-size: 10px;
  color: #79839a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 7px 0 2px;
}

label.check { display: inline-block; text-transform: none; letter-spacing: 0; }

textarea { width: 100%; box-sizing: border-box; }

.admin-table { width: 100%; font-size: 10px; }
.admin-table th {
  text-align: left;
  color: #79839a;
  text-transform: uppercase;
  border-bottom: 1px solid #3c4454;
  padding: 4px 6px;
}
.admin-table td { padding: 5px 6px; border-bottom: 1px dotted #2d3441; }

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 3px;
  border: 1px solid #101318;
}
.dot.on { background: #33ff66; }
.dot.off { background: #3a3f4b; }

.lookup {
  border: 1px dashed #3c4454;
  padding: 8px;
  margin-bottom: 10px;
  background: #15181e;
}

.cand {
  border-bottom: 1px dotted #2d3441;
  padding: 5px 4px;
  cursor: pointer;
}
.cand:hover { background: #262c38; }

.faces { width: 100%; margin-top: 9px; }
.faces td { width: 25%; padding: 5px; vertical-align: top; text-align: center; }
.faces img { max-width: 100%; max-height: 130px; border: 1px solid #3c4454; }
.faces .fname {
  font-size: 9px; text-transform: uppercase; color: #79839a;
  letter-spacing: 1px; margin-bottom: 4px;
}
.faces .noart {
  height: 130px; line-height: 130px; color: #4d5566;
  border: 1px dashed #3c4454; font-size: 10px;
}
.faces input[type="file"] { width: 100%; font-size: 9px; margin-top: 4px; }

/* ---------- footer ---------- */

#footer {
  border-top: 1px solid #3c4454;
  margin-top: 5px;
  padding: 10px 4px 2px;
  text-align: center;
  font-size: 10px;
  color: #66707f;
}

#footer .rule { color: #ff9900; letter-spacing: 2px; margin-bottom: 6px; }

/* ---------- motion & small screens ---------- */

@media (prefers-reduced-motion: reduce) {
  .scene:hover .vhs-box,
  .scene:focus-within .vhs-box { animation-play-state: paused; }
}

@media (max-width: 860px) {
  #page { width: auto; margin: 0 8px; }
  #sidebar { display: none; }
  .detail td { display: block; width: auto; }
}
