:root {
  --bg-1: #090a19;
  --bg-2: #131a36;
  --card: rgba(22, 25, 47, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6f8ff;
  --muted: #b6bddf;
  --primary: #7b66ff;
  --primary-2: #38d3ff;
  --ok: #5de2aa;
  --error: #ff80a4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 8% 10%, #303387 0%, transparent 40%),
    radial-gradient(circle at 92% 86%, #005d86 0%, transparent 44%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

body {
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.page {
  width: min(1220px, 96vw);
  margin: 0 auto;
  padding: 1rem 1rem 0.45rem;
  display: grid;
  gap: 0.9rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(130deg, var(--primary), var(--primary-2));
}

.price-badge {
  margin: 0;
  border-radius: 999px;
  padding: 0.36rem 0.72rem;
  font-size: 0.82rem;
  color: #dfe5ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.33);
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.hero-media {
  padding: 0.8rem;
  display: grid;
  gap: 0;
  min-height: 310px;
}

.media-cover {
  position: relative;
  width: 100%;
  height: 100%;
}

.media-loop {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.33);
}

.meme-caption {
  margin: 0;
  color: #d9e7ff;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 0.45rem;
}

.buy-card {
  padding: 1rem;
  border: 1px solid rgba(56, 211, 255, 0.54);
  background:
    radial-gradient(circle at 15% 0%, rgba(56, 211, 255, 0.2), transparent 42%),
    linear-gradient(140deg, rgba(123, 102, 255, 0.42), rgba(56, 211, 255, 0.23));
  box-shadow: 0 16px 36px rgba(24, 35, 83, 0.42);
}

.card-kicker {
  margin: 0;
  font-size: 0.78rem;
  color: #d0f2ff;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card-note {
  margin: 0.22rem 0 0.6rem;
  color: #e2ebff;
  font-size: 0.9rem;
}

.buy-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: -0.15rem 0 0.55rem;
}

.buy-features span {
  font-size: 0.74rem;
  color: #e4f7ff;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.buy-hint {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
  color: #d6e0ff;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "jokes"
    "articles";
  gap: 1rem;
}

.jokes-card {
  grid-area: jokes;
  padding: 1.2rem;
  border: 1px solid rgba(255, 213, 102, 0.72);
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 214, 100, 0.28), transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(56, 211, 255, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(46, 26, 16, 0.32), rgba(18, 22, 46, 0.6)),
    var(--card);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 220, 120, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.support-card {
  grid-area: auto;
  padding: 0.78rem;
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(330px, 92vw);
  z-index: 25;
  border: 1px solid rgba(56, 211, 255, 0.45);
  box-shadow: 0 18px 42px rgba(8, 15, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.support-card.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.support-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 26;
  width: auto;
  min-width: 138px;
  padding: 0.66rem 0.92rem;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(8, 15, 42, 0.45);
}

.support-launcher.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.support-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1;
  color: #e8f6ff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.24);
  animation: none;
}

.support-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.support-toggle {
  width: 100%;
  margin-top: 0.2rem;
}

.support-mascot {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.5rem;
  align-items: start;
  margin: -0.1rem 0 0.7rem;
  padding: 0.42rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
}

.support-mascot::after {
  content: "↓";
  position: absolute;
  right: 14px;
  bottom: -17px;
  font-size: 1rem;
  color: #9ee8ff;
  text-shadow: 0 0 8px rgba(56, 211, 255, 0.45);
}

.mascot-face {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(123, 102, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.mascot-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mascot-text {
  margin: 0;
  color: #dfe8ff;
  font-size: 0.79rem;
  line-height: 1.3;
}

.support-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.3s ease, opacity 0.22s ease, transform 0.22s ease;
}

.support-content.open {
  max-height: 70vh;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.55rem;
  overflow: auto;
}

.articles {
  grid-area: articles;
  padding: 0.9rem;
}

.wheel-head p {
  margin: 0.22rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.wheel-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.8rem;
  align-items: center;
}

.wheel-wrap {
  width: 100%;
  display: grid;
  place-items: center;
  position: relative;
}

.wheel-frame {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08), 0 10px 28px rgba(23, 25, 51, 0.7);
}

.wheel-glow {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: conic-gradient(from 20deg, rgba(123, 102, 255, 0.75), rgba(56, 211, 255, 0.15), rgba(123, 102, 255, 0.75));
  filter: blur(8px);
  opacity: 0.55;
  animation: spinGlow 8s linear infinite;
  z-index: 0;
}

.wheel-wrap canvas {
  width: 182px;
  height: 182px;
  position: relative;
  z-index: 1;
}

.wheel-pointer {
  position: absolute;
  top: -6px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 18px solid #ffffff;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
  z-index: 2;
}

.articles-grid {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jokes-block {
  margin-top: 0.7rem;
  border-radius: 18px;
  padding: 0.9rem;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 210, 96, 0.18), transparent 36%),
    rgba(8, 14, 36, 0.58);
  border: 1px solid rgba(255, 239, 186, 0.35);
}

.jokes-head {
  margin: 0 0 0.5rem;
  padding: 0.8rem 0.95rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 222, 140, 0.3);
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 215, 112, 0.16), transparent 46%),
    linear-gradient(120deg, rgba(32, 24, 56, 0.44), rgba(18, 26, 56, 0.3));
}

