/* GreekDice visual polish: premium midnight surfaces, crisp type, and calmer spacing. */
:root {
  color-scheme: dark;
  --sleek-ink: #f4f7ff;
  --sleek-muted: #a8b5ca;
  --sleek-line: rgba(187, 205, 235, .19);
  --sleek-glass: rgba(11, 19, 34, .82);
  --sleek-glass-raised: rgba(20, 31, 50, .88);
  --sleek-gold: #ffd447;
  --sleek-cyan: #7ddcf3;
  --sleek-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  color: var(--sleek-ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }
body { color: var(--sleek-ink); }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--sleek-cyan);
  outline-offset: 3px;
}

/* Home and dice roller */
.page-shell { max-width: 1500px; padding-top: 16px; }
.topbar {
  min-height: 52px;
  padding: 7px 11px;
  border: 1px solid rgba(198, 216, 247, .15);
  border-radius: 16px;
  background: rgba(8, 15, 28, .54);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}
.brand { color: #fff; letter-spacing: -.45px; }
.brand-mark { border: 1px solid rgba(255, 239, 160, .72); box-shadow: 0 4px 16px rgba(255, 203, 37, .24); }
.topbar-actions { gap: 7px; }
.vip-login-button, .topbar-link {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--sleek-line);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .045em;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.vip-login-button { border-color: rgba(255, 222, 89, .7); background: linear-gradient(135deg, #ffe071, #ffbf19); box-shadow: 0 5px 18px rgba(255, 197, 35, .18); }
.topbar-link { background: rgba(9, 16, 29, .76); }
.vip-login-button:hover, .topbar-link:hover { transform: translateY(-1px); border-color: rgba(125, 220, 243, .55); box-shadow: 0 7px 18px rgba(0, 0, 0, .22); }
.site-banner { filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .25)); }
.game-layout { width: min(100%, 800px); max-width: 800px; margin-top: clamp(16px, 2.5vh, 26px); }
.roller-card {
  border: 1px solid rgba(206, 222, 249, .24);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(20, 31, 50, .94), rgba(8, 14, 27, .92));
  box-shadow: var(--sleek-shadow), inset 0 1px rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}
