:root {
  --tan: #FBFCD4;
  --red: #D1120F;
  --accent: #A7F3CE;
  --ink: #000000;
  --paper: #fffdf0;
  --shadow: #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #FBFCD4;
  color: #000000;
  font-family: "VT323", monospace;
  font-size: 20px;
  line-height: 1.4;
}

body.sparkle {
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.6) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.6) 0 2px, transparent 3px);
  background-size: 32px 32px, 32px 32px, 120px 120px, 140px 140px;
}

a {
  color: var(--red);
  text-decoration: none;
}

a:hover {
  background: var(--accent);
  color: var(--ink);
}

.page {
  max-width: 1200px;
  margin: 14px auto 40px;
  padding: 0 16px;
}

/* banner + car */
.banner {
  background: var(--paper);
  border: 4px solid var(--red);
  padding: 0;
  box-shadow: 6px 6px 0 var(--accent);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  overflow: hidden;
}

.banner > img {
  width: 100%;
  display: block;
  margin-top: -48px;
}

.race-track {
  --trail-length: 1250px;
  position: relative;
  height: 70px;
  width: 100%;
  max-width: none;
  overflow: hidden;
}

.racecar {
  position: absolute;
  top: 60%;
  left: -30%;
  transform: translateY(-50%);
  animation: race-loop 7s linear infinite;
}

.racecar img {
  height: 56px;
  width: auto;
  margin-top: 0 !important;
}

.racecar .trail {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: var(--trail-length);
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    #ff0070 0% 14%,
    #ff7a00 14% 28%,
    #ffe000 28% 42%,
    #00d05f 42% 56%,
    #00a8ff 56% 70%,
    #8c52ff 70% 84%,
    #ff7ad9 84% 100%
  );
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.45);
}

@keyframes race-loop {
  0% { left: -50%; }
  100% { left: calc(100% + var(--trail-length)); }
}

@media (prefers-reduced-motion: reduce) {
  .racecar { animation: none; left: 50%; transform: translate(-50%, -50%); }
}

/* smoke puffs */
.racecar .smoke {
  position: absolute;
  right: calc(100% + 6px);
  top: 32%;
  width: 20px;
  height: 20px;
  background: rgba(230,230,230,0.95);
  border-radius: 50%;
  filter: blur(0.3px);
  animation: smoke-puff 0.9s ease-out infinite;
  z-index: 2;
}

.racecar .puff-2 {
  width: 16px;
  height: 16px;
  background: rgba(220,220,220,0.9);
  right: calc(100% + 2px);
  top: 30%;
  opacity: 0.9;
  animation-delay: 0.15s;
}

.racecar .puff-3 {
  width: 12px;
  height: 12px;
  background: rgba(210,210,210,0.85);
  right: calc(100% - 2px);
  top: 34%;
  opacity: 0.85;
  animation-delay: 0.3s;
}

@keyframes smoke-puff {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(-16px,-8px) scale(1.5); opacity: 0; }
}

.columns {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 16px;
  margin-top: 16px;
}

.side {
  align-self: start;
  position: sticky;
  top: 14px;
}

.box {
  background: var(--paper);
  border: 3px solid var(--red);
  padding: 23px;
  margin-bottom: 12px;
  box-shadow: 4px 4px 0 var(--accent);
}

.box h3 {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  margin-bottom: 8px;
  color: #33748F;
}

.box p {
  font-size: 18px;
}

.nav-list {
  list-style: none;
}

.nav-list li {
  margin: 6px 0;
}

.nav-list a {
  display: inline-block;
  padding: 2px 4px;
  border-bottom: 2px dotted var(--accent);
}

/* left nav buttons */
.side.left .nav-list a {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  border: 2px solid var(--red);
  color: #fff;
  background: linear-gradient(180deg, rgba(209,18,15,0.95) 0%, rgba(145,10,8,0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  border-bottom: none;
}

.side.left .nav-list a:hover {
  background: linear-gradient(180deg, rgba(209,18,15,1) 0%, rgba(120,8,7,1) 100%);
  color: #fff;
}

.ticker {
  border: 2px dashed var(--red);
  background: #fff;
  overflow: hidden;
  padding: 4px 0;
}

.ticker span {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker 14s linear infinite;
  color: var(--red);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.center .panel {
  background: var(--paper);
  border: 3px solid var(--red);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 6px 6px 0 var(--accent);
}

.center h1,
.center h2 {
  font-family: "Press Start 2P", cursive;
  color: #33748F;
  margin-bottom: 8px;
}

.center h1 { font-size: 20px; }
.center h2 { font-size: 14px; }

.center .welcome-title {
  color: #D1120F !important;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.badge {
  background: var(--accent);
  border: 2px solid var(--red);
  padding: 2px 6px;
  font-size: 16px;
}

.pixel-btn {
  background: var(--accent);
  border: 2px solid var(--red);
  font-family: "Press Start 2P";
  font-size: 10px;
  padding: 6px 8px;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--red);
}

.pixel-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--red);
}