.jokes-kicker {
  margin: 0 0 0.38rem;
  display: block;
  width: fit-content;
  color: #ffe79f;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 222, 129, 0.1);
  border: 1px solid rgba(255, 222, 129, 0.26);
  animation: kickerPulse 3.4s ease-in-out infinite;
}

.jokes-title {
  margin: 0 0 0.36rem;
  font-size: clamp(1.42rem, 2.9vw, 2rem);
  letter-spacing: 0.02em;
  line-height: 1.08;
  text-transform: uppercase;
  color: #ffe7a5;
  text-shadow:
    0 0 12px rgba(255, 211, 95, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.3);
}

.jokes-hook {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #edf6ff;
  line-height: 1.4;
  max-width: 820px;
}

.jokes-prize {
  margin: 0.1rem 0 0.45rem;
  color: #ffe6a8;
  font-size: 1.02rem;
  font-weight: 700;
}

.jokes-hint {
  margin: 0.1rem 0 0.45rem;
  color: #dce7ff;
  font-size: 0.9rem;
}

#joke-pop-btn {
  width: fit-content;
  padding: 0.58rem 0.9rem;
  font-size: 0.84rem;
}

.jokes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.jokes-list-panel {
  margin-top: 0.5rem;
  padding: 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 11, 29, 0.52);
  display: none;
}

.jokes-list-panel.open {
  display: block;
}

.jokes-list-title {
  margin: 0 0 0.4rem;
  font-size: 0.86rem;
  color: #dbe7ff;
}

.jokes-list {
  display: grid;
  gap: 0.36rem;
  max-height: 180px;
  overflow: auto;
  padding-right: 0.2rem;
}

.jokes-list-item {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #eff4ff;
  font-size: 0.81rem;
  line-height: 1.35;
  animation: none;
}

.jokes-list-item:hover {
  border-color: rgba(56, 211, 255, 0.42);
  background: rgba(56, 211, 255, 0.12);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.11);
  color: #f0f5ff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  animation: none;
}

.ghost-btn:hover {
  background: rgba(56, 211, 255, 0.18);
  border-color: rgba(56, 211, 255, 0.45);
}

.joke-add-form {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.45rem;
}

.joke-add-form input {
  font-size: 0.83rem;
}

.jokes-top {
  margin: 0.22rem 0 0.36rem;
  color: #ffe3a1;
  font-size: 0.9rem;
  line-height: 1.35;
}

.jokes-popups {
  position: relative;
  min-height: 185px;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(22, 30, 66, 0.18) 0%, rgba(15, 20, 44, 0.44) 100%);
}

.joke-popup {
  position: absolute;
  max-width: min(360px, 92%);
  padding: 0.62rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(130deg, rgba(123, 102, 255, 0.28), rgba(56, 211, 255, 0.2));
  color: #eff4ff;
  font-size: 0.87rem;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  bottom: 0;
  animation: jokeRiseIn 0.4s ease;
  transition: bottom 0.34s ease, opacity 0.22s ease;
  display: grid;
  gap: 0.35rem;
}

