/* Pedovka Awards — специально максимально всрато */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  font-size: 18px;
  color: #fff;
  background-color: #12001f;
  background-image:
    radial-gradient(#ffe600 1.5px, transparent 2px),
    radial-gradient(#ff5a00 1.5px, transparent 2px),
    radial-gradient(#7fd4ff 1px, transparent 1.5px);
  background-size: 90px 90px, 130px 130px, 50px 50px;
  background-position: 0 0, 40px 60px, 20px 10px;
  animation: stars 30s linear infinite;
  overflow-x: hidden;
}
@keyframes stars {
  to { background-position: 0 900px, 40px 1360px, 20px 510px; }
}

.ticker {
  display: block;
  background: #ffe600;
  color: #d40000;
  font-weight: bold;
  padding: 6px 0;
  border-bottom: 4px dashed #ff00d0;
  text-shadow: 1px 1px 0 #fff;
}

/* ------------------------------------------------ шапка */
header { text-align: center; padding: 26px 10px 8px; }

.logo-wrap { display: inline-block; animation: wobble 2.4s ease-in-out infinite; }
.logo {
  image-rendering: pixelated;
  width: 256px; max-width: 70vw; height: auto;
  border-radius: 50%;
  box-shadow: 0 0 30px 8px #ff5a00, 0 0 70px 20px #ffe60066;
}
@keyframes wobble {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.07); }
}