.game-title h1 { letter-spacing: -.025em; }
.game-title span { letter-spacing: .09em; }
.dice-toolbar { gap: 9px; }
.dice-toolbar .menu-select-trigger,
.toolbar-count, .toolbar-mode, .toolbar-theme select, .toolbar-settings summary,
.toolbar-verify {
  border-color: rgba(180, 203, 240, .2);
  border-radius: 12px;
  background: rgba(5, 11, 21, .86);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dice-toolbar .menu-select-trigger:hover, .toolbar-count:hover, .toolbar-mode:hover,
.toolbar-theme select:hover, .toolbar-settings summary:hover, .toolbar-verify:hover {
  border-color: rgba(125, 220, 243, .55);
  background-color: rgba(15, 29, 48, .96);
}
.dice-output-panel {
  border: 1px solid rgba(201, 219, 247, .22);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 12px 28px rgba(0,0,0,.12);
}
.dice-stage {
  border: 1px solid rgba(211, 225, 249, .08);
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0, rgba(125, 220, 243, .075), transparent 68%);
}
.dice-stage > .die { filter: drop-shadow(0 9px 10px rgba(0,0,0,.23)); }
.roll-summary { color: rgba(226, 235, 249, .8); }
.verify-id-strip { border-color: rgba(198, 216, 247, .16); background: rgba(5, 11, 21, .3); }
.roll-button#roll-button {
  border: 1px solid rgba(255, 240, 174, .82);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe16a 0%, #ffd12b 55%, #f7b900 100%);
  box-shadow: 0 5px 0 #a97908, 0 13px 28px rgba(255, 198, 34, .2), inset 0 1px rgba(255,255,255,.55);
  letter-spacing: .025em;
  transition: transform .17s ease, filter .17s ease, box-shadow .17s ease;
}
.roll-button#roll-button:hover { transform: translateY(-2px); filter: brightness(1.035); box-shadow: 0 7px 0 #a97908, 0 18px 34px rgba(255, 198, 34, .26), inset 0 1px rgba(255,255,255,.65); }
.roll-button#roll-button:active { transform: translateY(2px); box-shadow: 0 2px 0 #a97908; }
.dice-quick-actions { gap: 9px; }
.dice-quick-actions > button, .dice-quick-actions > a {
  border: 1px solid rgba(181, 202, 236, .2);
  border-radius: 999px;
  box-shadow: 0 5px 15px rgba(0,0,0,.12);
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
.dice-quick-actions > button:hover, .dice-quick-actions > a:hover { transform: translateY(-1px); filter: brightness(1.08); border-color: rgba(125,220,243,.42); }
.public-roll-notice, .keyboard-hint { color: rgba(203, 216, 238, .7); }
.dice-counter { border: 1px solid rgba(182, 204, 240, .17); border-radius: 18px; background: rgba(4, 10, 21, .58); }
.dice-counter-controls output { border: 1px solid rgba(255,255,255,.055); border-radius: 13px; background: rgba(2, 7, 16, .72); }
.counter-side button { transition: transform .15s ease, filter .15s ease; }
.counter-side button:hover { transform: scale(1.06); filter: brightness(1.16); }
.history-section, .color-key, .search-info {
  border: 1px solid rgba(198, 216, 247, .18);
  border-radius: 20px;
  background: rgba(9, 16, 29, .76);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .19), inset 0 1px rgba(255,255,255,.055);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.history-section { padding: 12px 16px; }
.history-item { border-color: rgba(207, 221, 245, .13); }
.history-item:nth-child(even) { background: rgba(255,255,255,.025); }
.history-pagination button { border-radius: 10px; transition: border-color .16s ease, transform .16s ease; }
.history-pagination button:hover:not(:disabled) { transform: translateY(-1px); }
.game-disclosure-heading { min-height: 52px; }
.stats-panel { border-radius: 14px; background: rgba(255,255,255,.055); }
.pinned-color-legend {
  border-top: 1px solid rgba(191, 211, 241, .18);
  background: rgba(5, 11, 21, .9);
  box-shadow: 0 -12px 35px rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}
.pinned-color-list .swatch { box-shadow: 0 0 12px color-mix(in srgb, currentColor, transparent 65%); }
.vip-dialog {
  border: 1px solid rgba(198,216,247,.23);
  border-radius: 22px;
  background: linear-gradient(150deg, #17253a, #09111f);
  color: var(--sleek-ink);
  box-shadow: 0 30px 90px rgba(0,0,0,.58);
}
.vip-dialog::backdrop { background: rgba(2,6,13,.72); backdrop-filter: blur(8px); }
.vip-dialog input, .vip-dialog select { border: 1px solid var(--sleek-line); border-radius: 11px; background: #0b1423; color: var(--sleek-ink); }
.search-info { padding: 20px 24px; }
.search-info h2 { color: #f5f7fd; }
.search-info p, footer { color: var(--sleek-muted); }

/* Public rolls, streamer directory, and verification pages share the same finish. */
.public-page, .streamers-page { max-width: 1180px; padding-top: 22px; }
.public-header, .streamers-topbar {
  border: 1px solid rgba(198,216,247,.16);
  border-radius: 17px;
  background: rgba(8,15,28,.62);
  box-shadow: 0 12px 30px rgba(0,0,0,.15), inset 0 1px rgba(255,255,255,.055);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.public-header { padding: 10px 15px; }
.public-header h1, .directory h1 { letter-spacing: -.035em; }
.back-link, .refresh-button { transition: color .15s ease, transform .15s ease; }
.search-box { border-color: rgba(174,198,233,.22); border-radius: 14px; background: rgba(22,34,53,.88); box-shadow: inset 0 1px rgba(255,255,255,.045); }
.search-box:focus-within { border-color: rgba(125,220,243,.7); box-shadow: 0 0 0 3px rgba(125,220,243,.12); }
.roll-card, .streamer-card {
  border-color: rgba(180,201,233,.19);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(27,41,62,.96), rgba(17,28,45,.96));
  box-shadow: 0 10px 25px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.045);
  transition: transform .17s ease, border-color .17s ease, box-shadow .17s ease;
}
.roll-card:hover, .streamer-card:hover { transform: translateY(-2px); border-color: rgba(125,220,243,.4); box-shadow: 0 15px 32px rgba(0,0,0,.23); }
.streamer-card.is-live, .streamer-card.is-live:hover { border-color: rgba(255,79,104,.8); box-shadow: 0 0 0 1px rgba(255,79,104,.18), 0 12px 30px rgba(255,40,75,.11); }
.roll-die { border-radius: 10px; box-shadow: 0 5px 12px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.55); }
.color-chip { border-color: rgba(255,255,255,.32); box-shadow: 0 2px 7px rgba(0,0,0,.13); }
.empty-state { border-color: rgba(170,194,229,.25); border-radius: 15px; background: rgba(255,255,255,.025); }
.load-older { border-radius: 11px; background: rgba(20,32,51,.9); transition: transform .15s ease, border-color .15s ease; }
.load-older:hover { transform: translateY(-1px); }
.verify-card {
  border: 1px solid rgba(198,216,247,.2);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(20,31,50,.96), rgba(8,14,27,.94));
  box-shadow: var(--sleek-shadow), inset 0 1px rgba(255,255,255,.07);
}
.verify-card label, .result-heading { color: #e8eef9; }
.input-row input { border-color: rgba(174,198,233,.25); border-radius: 11px; background: rgba(5,11,21,.7); color: var(--sleek-ink); }
.input-row input:focus { border-color: rgba(125,220,243,.7); box-shadow: 0 0 0 3px rgba(125,220,243,.12); }
.verify-result { border: 1px solid rgba(195,214,244,.12); background: rgba(255,255,255,.055); }
.verify-result.success { background: rgba(48,153,105,.13); }
.verify-result.error { background: rgba(208,75,78,.13); }
.demo-note, .result-meta { color: var(--sleek-muted); }

@media (max-width: 700px) {
  .page-shell { padding-top: 8px; }
  .topbar { border-radius: 14px; }
  .roller-card { border-radius: 19px; }
  .history-section, .color-key { border-radius: 15px; }
  .public-page, .streamers-page { padding-top: 12px; }
  .public-header { border-radius: 14px; }
  .roll-card, .streamer-card { border-radius: 15px; }
  .search-box { border-radius: 12px; }
  .verify-card { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Keep each home-page layer on a shared center line at every viewport size. */
.topbar { width: min(100%, 1160px); margin-inline: auto; }
.site-banner { margin-inline: auto; }
.game-layout { display: block; width: min(100%, 800px); max-width: 800px; margin-inline: auto; }
.roller-card { width: 100%; margin-inline: auto; }
.dice-toolbar { width: max-content; max-width: 100%; justify-content: center; margin-inline: auto; }
.dice-output-panel { width: 100%; margin-inline: auto; }
.dice-stage { width: 100%; align-items: center; justify-content: center; align-content: center; }
.verify-id-strip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; text-align: center; }
.verify-id-strip > span { display: flex; align-items: center; justify-content: center; gap: 8px; }
.copy-room { margin: 0; }
.roll-button#roll-button { display: flex; align-items: center; justify-content: center; width: 100%; margin-inline: auto; }
.dice-quick-actions { display: flex; width: 100%; align-items: center; justify-content: center; flex-wrap: wrap; margin-inline: auto; }
.public-roll-notice { max-width: 100%; margin-inline: auto; text-align: center; }
.dice-counter { width: 100%; margin-inline: auto; }
.dice-counter-controls { width: 100%; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
.counter-side:first-child { align-items: flex-start; }
.counter-side:last-child { align-items: flex-end; }
.history-section, .color-key, .search-info { width: min(100%, 720px); margin-inline: auto !important; }
.history-section { box-sizing: border-box; }
.topbar-actions {
  position: static;
  z-index: auto;
  top: auto;
  right: auto;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
}
.dice-quick-actions { margin-bottom: 0; }
.public-roll-notice { margin: 2px 0 0; line-height: 1.3; }
.dice-counter { margin-top: 6px; }
.custom-counter-controls {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 9px auto 0;
  padding: 6px 9px;
  border: 1px solid rgba(182, 204, 240, .13);
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
.custom-counter-controls label { color: rgba(203,216,238,.7); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.custom-counter-controls input {
  width: 76px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid rgba(182,204,240,.22);
  border-radius: 8px;
  outline: 0;
  background: rgba(3,8,17,.76);
  color: #f4f7ff;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.custom-counter-controls input:focus { border-color: rgba(125,220,243,.68); box-shadow: 0 0 0 2px rgba(125,220,243,.12); }
.custom-counter-controls input::-webkit-inner-spin-button, .custom-counter-controls input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.custom-counter-controls input { appearance: textfield; }
.custom-counter-controls button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(182,204,240,.18);
  border-radius: 8px;
  background: rgba(11,18,32,.86);
  color: #f4f7ff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.custom-counter-controls button:hover { transform: translateY(-1px); border-color: rgba(125,220,243,.55); background: rgba(25,41,62,.95); }

@media (max-width: 700px) {
  .topbar { width: 100%; }
  .topbar-actions { width: 100%; margin-left: 0; justify-content: center; }
  .game-layout { width: 100%; }
  .roller-card { width: 100%; }
  .dice-toolbar { width: 100%; }
  .custom-counter-controls { gap: 5px; padding: 5px 7px; }
  .history-section, .color-key, .search-info { width: min(100%, 720px) !important; }
}
