* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 13px;
  color: #111;
  background-color: #2b0a4d;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px),
    repeating-linear-gradient(-45deg, rgba(0,255,200,.08) 0 10px, transparent 10px 20px);
  cursor: crosshair;
}

a { color: #0000ee; }
a:visited { color: #551a8b; }
a:hover { color: #ff0000; background: #ffff00; }

.tiny { font-size: 10px; }
.center { text-align: center; }

.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.rainbow {
  font-family: "Comic Sans MS", "Comic Sans", cursive;
  background: linear-gradient(90deg, red, orange, yellow, lime, cyan, blue, violet, red);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slide 3s linear infinite;
  text-shadow: none;
}
@keyframes slide { to { background-position: 200% 0; } }

/* splash */
#splash {
  position: fixed; inset: 0; z-index: 1000;
  background: #000 radial-gradient(circle at 50% 40%, #3a0070, #000 70%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #0f0;
  font-family: "Courier New", monospace;
}
#splash h1 { font-size: 3rem; margin: 0 0 10px; }
.splash-box { padding: 20px; max-width: 460px; }
.bar { border: 2px inset #888; height: 22px; background: #111; margin: 10px 0; }
#splash-bar { height: 100%; width: 0; background: repeating-linear-gradient(90deg, #0f0 0 10px, #060 10px 12px); }
#splash a { color: #0ff; }

/* top bar */
#topbar {
  background: #000; color: #0f0; font-size: 11px; padding: 4px 10px;
  font-family: "Courier New", monospace; text-align: center;
}
#topbar a { color: #ff0; }

/* header */
header { text-align: center; padding: 14px 10px 0; }
.logo-wrap { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  letter-spacing: 2px;
  color: #ff2bd6;
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 #00e5ff, 8px 8px 0 #000;
  transform: rotate(-2deg);
}
.logo span { color: #39ff14; }
.logo small { font-size: .35em; color: #ffe600; }
.spin-badge {
  position: relative; isolation: isolate;
  display: flex; align-items: center; justify-content: center;
  width: 84px; height: 84px; text-align: center;
  font: 22px/1 Impact, "Arial Black", sans-serif; letter-spacing: 1px;
  color: #d00000; -webkit-text-stroke: 3px #fff; paint-order: stroke fill;
  text-shadow: 2px 2px 0 #000;
}
.spin-badge::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: #ff0; border: 4px dashed #f00; animation: spin 4s linear infinite;
}
.spin-badge.right { color: #ffe600; -webkit-text-stroke-color: #000; }
.spin-badge.right::before { background: #f00; border-color: #ff0; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.tagline {
  font-family: "Comic Sans MS", "Comic Sans", cursive; font-size: 1.3rem;
  color: #fff; text-shadow: 2px 2px #000; margin: 10px 0;
}
.tagline a { color: #ff0; }

.marquee {
  overflow: hidden; white-space: nowrap; background: #000; color: #ff0;
  border-top: 3px double #f0f; border-bottom: 3px double #f0f;
  font: bold 14px "Courier New", monospace; padding: 5px 0;
}
.marquee span { display: inline-block; padding-left: 100%; animation: scroll 28s linear infinite; }
@keyframes scroll { to { transform: translateX(-100%); } }

/* nav + buttons */
nav { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 10px; background: linear-gradient(#444, #000); }
.btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font: bold 13px Arial, sans-serif; color: #fff; padding: 8px 14px;
  border: 1px solid #0a4a00; border-radius: 6px;
  background: linear-gradient(#8dff5c 0%, #2fb800 50%, #1f8a00 51%, #46d800 100%);
  text-shadow: 0 -1px 0 rgba(0,0,0,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 3px rgba(0,0,0,.6);
}
.btn:hover { color: #fff; background: linear-gradient(#ffd25c, #ff8c00 50%, #d96d00 51%, #ffb000); }
.btn:active { transform: translateY(1px); }
.btn.small { padding: 4px 10px; font-size: 11px; }
.cart-btn { background: linear-gradient(#ff7ad8, #e0009f 50%, #b00080 51%, #ff2bd6); border-color: #600048; }

.construction {
  background: repeating-linear-gradient(45deg, #ffe600 0 14px, #000 14px 28px);
  color: #fff; text-align: center; font: bold 13px Arial, sans-serif; padding: 6px;
  text-shadow: 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000;
}

/* layout */
#layout {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) 170px;
  gap: 12px; padding: 12px; max-width: 1100px; margin: 0 auto;
}
aside, main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.box {
  background: #fff8dc; border: 3px outset #c0c0c0; padding: 10px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5);
}
.box h3, .box h2 {
  margin: -10px -10px 10px; padding: 5px 8px; font-size: 12px;
  background: linear-gradient(90deg, #000, #5a00a8); color: #0ff;
  font-family: "Courier New", monospace; letter-spacing: 1px;
}
.box h2 { font-size: 14px; }
.box h2.rainbow { background: #000; -webkit-background-clip: border-box; background-clip: border-box; color: #ff0; animation: none; text-align: center; font-size: 1.2rem; }
.welcome h2.rainbow { color: #0ff; }
.big { font-size: 40px; }

#login label { display: block; margin-top: 4px; }
#login input { width: 100%; }
input[type=text], input[type=password] { font: 12px Verdana, sans-serif; padding: 3px; border: 2px inset #999; }
.menu { list-style: square; margin: 0; padding-left: 18px; line-height: 1.8; }

.counter {
  background: #000; color: #f00; font: bold 22px "Courier New", monospace;
  letter-spacing: 4px; padding: 4px; border: 3px inset #888;
}
.badge {
  background: linear-gradient(#fff, #bdbdbd); border: 2px solid #060; color: #060;
  font-weight: bold; padding: 6px; border-radius: 4px;
}
.poll { display: block; text-align: left; font-size: 11px; margin: 2px 0; }

/* products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.product {
  border: 2px ridge #888; background: #fff; padding: 8px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.product .pic {
  display: flex; align-items: center; justify-content: center;
  background: #c0c0c0; border: 2px inset #fff; padding: 6px;
}
.icon { width: 128px; max-width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.product h4 { margin: 0; font-size: 13px; color: #00c; text-decoration: underline; }
.product .desc { font-size: 10px; color: #555; flex: 1; }
.price { font: bold 16px Arial, sans-serif; color: #c00; }
.price s { color: #888; font-weight: normal; font-size: 12px; }
.sale { background: #f00; color: #ff0; font: bold 10px Arial, sans-serif; padding: 2px 4px; align-self: center; transform: rotate(-3deg); }
.stars { color: #f5a000; letter-spacing: 1px; }

/* ranking */
.ranking { margin: 8px 0 0; padding-left: 28px; }
.ranking li { padding: 5px 0; border-bottom: 1px dotted #999; }
.ranking li span.n { display: inline-block; min-width: 52px; font-weight: bold; color: #060; }
.vote {
  cursor: pointer; margin-left: 4px; font: bold 11px Arial, sans-serif;
  border: 1px solid #666; background: linear-gradient(#fff, #ccc); border-radius: 3px;
}
.vote:hover { background: #ff0; }

/* reviews + guestbook */
.review { border-bottom: 1px dashed #999; padding: 6px 0; }
.review b { color: #00c; }
.review q { display: block; font-style: italic; margin-top: 2px; }
#board-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
#board-form input { flex: 1 1 200px; min-width: 0; }
.post { background: #fff; border: 1px solid #aaa; padding: 5px 8px; margin-bottom: 4px; font-family: "Comic Sans MS", cursive; overflow-wrap: anywhere; }
.post b { color: #00c; }

/* ads */
.ad {
  text-align: center; padding: 14px 8px; font: 12px Arial, sans-serif; color: #fff;
  border: 3px ridge #fff; cursor: pointer; box-shadow: 4px 4px 0 rgba(0,0,0,.5);
}
.ad b { font-size: 14px; }
.ad1 { background: linear-gradient(135deg, #ff0066, #ff9900); animation: pulse 1s infinite alternate; }
.ad2 { background: linear-gradient(135deg, #6a00ff, #ff00c8); }
.ad3 { background: linear-gradient(135deg, #007a00, #00d0a0); }
.ad4 { background: linear-gradient(135deg, #000, #444); color: #0f0; font-family: "Courier New", monospace; }
@keyframes pulse { to { transform: scale(1.04) rotate(1deg); } }

footer { text-align: center; color: #fff; padding: 16px 10px 30px; background: #000; border-top: 4px ridge #f0f; }

/* modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 12px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; background: #ece9d8; border: 3px outset #fff; padding: 18px; width: min(460px, 100%); max-height: 90vh; overflow: auto; text-align: center; }
.modal-box h2 { margin-top: 0; font-family: "Comic Sans MS", cursive; }
.popup-box { background: linear-gradient(#fff, #ffd6f7); border-color: #f0f; }
.x { position: absolute; top: 4px; right: 4px; font: bold 12px Arial; background: #c00; color: #fff; border: 2px outset #f88; cursor: pointer; }
.cart-row { display: flex; justify-content: space-between; border-bottom: 1px dotted #888; padding: 4px 0; text-align: left; gap: 8px; }
.total { font-size: 16px; }
.err { color: #c00; font-weight: bold; min-height: 1.2em; }

.coupon { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 10px 0 4px; }
.cart-row.discount { color: #060; font-weight: bold; }
.reg label { display: block; text-align: left; margin-top: 6px; }
.reg label.poll { margin: 8px 0; }
.reg input[type=text], .reg input[type=password] { width: 100%; }
.reg .btn { margin-top: 6px; }

.code-box { width: min(680px, 100%); padding: 0; border: 6px ridge #ff0; background: #000; }
.code-burst { padding: 34px 18px 24px; background: repeating-conic-gradient(from 0deg at 50% 45%, #ff1a75 0 8deg, #ffe600 8deg 16deg); }
.code-small { display: inline-block; margin: 0 0 10px; padding: 3px 10px; background: #000; color: #fff; font: bold 16px "Courier New", monospace; }
.code-box h2.code-big {
  margin: 0 0 18px; font: clamp(1.9rem, 7vw, 2.9rem)/1.15 Impact, "Arial Black", sans-serif;
  color: #fff; -webkit-text-stroke: 2px #000; paint-order: stroke fill; text-shadow: 4px 4px 0 #000;
  animation: pulse 0.8s infinite alternate;
}
.code-big span { color: #39ff14; }
.code-big span + span { color: #00e5ff; }
.big-btn { font-size: 20px; padding: 14px 22px; }
.code-burst .tiny { color: #000; background: #fff; display: inline-block; padding: 2px 6px; margin-top: 12px; }

.ad-yt { position: relative; display: block; padding: 8px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #c00000, #ff6a00); }
.ad-yt:visited { color: #fff; }
.ad-yt:hover { color: #ff0; background: linear-gradient(135deg, #6a00ff, #c00000); }
.ad-yt img { display: block; width: 100%; height: auto; margin-bottom: 6px; border: 2px solid #fff; }
.ad-yt b { font-size: 12px; line-height: 1.3; display: inline-block; }
.ad-tag { position: absolute; top: 2px; right: 2px; z-index: 1; background: #ff0; color: #000; font: bold 9px Arial, sans-serif; padding: 1px 4px; }

.social-box { border-color: #6a00ff; }
.social-line { margin: 6px 0 14px; font: bold 1.5rem/1.3 "Comic Sans MS", "Comic Sans", cursive; }
.social-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.socials a { color: #0ff; }

.wide { max-width: 820px; margin: 0 auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.recipe ul { list-style: square; padding-left: 22px; line-height: 1.7; margin: 6px 0; }
.recipe ol { padding-left: 22px; line-height: 1.7; margin: 6px 0; }
.recipe .meta { font: bold 11px "Courier New", monospace; color: #800080; margin: 0 0 6px; }
.recipe h4 { margin: 10px 0 0; color: #c00; text-decoration: underline; }
.recipe .joke { font-family: "Comic Sans MS", "Comic Sans", cursive; color: #555; }

@media (prefers-reduced-motion: reduce) {
  .code-box h2.code-big, .spin-badge::before { animation: none; }
}

@media (max-width: 800px) {
  #layout { grid-template-columns: 1fr; }
  aside.right { flex-direction: row; flex-wrap: wrap; }
  aside.right > * { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .blink, .rainbow, .spin-badge, .marquee span, .ad1 { animation: none; }
}