.wordart {
  margin: 16px 0 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(44px, 11vw, 120px);
  line-height: .95;
  letter-spacing: 2px;
  transform: skew(-8deg) scaleY(1.15);
}
.wordart span {
  display: inline-block;
  background: linear-gradient(#ffe600, #ff5a00 55%, #ff00d0);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  filter: drop-shadow(4px 4px 0 #0033ff) drop-shadow(8px 8px 0 #000);
  animation: jump 1.2s ease-in-out infinite;
}
.wordart span:nth-child(2n) { animation-delay: .15s; }
.wordart span:nth-child(3n) { animation-delay: .3s; }
.wordart span:nth-child(5n) { animation-delay: .45s; }
@keyframes jump { 50% { transform: translateY(-9px) rotate(3deg); } }

.sub { font-size: 22px; color: #7fffd4; text-shadow: 2px 2px 0 #ff00d0; margin: 22px 0 10px; }
.blink { animation: blink 1s steps(1) infinite; color: #ff0000; }
@keyframes blink { 50% { visibility: hidden; } }

.phase {
  display: inline-block;
  margin: 6px 0 14px;
  padding: 8px 18px;
  background: #00ff3c;
  color: #000;
  font-weight: bold;
  border: 4px ridge #ff00d0;
  transform: rotate(-2deg);
}

.auth { margin: 6px 0 18px; }
.twitch-btn {
  display: inline-block;
  padding: 12px 26px;
  background: #9146ff; color: #fff;
  font-size: 24px; font-weight: bold; text-decoration: none;
  border: 5px outset #d3b5ff;
  box-shadow: 6px 6px 0 #000, 0 0 24px #9146ff;
  animation: pulse 1s ease-in-out infinite;
}
.twitch-btn:hover { background: #ff00d0; }
.twitch-btn:active { border-style: inset; }
.twitch-btn:focus-visible { outline: 3px solid #ffe600; outline-offset: 3px; }
@keyframes pulse { 50% { transform: scale(1.06) rotate(-1deg); } }
.auth-hint { margin: 12px 0 0; font-size: 15px; color: #ffe600; }
.auth-user {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  background: #c0c0c0; color: #000;
  border: 3px outset #fff;
  box-shadow: 5px 5px 0 #9146ff;
}
.avatar { border-radius: 50%; border: 3px solid #9146ff; }
.auth-name { font-weight: bold; overflow-wrap: anywhere; }

.construction {
  background: repeating-linear-gradient(45deg, #ffe600 0 24px, #000 24px 48px);
  color: #fff;
  text-align: center;
  font-weight: bold;
  padding: 8px;
  text-shadow: 0 0 4px #000, 2px 2px 0 #000, -2px -2px 0 #000;
  border-block: 3px solid #fff;
}

/* ------------------------------------------------ окошки-номинации */
main { max-width: 1180px; margin: 0 auto; padding: 28px 14px; }

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 30px 26px;
  align-items: start;
}

.win {
  background: #c0c0c0;
  color: #000;
  border: 3px outset #fff;
  box-shadow: 8px 8px 0 #000, 8px 8px 0 3px #ff00d0;
}
.cats .win:nth-child(3n+1) { transform: rotate(-1.4deg); }
.cats .win:nth-child(3n+2) { transform: rotate(1.1deg); }
.cats .win:nth-child(4n)   { transform: rotate(-.6deg); background: #ffd9f6; }
.cats .win:nth-child(5n)   { background: #d9fff0; }
.cats .win:nth-child(7n)   { background: #fff7b0; }

.win-title {
  display: flex; justify-content: space-between; gap: 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff; font-weight: bold;
  padding: 5px 8px;
  font-family: Tahoma, Verdana, sans-serif; font-size: 15px;
}
.cats .win:nth-child(2n) .win-title { background: linear-gradient(90deg, #d40000, #ff5a00); }
.cats .win:nth-child(3n) .win-title { background: linear-gradient(90deg, #6a00a8, #ff00d0); }
.win-title span:first-child { overflow-wrap: anywhere; }
.win-btns { white-space: nowrap; letter-spacing: 3px; }
.win-body { padding: 12px; }

.cat-name {
  margin: 0 0 10px;
  font-size: 25px; line-height: 1.1;
  color: #d40000;
  text-shadow: 2px 2px 0 #ffe600;
  overflow-wrap: anywhere;
}

.list { list-style: none; margin: 0 0 10px; padding: 0; }
.list li {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px;
  border-bottom: 1px dotted #555;
}
.list li.mine { background: #00ff3c; font-weight: bold; }
.list li.winner { background: #ffe600; font-size: 21px; font-weight: bold; }
.list .nm { flex: 1; overflow-wrap: anywhere; }
.list .cnt {
  min-width: 34px; text-align: center;
  background: #000; color: #00ff3c;
  font-family: "Courier New", monospace; font-weight: bold;
  padding: 1px 5px;
}
.empty { color: #555; font-style: italic; margin: 0 0 10px; }

.row { display: flex; gap: 6px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 140px; }

input {
  font: inherit; font-size: 16px;
  padding: 6px 8px;
  border: 3px inset #fff;
  background: #fff; color: #000;
}
button {
  font: inherit; font-size: 15px; font-weight: bold;
  padding: 5px 10px;
  background: #c0c0c0; color: #000;
  border: 3px outset #fff;
  cursor: pointer;
}
button:hover { background: #ffe600; }
button:active { border-style: inset; }
button:focus-visible, input:focus-visible { outline: 3px solid #ff00d0; outline-offset: 2px; }
button.small { padding: 1px 8px; font-size: 14px; }
button.on { background: #00ff3c; border-style: inset; }
button.danger { background: #ff8a8a; }

.suggest { margin-top: 44px; transform: rotate(.5deg); }
.suggest .list { margin-top: 12px; }

/* ------------------------------------------------ подвал */
footer {
  text-align: center;
  padding: 20px 10px 50px;
  color: #ffe600;
  border-top: 4px double #ff00d0;
}
.counter {
  font-family: "Courier New", monospace; font-weight: bold;
  background: #000; color: #00ff3c;
  padding: 2px 8px; border: 2px inset #888; letter-spacing: 4px;
}
.tiny { font-size: 13px; color: #b9a6d6; }

.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: #ff0000; color: #fff; font-weight: bold;
  border: 4px ridge #ffe600;
  padding: 10px 18px;
  max-width: 90vw;
  display: none;
  z-index: 10;
}
.toast.ok { background: #008a20; }
.toast.show { display: block; }

/* ------------------------------------------------ админка */
.admin main { max-width: 900px; }
.admin .win { margin-bottom: 24px; }
.admin h2 { margin: 0 0 8px; font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  body, .logo-wrap, .wordart span, .blink, .twitch-btn { animation: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .cats .win { transform: none !important; }
}
