:root {
  --bg-dark: #070b11;
  --panel-bg: rgba(20, 20, 24, 0.9);
  --panel-border: rgba(255,255,255,0.22);
  --soft-white: #f5f5f5;
  --muted: rgba(255,255,255,0.7);
  --gold: #ffdd57;
  --gold-strong: #ff9b00;
  --cyan: #00d2ff;
  --danger: #ff4d4d;
  --success: #28c76f;
  --panel-shadow: 0 12px 30px rgba(0,0,0,0.45);
  --red: #ff0000;
  --orange: #ffa500;
  --yellow: #ffd700;
  --green: #008000;
  --blue: #0000ff;
  --purple: #800080;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Fredoka', sans-serif;
  background: linear-gradient(180deg, rgba(4,8,14,0.18), rgba(4,8,14,0.82)), radial-gradient(circle at top, rgba(17,24,39,0.85), rgba(2,6,23,0.92));
  color: var(--soft-white);
}

a {
  text-decoration: none;
}
@font-face {
  font-family: 'Marvin Regular';
  src: url('https://www.offline-dice.com/397-font_1.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --theme-panel-bg: rgba(18, 18, 18, 0.85);
  --theme-accent: #9e9e9e;
  --font-main: 'Fredoka', sans-serif;
  --font-title: 'Lilita One', cursive;
  --font-btn: 'Luckiest Guy', cursive;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: #000;
  background-image: url("assets/sabblack.png");
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 100vh;
  padding-bottom: 75px;
  overflow-x: hidden;
}

.site-header {
  text-align: center;
  padding: 10px 0 0;
}

.site-logo {
  display: block;
  width: min(440px, 86vw);
  height: auto;
  margin: 0 auto;
}

.main-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
  max-width: 1200px;
  margin: 4px auto 0;
  padding: 0 15px;
  position: relative;
  z-index: 10;
}

