@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&display=swap');

:root {
  --primary: #8b5cf6;
  --primary-dark: #6d28d9;
  --accent: #ffc90e;
  --accent2: #2e9df7;
  --accent3: #f7941d;
  --red: #e4572e;
  --green: #3ddc84;
  --navy: #1b2a4a;
  --bg: #fdfaf5;
  --card-bg: #ffffff;
  --text: #241a35;
  --text-muted: #746a8a;
  --border: #eee0ff;
  --radius: 16px;
  --shadow: 0 4px 14px rgba(139,92,246,0.16), 0 1px 3px rgba(0,0,0,0.04);
  --font-display: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg: #190f26;
  --card-bg: #241a35;
  --text: #f5eefc;
  --text-muted: #b8a9cc;
  --border: #3d2c52;
  --shadow: 0 4px 14px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .2s ease, color .2s ease;
}

h1, h2, h3, .logo, .btn, .spin-name, .big-display .digits, .wheel-result {
  font-family: var(--font-display);
}

/* Per-tool color themes: each utility gets its own primary/accent pair so
   pages feel distinct while sharing the same layout, logo, and typography. */
body[data-tool="namepicker"] { --primary: #2e9df7; --accent3: #8b5cf6; }
body[data-tool="team"]       { --primary: #3ddc84; --accent3: #2e9df7; }
body[data-tool="yesno"]      { --primary: #ff3d81; --accent3: #8b5cf6; }
body[data-tool="dice"]       { --primary: #f7941d; --accent3: #e4572e; }
body[data-tool="coin"]       { --primary: #ffc90e; --accent3: #f7941d; }
body[data-tool="wheel"]      { --primary: #8b5cf6; --accent3: #ff3d81; }
body[data-tool="raffle"]     { --primary: #e4572e; --accent3: #f7941d; }
body[data-tool="santa"]      { --primary: #e4572e; --accent3: #3ddc84; }
body[data-tool="bracket"]    { --primary: #2e9df7; --accent3: #8b5cf6; }
body[data-tool="numbergen"]  { --primary: #8b5cf6; --accent3: #2e9df7; }
body[data-tool="password"]   { --primary: #1b2a4a; --accent3: #2e9df7; }
body[data-tool="timer"]      { --primary: #f7941d; --accent3: #ffc90e; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Party decoration layer (balloons, dice, confetti) injected by main.js */
.party-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.party-decor span {
  position: absolute;
  display: inline-block;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.14));
  animation: partyFloat 7s ease-in-out infinite;
}
.party-decor .b1 { left: 3%; top: 8%; font-size: 2.6rem; animation-duration: 6.5s; }
.party-decor .b2 { left: 92%; top: 12%; font-size: 2.1rem; animation-duration: 8s; animation-delay: 1.2s; }
.party-decor .b3 { left: 6%; top: 52%; font-size: 2rem; animation-duration: 7.2s; animation-delay: 2.4s; }
.party-decor .b4 { left: 94%; top: 60%; font-size: 2.4rem; animation-duration: 6.8s; animation-delay: .6s; }
.party-decor .b5 { left: 2%; top: 84%; font-size: 1.8rem; animation-duration: 7.6s; animation-delay: 1.8s; }
.party-decor .b6 { left: 95%; top: 88%; font-size: 2rem; animation-duration: 6.2s; animation-delay: 3s; }
.party-decor .d1 { left: 8%; top: 30%; font-size: 1.8rem; animation-duration: 5.5s; animation-delay: .3s; }
.party-decor .d2 { left: 90%; top: 40%; font-size: 1.6rem; animation-duration: 6s; animation-delay: 2s; }
.party-decor .c1, .party-decor .c2, .party-decor .c3, .party-decor .c4 {
  width: 10px; height: 14px; border-radius: 3px; opacity: .55;
  animation-name: partySpin; animation-timing-function: linear; animation-iteration-count: infinite;
}
.party-decor .c1 { left: 16%; top: 20%; background: var(--red); animation-duration: 4.2s; }
.party-decor .c2 { left: 80%; top: 15%; background: var(--accent); animation-duration: 5s; animation-delay: .5s; }
.party-decor .c3 { left: 12%; top: 70%; background: var(--accent2); animation-duration: 4.6s; animation-delay: 1s; }
.party-decor .c4 { left: 86%; top: 76%; background: var(--green); animation-duration: 5.4s; animation-delay: 1.4s; }

@keyframes partyFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-22px) rotate(5deg); }
}
@keyframes partySpin {
  0% { transform: rotate(0deg) translateY(0); }
  100% { transform: rotate(360deg) translateY(14px); }
}
@media (max-width: 900px) {
  .party-decor { display: none; }
}

/* Header */
header.site-header {
  background: var(--card-bg);
  border-bottom: 3px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}
.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--primary); }
.logo-img {
  height: 50px;
  width: auto;
  display: block;
  border-radius: 10px;
  transition: transform .2s ease;
}
.logo:hover .logo-img { transform: scale(1.05) rotate(-2deg); }
.footer-logo-img {
  height: 64px;
  width: auto;
  display: block;
  margin: 0 auto 16px;
  border-radius: 14px;
}
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  row-gap: 6px;
  max-width: 640px;
}
nav.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
nav.main-nav a:hover { color: var(--primary); text-decoration: none; }
.header-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 720px) {
  nav.main-nav.links { display: none; flex-direction: column; align-items: flex-start; gap: 14px; position: absolute; top: 64px; left: 0; right: 0; background: var(--card-bg); padding: 16px 20px; border-bottom: 1px solid var(--border); }
  nav.main-nav.links.open { display: flex; }
  .menu-toggle { display: block; }
}

/* Hero (party banner) */
.hero {
  padding: 44px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 50%, var(--accent3) 100%);
  background-size: 200% 200%;
  animation: heroGradient 12s ease infinite;
  border-radius: var(--radius);
  color: #fff;
  margin: 24px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.35) 2px, transparent 2px);
  background-size: 26px 26px;
  opacity: .5;
  pointer-events: none;
}
.hero h1, .hero p, .hero .badge-row, .hero-logo-img { position: relative; z-index: 1; }
.hero-logo-img {
  display: block;
  margin: 0 auto 14px;
  max-width: 260px;
  width: 60%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.hero p {
  color: rgba(255,255,255,0.94);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}
@keyframes heroGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 26px rgba(139,92,246,0.24); border-color: var(--primary); }
.card h3 { margin: 8px 0 6px; font-size: 1.1rem; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin: 0 0 10px; }
.card .icon {
  font-size: 1.8rem;
  display: inline-block;
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 4px;
}
.card:nth-child(6n+1) .icon { background: linear-gradient(135deg,#fff3cd,#ffe28f); }
.card:nth-child(6n+2) .icon { background: linear-gradient(135deg,#d6f0ff,#a9d9ff); }
.card:nth-child(6n+3) .icon { background: linear-gradient(135deg,#ffdcd0,#ffb49c); }
.card:nth-child(6n+4) .icon { background: linear-gradient(135deg,#ede4ff,#d5c1ff); }
.card:nth-child(6n+5) .icon { background: linear-gradient(135deg,#ffe6c2,#ffcd8a); }
.card:nth-child(6n+6) .icon { background: linear-gradient(135deg,#d9ffe4,#aef2c6); }
.card a.btn-link { font-weight: 700; font-size: 0.9rem; }

/* Tool page layout (party banner header) */
.tool-header {
  padding: 28px 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent3) 100%);
  color: #fff;
  text-align: center;
  margin: 24px 0 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tool-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.25) 2px, transparent 2px);
  background-size: 22px 22px;
  opacity: .6;
  pointer-events: none;
}
.tool-header h1 { margin-bottom: 8px; font-size: clamp(1.6rem, 3.5vw, 2.1rem); position: relative; z-index: 1; color: #fff; }
.tool-header p.lede { max-width: 680px; margin: 0 auto; position: relative; z-index: 1; color: rgba(255,255,255,0.94); }

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 24px 0 40px;
}
@media (min-width: 800px) {
  .tool-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
}

.panel {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; font-size: 1.2rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field .hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

input[type="number"], input[type="text"], select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.radio-row, .unit-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.unit-toggle button, .segmented button {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.unit-toggle button.active, .segmented button.active {
  background: linear-gradient(135deg, var(--primary), var(--accent3));
  border-color: var(--primary);
  color: #fff;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent3));
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 8px 20px rgba(139,92,246,0.45); filter: brightness(1.05); }

.results { min-height: 100%; }
.result-hero {
  text-align: center;
  padding: 18px 0;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}
.result-hero .value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
}
.result-hero .label { color: var(--text-muted); font-size: 0.9rem; }

table.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.result-table th, table.result-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
table.result-table tr.highlight td { color: var(--primary); font-weight: 700; }

.ad-slot {
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 24px 0;
}

.content-section { margin: 32px 0; }
.content-section h2 { font-size: 1.3rem; }
.faq-item { margin-bottom: 14px; }
.faq-item h3 { font-size: 1rem; margin: 0 0 4px; }
.faq-item p { margin: 0; color: var(--text-muted); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.related-grid a {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.related-grid a:hover { border-color: var(--primary); text-decoration: none; }

footer.site-footer {
  border-top: 3px solid var(--border);
  margin-top: 60px;
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.footer-grid h4 { color: var(--text); font-size: 0.85rem; margin: 0 0 8px; }
.footer-grid a { display: block; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

.badge-row { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:14px; }
.badge { background: rgba(255,255,255,0.18); border:1px solid rgba(255,255,255,0.4); border-radius:999px; padding:6px 14px; font-size:0.8rem; color: #fff; font-weight: 600; }

/* Picko hub extras */
textarea.list-input {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
textarea.list-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.big-display {
  text-align: center;
  padding: 30px 10px;
}
.big-display .digits {
  font-size: clamp(2.6rem, 9vw, 4.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  letter-spacing: 1px;
}
.timer-controls { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top: 16px; }
.timer-controls button { flex: 1; min-width: 100px; }

.spin-name {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  padding: 30px 10px;
  color: var(--primary);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.name-card-scene { perspective: 500px; }
.spin-name.card {
  background: linear-gradient(145deg, var(--card-bg), var(--bg));
  border: 3px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.spin-name.card.flip-tick { animation: cardFlipTick .28s ease; }
.spin-name.card.winner-pop { animation: winnerPop .5s ease; }
@keyframes cardFlipTick {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}
@keyframes winnerPop {
  0% { transform: scale(0.85) rotateY(90deg); }
  60% { transform: scale(1.08) rotateY(0deg); }
  100% { transform: scale(1) rotateY(0deg); }
}

.reveal-list { display: grid; gap: 10px; }
.reveal-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg);
  cursor: pointer;
  font-weight: 700;
  text-align: center;
  transition: background .15s ease;
}
.reveal-card.revealed { background: var(--card-bg); cursor: default; color: var(--primary); }
.reveal-card .sub { display:block; font-weight: 400; color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

.reveal-card.giftbox {
  background: linear-gradient(135deg, var(--red), #b8390f);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease;
}
.reveal-card.giftbox::before { content: "🎀"; position: absolute; top: 6px; right: 10px; font-size: 1.1rem; }
.reveal-card.giftbox:hover { transform: translateY(-3px) scale(1.02); }
.reveal-card.giftbox .sub { color: rgba(255,255,255,0.85); }
.reveal-card.giftbox.revealed {
  background: linear-gradient(135deg, var(--card-bg), var(--bg));
  color: var(--primary);
  animation: giftOpen .4s ease;
}
.reveal-card.giftbox.revealed::before { content: ""; }
@keyframes giftOpen {
  0% { transform: scale(0.9) rotate(-3deg); }
  60% { transform: scale(1.06) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.bracket { display: flex; gap: 24px; overflow-x: auto; padding: 10px 0; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; min-width: 180px; gap: 14px; }
.bracket-round h4 { text-align:center; font-size: 0.85rem; color: var(--text-muted); margin: 0 0 4px; }
.bracket-match { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bracket-slot {
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.bracket-slot:last-child { border-bottom: none; }
.bracket-slot.winner { background: linear-gradient(135deg, var(--primary), var(--accent3)); color: #fff; }
.bracket-slot.tbd { color: var(--text-muted); font-weight: 400; cursor: default; }

.champion-banner { text-align: center; font-weight: 800; color: var(--primary); min-height: 24px; }
.champion-banner.show { font-size: 1.3rem; animation: trophyPop .5s ease; }
.champion-banner .trophy-icon { font-size: 1.8rem; display: inline-block; animation: trophyBounce 1.2s ease infinite; }
@keyframes trophyPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes trophyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.coin {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(145deg, #ffd54f, var(--accent));
  display: flex; align-items:center; justify-content:center;
  font-weight: 800; font-size: 1.3rem; color: #7c4a03;
  margin: 20px auto; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 4px solid #f0a500;
}

/* Coin flip 3D graphic */
.coin-scene { perspective: 700px; width: 120px; height: 120px; margin: 20px auto; }
.coin-3d {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.coin-face {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2.2rem; font-family: var(--font-display);
  backface-visibility: hidden;
  border: 4px solid var(--navy);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 0 0 4px rgba(255,255,255,0.3);
}
.coin-face.heads { background: linear-gradient(145deg, #fff2b8, var(--accent)); }
.coin-face.tails { background: linear-gradient(145deg, #ffd54f, #d9a300); transform: rotateY(180deg); }
.stat-row { display:flex; justify-content:center; gap:24px; margin-top: 10px; }
.stat-row div { text-align:center; }
.stat-row .num { font-size:1.4rem; font-weight:800; color: var(--primary); }
.stat-row .lbl { font-size:0.8rem; color: var(--text-muted); }

/* Wheel */
.wheel-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 10px auto 20px;
}
.wheel-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 22px solid var(--text);
  z-index: 5;
}
.wheel-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--card-bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.2, 1);
}
.wheel-result {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  min-height: 32px;
}

/* Slot-machine number window */
.slot-window {
  background: linear-gradient(180deg, #2b2140, #1a1330);
  border: 4px solid var(--navy);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.slot-window::before, .slot-window::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
  background: rgba(255,255,255,0.15); pointer-events: none;
}
.slot-window::before { top: 32%; }
.slot-window::after { top: 68%; }
.slot-window .value {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(255,201,14,0.55);
  font-family: var(--font-display);
  position: relative; z-index: 1;
}
.slot-window.rolling .value { animation: slotShimmer .1s linear infinite; }
@keyframes slotShimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Raffle drum + winner tickets */
.raffle-drum { display: flex; justify-content: center; margin: 4px 0 16px; }
.drum-ball {
  width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(145deg, var(--accent3), #d9720a);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  border: 4px solid var(--navy);
}
.drum-ball.spinning { animation: drumSpin .5s linear infinite; }
@keyframes drumSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.winner-ticket {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent), #ffe28f);
  border: 2px dashed var(--navy);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  animation: ticketPop .4s ease both;
}
@keyframes ticketPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.winner-ticket .ticket-num {
  background: var(--navy); color: #fff; border-radius: 999px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; flex-shrink: 0;
}

/* Magic 8-ball graphic */
.eightball {
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #52525f, #0d0d14 72%);
  margin: 10px auto 6px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), inset 0 0 20px rgba(255,255,255,0.08);
  border: 4px solid var(--navy);
}
.eightball.shaking { animation: eightballShake .12s linear infinite; }
@keyframes eightballShake {
  0%, 100% { transform: rotate(-4deg) translateX(-3px); }
  50% { transform: rotate(4deg) translateX(3px); }
}
.eightball-window {
  width: 86px; height: 86px; border-radius: 50%;
  background: radial-gradient(circle, #1a3a6e, #0b1f42);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; text-align: center; padding: 6px;
  line-height: 1.3;
  border: 3px solid rgba(255,255,255,0.15);
  font-family: var(--font-display);
}

/* Team randomizer avatar chips */
.team-card { border-left: 6px solid var(--team-accent, var(--primary)); text-align: left; }
.team-card h3 { margin-bottom: 10px; }
.team-members { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  font-size: 0.85rem; font-weight: 600;
}
.avatar-circle {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem; color: var(--navy);
  background: var(--team-accent, var(--primary));
  flex-shrink: 0;
}
.team-color-0 { --team-accent: var(--accent); }
.team-color-1 { --team-accent: var(--accent2); }
.team-color-2 { --team-accent: var(--red); }
.team-color-3 { --team-accent: var(--primary); }
.team-color-4 { --team-accent: var(--accent3); }
.team-color-5 { --team-accent: var(--green); }

/* Dice roller graphics */
.dice-tray { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; align-items:center; margin: 6px 0 4px; min-height: 90px; }
.die { animation: diceRoll .6s ease-out both; }
@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(0.4); opacity:0; }
  60% { transform: rotate(300deg) scale(1.12); opacity:1; }
  100% { transform: rotate(360deg) scale(1); opacity:1; }
}
.die.d6 {
  width: 60px; height: 60px;
  background: linear-gradient(145deg, #ffffff, #f0eaff);
  border: 3px solid var(--navy);
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  padding: 8px;
}
.pip-grid { display:grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); width:100%; height:100%; }
.pip-grid span { display:flex; align-items:center; justify-content:center; }
.pip-grid .pip { width: 9px; height:9px; border-radius:50%; background: var(--navy); margin:auto; }
.die.d-other {
  width: 60px; height: 60px;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; font-size:1.3rem;
  font-family: var(--font-display);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.die.d4 { background: linear-gradient(145deg, var(--green), #1fae64); }
.die.d8 { background: linear-gradient(145deg, var(--accent2), #1478c9); }
.die.d10 { background: linear-gradient(145deg, var(--accent3), #d9720a); }
.die.d12 { background: linear-gradient(145deg, var(--primary), var(--accent3)); }
.die.d20 { background: linear-gradient(145deg, var(--red), #b8390f); }

/* Password generator */
.output-row { display: flex; gap: 8px; }
.output-row input { flex: 1; font-family: monospace; font-size: 1.05rem; }
.output-row button { width: auto; padding: 10px 16px; }
.checkbox-list { display: grid; gap: 8px; }
.checkbox-list label { font-weight: 500; font-size: 0.92rem; display:flex; align-items:center; gap:8px; }
.strength-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: 10px; }
.strength-bar .fill { height: 100%; border-radius: 4px; transition: width .2s ease, background .2s ease; }