.joke-popup.fading {
  animation: jokeRiseOut 0.32s ease forwards;
}

.joke-popup.top {
  border-color: rgba(255, 212, 82, 0.86);
  background: linear-gradient(130deg, rgba(255, 206, 92, 0.36), rgba(255, 154, 64, 0.24));
  box-shadow: 0 12px 26px rgba(255, 198, 88, 0.28);
}

.joke-vote-btn {
  width: fit-content;
  padding: 0.24rem 0.5rem;
  font-size: 0.74rem;
  animation: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.joke-vote-btn:hover {
  background: rgba(56, 211, 255, 0.3);
}

.seo-item {
  display: grid;
  gap: 0.16rem;
  padding: 0.46rem 0.55rem;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.seo-item strong {
  font-size: 0.82rem;
  color: #eaf0ff;
  line-height: 1.25;
}

.seo-item span {
  font-size: 0.74rem;
  color: #b8c1e0;
  line-height: 1.35;
}

.seo-item:hover {
  border-color: rgba(56, 211, 255, 0.45);
  background: rgba(56, 211, 255, 0.08);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form {
  display: grid;
  gap: 0.5rem;
}

label {
  font-size: 0.87rem;
  color: #dfe5ff;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 23, 0.7);
  color: var(--text);
  padding: 0.7rem 0.75rem;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(56, 211, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(56, 211, 255, 0.2);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.consent-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: #5cc9ff;
}

.consent-row a {
  color: #d8f1ff;
}

.consent-row a:hover {
  color: #ffffff;
}

button {
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #0f1224;
  font-weight: 800;
  padding: 0.76rem;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
  background-size: 180% 180%;
  animation: gradientPulse 4.8s ease infinite;
}

button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.status {
  margin: 0.5rem 0 0;
  min-height: 1.2rem;
  color: var(--muted);
  font-size: 0.87rem;
}

.status.ok {
  color: var(--ok);
}

.status.error {
  color: var(--error);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 10, 0.62);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.prize-modal {
  width: min(420px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(165deg, rgba(24, 22, 44, 0.98), rgba(14, 18, 36, 0.98));
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.modal-kicker {
  margin: 0 0 0.35rem;
  color: #aacdff;
  font-size: 0.8rem;
}

.prize-modal h3 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-text {
  margin: 0.4rem 0 0.8rem;
  color: #c5cbea;
  line-height: 1.48;
}

.prize-modal button {
  width: 100%;
  margin-top: 0;
}

.legal-footer {
  width: min(1220px, 95vw);
  margin: 0 auto;
  padding: 0.35rem 0 0.9rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--muted);
}

.legal-footer a {
  color: #d2dbff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(210, 219, 255, 0.45);
}

.legal-footer a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

@keyframes gradientPulse {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes kickerPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.88;
    text-shadow: 0 0 0 rgba(255, 211, 95, 0);
  }
  50% {
    transform: scale(1.025);
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 211, 95, 0.34);
  }
}

@keyframes jokeRiseIn {
  from {
    opacity: 0;
    transform: translateY(48px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes jokeRiseOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-42px) scale(0.96);
  }
}

@keyframes spinGlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .page {
    gap: 0.75rem;
    padding: 0.8rem;
  }

  .top {
    flex-wrap: wrap;
  }

  .hero,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .main-grid {
    grid-template-areas:
      "jokes"
      "articles";
  }

  .support-card {
    position: static;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .support-launcher {
    display: none;
  }

  h1 {
    font-size: clamp(1.72rem, 8vw, 2.35rem);
  }

  .hero-media {
    min-height: auto;
  }

  .media-loop {
    max-height: 220px;
  }

  .wheel-layout {
    grid-template-columns: 1fr;
  }

  .wheel-frame {
    width: 214px;
    height: 214px;
  }

  .wheel-wrap canvas {
    width: 194px;
    height: 194px;
  }

  .legal-footer {
    justify-content: flex-start;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .joke-add-form {
    grid-template-columns: 1fr;
  }
}