.sidebar,
.game-center {
  background-color: var(--theme-panel-bg) !important;
  border: 3px solid #fff !important;
  border-radius: 15px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  color: white;
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.sidebar h3 {
  text-align: center;
  color: white;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.streamer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.streamer-card {
  position: relative;
  background: rgba(15, 15, 20, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-left: 4px solid #9e9e9e !important;
  border-right: 4px solid #9e9e9e !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  display: flex;
  align-items: center;
  gap: 12px !important;
  transition: all 0.25s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.streamer-card:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(4px);
}

.streamer-card > img {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  object-fit: cover !important;
}

.streamer-info strong {
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.streamer-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  display: block;
  margin-top: 1px;
}

.streamer-card > div {
  min-width: 0;
}

.streamer-card strong {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.streamer-card span {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 500;
}

.streamer-card .verify-badge {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  flex: 0 0 18px;
}

.streamer-card.is-live {
  border: 2px solid #ed1837 !important;
  box-shadow: 0 0 12px rgba(237, 24, 55, 0.38), 0 4px 10px rgba(0, 0, 0, 0.4) !important;
}

.game-center {
  flex: 1;
  max-width: 520px;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.dice-game-view,
.wheel-game-view {
  width: 100%;
}

.wheel-game-view[hidden] {
  display: none;
}

.wheel-game-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.wheel-stage {
  position: relative;
  width: min(360px, calc(100vw - 80px));
  aspect-ratio: 1;
  margin: 8px auto 0;
}

.wheel-stage canvas {
  position: absolute;
  top: -6px;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: content-box;
  border: 6px solid #fff;
  border-radius: 50%;
  background: #121214;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
}

.wheel-pointer {
  position: absolute;
  top: -22px;
  left: 50%;
  z-index: 1;
  width: 42px;
  height: 48px;
  transform: translateX(-50%);
}

.wheel-pointer::before {
  position: absolute;
  inset: 0 4px 8px;
  border: 3px solid #fff;
  background: linear-gradient(180deg, #fff45e, #ffae00 75%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: '';
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.wheel-pointer::after {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ffe12d;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  content: '';
  transform: translateX(-50%);
}

.wheel-entry-panel {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(15, 15, 20, 0.72);
}

.wheel-entry-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.wheel-entry-panel textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  border: 2px solid #777;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font: 600 14px var(--font-main);
}

.wheel-entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.wheel-entry-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.wheel-entry-actions button {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 600 12px var(--font-main);
  cursor: pointer;
}

.wheel-entry-actions button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.wheel-result {
  min-height: 28px;
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.winner-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.winner-modal[hidden] {
  display: none;
}

.winner-card {
  width: 85%;
  max-width: 380px;
  padding: 35px 45px;
  border: 3px solid #ffea3d;
  border-radius: 20px;
  background: linear-gradient(135deg, #1a1a24 0%, #0f0f16 100%);
  box-shadow: 0 12px 45px rgba(255, 234, 61, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.winner-card h2 {
  margin-bottom: 16px;
  color: #ffea3d;
  font-size: 28px;
}

.winner-name-display {
  overflow-wrap: anywhere;
  margin-bottom: 22px;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}

.winner-close-btn {
  padding: 10px 24px;
  border: 0;
  border-radius: 8px;
  background: #ffea3d;
  color: #15151c;
  font: 700 16px var(--font-main);
  cursor: pointer;
}

.winner-close-btn:hover {
  background: #fff176;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.75); }
  to { opacity: 1; transform: scale(1); }
}

.roll-title {
  font-family: 'Marvin Regular', sans-serif !important;
  font-size: 32px !important;
  color: #fff !important;
  text-align: center !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: 2.5px !important;
  text-transform: uppercase !important;
  font-weight: normal !important;
  text-shadow: -2px -2px 0 #777, 2px -2px 0 #777, -2px 2px 0 #777, 2px 2px 0 #777, -3px 0 0 #444, 3px 0 0 #444, 0 -3px 0 #444, 0 3px 0 #444, 0 5px 0 #2a2a2a, 0 8px 15px rgba(0, 0, 0, 0.9) !important;
}

.controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.controls select {
  flex: 1;
  background-color: #fff;
  color: #111;
  border: 3px solid #9e9e9e;
  padding: 12px 36px 12px 11px;
  border-radius: 10px;
  font-family: var(--font-title);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.dice-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 90px;
  margin: 10px 0;
  transition: filter 0.3s;
}

.die {
  width: 86px;
  height: 86px;
  border-radius: 15px;
  border: 7.5px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.15s ease;
}

.die-dot {
  width: 15px;
  height: 15px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.game-id-row {
  text-align: center;
  font-family: var(--font-main);
  font-size: 16px;
  color: #fff;
}

.game-id-row strong {
  font-size: 20px;
  letter-spacing: 1px;
}

.game-id-row a {
  color: #fff;
  text-decoration: underline;
}

.roll-btn {
  width: 100%;
  background: linear-gradient(180deg, #ffea3d 0%, #ff9800 100%);
  color: #fff;
  border: 2px solid #ffe57f;
  padding: 6px 16px;
  font-family: var(--font-btn);
  font-size: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 12px;
  cursor: pointer;
  display: block;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 4px 0 #c86a00, 0 8px 15px rgba(0, 0, 0, 0.4);
  text-shadow: 2px 2px 0 #e67e00, -2px -2px 0 #e67e00, 2px -2px 0 #e67e00, -2px 2px 0 #e67e00;
  transition: filter 0.15s ease;
  z-index: 50;
}

.stretch-text {
  display: inline-block;
  transform: scaleX(1.12);
  transform-origin: center;
}

.roll-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.9), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 4px 0 #c86a00, 0 8px 15px rgba(0, 0, 0, 0.4);
}

.roll-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 2px 0 #c86a00, 0 4px 10px rgba(0, 0, 0, 0.4);
}

.roll-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18, 18, 22, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px 22px;
  width: 100%;
}

.counter-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
}

.side-left {
  align-items: flex-start;
}

.side-right {
  align-items: flex-end;
}

.counter-side span {
  cursor: pointer;
}

.side-left span {
  color: #ff6b6b;
}

.side-right span {
  color: #51cf66;
}

.counter-side span:hover {
  color: #fff;
}

.counter-center {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 40px;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.counter-center-wrapper {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 60px;
  align-items: center;
  justify-content: center;
}

.counter-item-selector {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

.selected-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 62px;
  min-height: 58px;
  padding: 3px 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  cursor: pointer;
}

.item-img-display,
.item-option img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.dropdown-caret {
  color: #fff;
  font-size: 12px;
}

.item-dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 68px;
  padding: 6px;
  transform: translateX(-50%);
  background: rgba(12, 12, 16, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.item-dropdown-menu[hidden] {
  display: none;
}

.item-option {
  display: grid;
  place-items: center;
  padding: 3px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.item-option.active,
.item-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.item-option img {
  width: 48px;
  height: 48px;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
}

.global-goal-card {
  padding: 12px;
  background: rgba(15, 15, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}

.global-goal-header,
.global-goal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}

.global-goal-header strong {
  color: #00d2ff;
}

.global-goal-footer {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 500;
}

.global-goal-footer strong {
  color: #ffea3d;
}

.goal-bar-bg {
  height: 10px;
  margin: 9px 0 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.goal-bar-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00d2ff, #4de39f);
  border-radius: inherit;
  transition: width 0.25s ease;
}

.colors-text {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-top: 5px;
}

.palette-status {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
}

.independent-notice {
  margin: 8px auto 0;
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.history-section {
  margin: 12px 0 0;
  width: 100%;
  max-width: none;
  padding: 0;
  position: relative;
  z-index: 10;
}

.history-panel {
  background: var(--theme-panel-bg);
  border: 3px solid #fff;
  border-radius: 15px;
  padding: 15px;
}

.history-title {
  font-family: var(--font-title);
  text-align: center;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.inline-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 10, 14, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 10px;
}

.history-row {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-row.latest-roll-row {
  border: 2px solid #ffea3d;
}

.last-roll-tag {
  margin-left: auto;
  color: #ffea3d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.history-number {
  font-family: var(--font-main);
  font-weight: 800;
  color: #00d2ff;
  background: rgba(0, 112, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  min-width: 28px;
  text-align: center;
}

.mini-dice-container {
  display: flex;
  gap: 6px;
}

.mini-die {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 2.5px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mini-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
}

.info-square {
  width: 100%;
  margin-top: 15px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(20, 20, 26, 0.85) 0%, rgba(12, 12, 18, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--theme-accent);
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.info-square:hover {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: var(--theme-accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.info-square-title {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
}

.info-square-text {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}

.info-square-text:last-child {
  margin-bottom: 0;
}

.color-red { color: #ff0000; font-weight: 800; }
.color-orange { color: #ffa500; font-weight: 800; }
.color-yellow { color: #ffd700; font-weight: 800; }
.color-green { color: #008000; font-weight: 800; }
.color-blue { color: #0000ff; font-weight: 800; }
.color-purple { color: #800080; font-weight: 800; }

body.blur-active .site-logo,
body.blur-active .dice-display .die,
body.blur-active .big-die,
body.blur-active .roll-title,
body.blur-active .controls select {
  filter: blur(15px) !important;
  transition: filter 0.3s ease-in-out !important;
}

body.blur-active .site-logo:hover,
body.blur-active .dice-display .die:hover,
body.blur-active .big-die:hover,
body.blur-active .roll-title:hover,
body.blur-active .controls select:hover,
body.blur-active .controls select:focus,
body.blur-active .controls select:active {
  filter: blur(0px) !important;
}

.blur-btn {
  width: 160px;
  margin: 10px auto 0;
  background: rgba(20, 20, 25, 0.85);
  color: #ccc;
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.blur-btn.active {
  background: #16a34a;
  border-color: #22c55e;
  color: #fff;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(16, 16, 22, 0.95) 0%, rgba(6, 6, 8, 0.99) 100%);
  backdrop-filter: blur(14px);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
}

.footer-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.footer-right-group {
  position: absolute;
  top: 50%;
  right: 16px;
  left: calc(50% + 150px);
  display: flex;
  align-items: center;
  min-width: 0;
  transform: translateY(-50%);
  z-index: 1;
}

.footer-btn,
.vip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.vip-btn {
  background: rgba(255, 215, 0, 0.15);
  border: 2px solid #ffd700;
  color: #ffd700;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

.lang-dropup-container {
  position: relative;
}

.lang-footer-btn {
  height: 36px;
  padding: 0 14px;
  border: 2px solid #2196f3;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(0, 112, 255, 0.1));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  color: #64b5f6;
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lang-footer-btn:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: #90caf9;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.35), rgba(0, 112, 255, 0.2));
  color: #fff;
}

.lang-dropup-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 100%;
  overflow: hidden;
  border: 2px solid #2196f3;
  border-radius: 10px;
  background: #1a1a1a;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.8);
  z-index: 10000;
}

.lang-dropup-menu[hidden] {
  display: none;
}

.lang-option {
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.active {
  background: rgba(33, 150, 243, 0.25);
}

.news-ticker-bar {
  width: 100%;
  display: flex;
  align-items: center;
  height: 36px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 2px 6px;
  border: 2px solid var(--theme-accent);
  border-radius: 10px;
  background: rgba(15, 15, 22, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.news-ticker-badge {
  flex-shrink: 0;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ff4757;
  color: #fff;
  font-family: var(--font-title);
  font-size: 11px;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.news-ticker-content {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.news-ticker-text {
  display: inline-block;
  padding-left: 100%;
  color: #fff;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  animation: newsTickerScroll 25s linear infinite;
}

.news-ticker-text:hover {
  animation-play-state: paused;
  cursor: pointer;
}

.footer-center-group {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  z-index: 2;
}

.tiktok-footer-btn,
.discord-footer-btn {
  display: inline-block;
  height: 36px;
  padding: 9px 18px;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-title);
  font-size: 14px;
  letter-spacing: 0.8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, opacity 0.2s;
}

.tiktok-footer-btn {
  background: linear-gradient(45deg, #fe2c55, #25f4ee);
}

.discord-footer-btn {
  background: linear-gradient(45deg, #404eed, #7289da);
}

.tiktok-footer-btn:hover,
.discord-footer-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

@keyframes newsTickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}

.tiktok-btn {
  background: #fe2c55;
}

.discord-btn {
  background: #404eed;
}

.footer-right-group span {
  font-size: 12px;
  font-weight: 600;
}

.roll-overlay {
  position: fixed;
  inset: 0;
  background-color: #000;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.3s;
}

.roll-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay-title {
  position: relative;
  z-index: 1;
  font-family: 'Marvin Regular', sans-serif;
  font-size: 36px;
  font-weight: normal;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 18px;
  text-shadow: 2px 2px 0 #555, -2px -2px 0 #555, 2px -2px 0 #555, -2px 2px 0 #555, 4px 4px 0 #111;
}

.overlay-dice-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: auto;
  max-width: 94vw;
  max-height: 68vh;
  align-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
}

.big-die {
  width: 86px;
  height: 86px;
  border-radius: 16px;
  background-color: #e6e6e6;
  border: 8px solid #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: none;
  box-sizing: border-box;
  will-change: transform;
  transition: background-color 0.05s;
}

.big-die-dot {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

@keyframes diceShake {
  0% { transform: translate(0, 0) rotate(0); }
  12% { transform: translate(-3px, 2px) rotate(-2deg); }
  25% { transform: translate(3px, -3px) rotate(2deg); }
  37% { transform: translate(-2px, -3px) rotate(-1deg); }
  50% { transform: translate(3px, 3px) rotate(2deg); }
  62% { transform: translate(-3px, -2px) rotate(-2deg); }
  75% { transform: translate(2px, 3px) rotate(1deg); }
  87% { transform: translate(-2px, 2px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

.initial-shake {
  animation: diceShake 0.9s ease-in-out 1 forwards;
}

.counter-side span {
  user-select: none;
  transition: color 0.1s ease, transform 0.1s ease;
}

.counter-side span:hover {
  transform: scale(1.1);
}

@media (max-width: 950px) {
  .main-layout {
    flex-direction: column;
    align-items: center;
  }

  .sidebar,
  .game-center {
    width: 100%;
    max-width: 500px;
  }

  .streamer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 520px) {
  .controls {
    gap: 6px;
  }

  .controls select {
    min-width: 0;
    padding: 10px 24px 10px 8px;
    font-size: 12px;
  }

  .counter-row {
    padding: 10px 12px;
  }

  .selected-item-btn {
    min-width: 48px;
    min-height: 48px;
  }

  .item-img-display {
    width: 40px;
    height: 40px;
  }

  .counter-center {
    font-size: 34px;
  }

  .global-goal-header,
  .global-goal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
  }

  .footer-left-group,
  .footer-center-group {
    position: static;
    justify-content: center;
    gap: 6px;
    transform: none;
  }

  .footer-right-group {
    display: none;
  }

  .tiktok-footer-btn,
  .discord-footer-btn {
    height: 32px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .footer-right-group {
    gap: 6px;
  }

  .news-ticker-bar {
    display: none;
  }
}
  border-radius: 12px;