.tiny-btn {
  background: var(--accent);
  border: 2px solid var(--red);
  font-family: "Press Start 2P";
  font-size: 9px;
  padding: 4px 6px;
  cursor: pointer;
}

.show-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.show-list li {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dotted var(--accent);
}

.show-list .show-date {
  font-weight: 700;
  color: var(--red);
}

.show-list .show-link {
  text-align: right;
}

.logo-box img {
  width: 100%;
  height: auto;
  margin-bottom: 6px;
}

.guestbook-entries {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.guest-entry {
  border: 2px dashed var(--accent);
  padding: 6px;
  background: #fff;
  position: relative;
  padding-bottom: 28px;
}

.guest-meta {
  color: var(--red);
  font-size: 16px;
}

.audio-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.note {
  font-size: 16px;
  color: var(--ink);
}

.album-year img {
  width: 100%;
  border: 2px solid var(--red);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.album-card {
  border: 3px solid var(--red);
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 4px 4px 0 var(--accent);
}

.album-head {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}

.album-head img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border: 2px solid var(--red);
}

.album-meta .tag {
  color: var(--red);
  font-size: 16px;
}

.album-meta .price-note {
  color: var(--ink);
  font-size: 16px;
}

details {
  margin-top: 10px;
  border-top: 2px dashed var(--accent);
  padding-top: 8px;
}

details summary {
  cursor: pointer;
  color: var(--red);
}

.tracklist {
  list-style: decimal;
  margin: 8px 0 0 18px;
  display: grid;
  gap: 6px;
}

.track-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.merch-card {
  border: 3px solid var(--red);
  background: #fff;
  padding: 10px;
  box-shadow: 4px 4px 0 var(--accent);
}

.merch-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 2px solid var(--red);
}

.merch-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.forum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.forum-list {
  display: grid;
  gap: 10px;
}

.post-card {
  border: 2px dashed var(--accent);
  padding: 8px;
  background: #fff;
}

.post-title {
  color: var(--red);
  margin-bottom: 2px;
}

.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.1;
  margin-top: 0;
}

.post-meta {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.1;
}

.emoji-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.emoji-btn {
  background: #fff;
  border: 2px solid var(--red);
  padding: 2px 6px;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 2px solid var(--red);
}

.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--red);
  font-size: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal.open {
  display: flex;
}

.modal-card {
  background: #fff;
  border: 3px solid var(--red);
  padding: 14px;
  max-width: 520px;
  width: 100%;
  box-shadow: 6px 6px 0 var(--accent);
}

.modal-card h3 {
  font-family: "Press Start 2P";
  font-size: 14px;
  margin-bottom: 8px;
  color: #33748F;
}

.modal-close {
  float: right;
  background: var(--accent);
  border: 2px solid var(--red);
  padding: 2px 6px;
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  font-family: "VT323";
  font-size: 18px;
  border: 2px solid var(--red);
  padding: 6px;
  background: #fff;
  color: #000;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

label {
  display: block;
  margin: 8px 0 4px;
  color: var(--red);
}

.comment-wrap {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 2px dashed var(--accent);
}

.comment {
  padding: 4px 0;
  border-bottom: 1px dotted var(--accent);
  font-size: 16px;
}

.comment-meta {
  color: var(--red);
  font-size: 14px;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 6px;
}

.comment-form input {
  font-size: 16px;
}

/* delete button base */
.delete-btn {
  border: 2px solid var(--red);
  background: #fff;
  color: var(--red);
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

/* guestbook delete bottom-right */
.guest-entry .delete-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
}

/* forum delete aligned with meta row */
.post-meta-row .delete-btn {
  position: static;
  margin: 0;
  transform: translateY(-1px);
}

@media (max-width: 1000px) {
  .columns { grid-template-columns: 1fr; }
  .side { position: static; }
  .two-col,
  .forum-grid,
  .merch-grid,
  .photo-grid { grid-template-columns: 1fr; }
  .show-list li { grid-template-columns: 1fr; }
}

.comment {
  position: relative;
  padding-right: 28px;
}

.comment .comment-delete {
  position: absolute;
  right: 0;
  top: 0;
}

.comment-emoji-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
