@font-face {
  font-family: "Anton";
  src: url("/casino/virt-pinguinplin/assets/Fonts/Anton-Regular.woff2") format("woff2"), url("/casino/virt-pinguinplin/assets/Fonts/Anton-Regular.woff") format("woff");
  font-display: swap;
}

:root {
  --accent: #25e0d1;
  --balance: #abf3ed;
  --frame-bg: #095746;
  --icon-bg: #095746;
  --icon-border: #25e0d1;
  --num-red: #954016;
  --num-black: #2a2724;
  --num-black-text: #c9c9c9;
  --num-green: #1d5c47;
  --num-green-text: #5ee3a1;
  --cell-border: #d5dcd9;
  --hist-red: #954016;
  --hist-black: #1d1d1d;
  --hist-black-text: #fff;
  --hist-green: #13853c;
  --text-panel: #ffd700;
  --frame-w: clamp(420px, min(100vw - 16px, 720px, (100vh - 470px) * 4 / 3), 720px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  color: #fff;
  background: #000 center / cover no-repeat fixed;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
img { -webkit-user-drag: none; }
.hide { display: none !important; }

.game-wrap { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 8px; }

.frame {
  position: relative;
  width: var(--frame-w);
  display: flex;
  flex-direction: column;
  border-radius: 10px 10px 50px;
  overflow: hidden;
  background: var(--frame-bg) center top / cover no-repeat;
  box-shadow: 0 0 24px rgba(0, 0, 0, .8);
}

/* ---------- header ---------- */
.header {
  position: relative;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: linear-gradient(#2e2e2ecc, #3b3b3b 50%, #000 3%, #2e2e2e99);
  z-index: 5;
}
.header-icons { display: flex; gap: 5px; }
.header-icons img { width: 22px; height: 22px; cursor: pointer; opacity: .9; }
.header-icons img:hover { opacity: 1; filter: drop-shadow(0 0 3px var(--accent)); }
.header .logo { position: absolute; left: 50%; top: 2px; height: 36px; transform: translateX(-50%); pointer-events: none; }
.header-right { display: flex; align-items: center; gap: 10px; }
.Balance { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.Balance .label { font-size: 9px; font-weight: 700; color: var(--accent); letter-spacing: .5px; }
.Balance .amount { font-family: "Anton", sans-serif; font-size: 15px; color: var(--balance); letter-spacing: .5px; margin-top: 2px; }

.lang-switch { position: relative; }
.lang-btn { display: flex; align-items: center; padding: 2px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .4); }
.lang-btn img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; display: block; }
.lang-menu {
  position: absolute; right: 0; top: 28px; z-index: 30;
  min-width: 160px; max-height: 320px; overflow: auto;
  background: rgba(10, 10, 10, .95); border: 1px solid var(--accent); border-radius: 6px; padding: 4px;
}
.lang-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 4px; font-size: 12px; text-align: left; }
.lang-item img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.lang-item:hover, .lang-item.on { background: rgba(37, 224, 209, .2); }

/* ---------- video ---------- */
.stage { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000 url("/casino/virt-pinguinplin/assets/Images/VideoPlaceHolder.jpg") center / cover; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#race-video { visibility: hidden; }
.stage.racing #race-video { visibility: visible; }
.stage.racing #lobby-video { visibility: hidden; }

/* ---------- footer ---------- */
.footer {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 28px 0 34px;
  background: linear-gradient(180deg, #075f1d4d, #093614);
}
.stake-info { display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 90px; z-index: 1; }
.stake-info .label { font-size: 10px; font-weight: 700; }
.stake-info .total { font-family: "Anton", sans-serif; font-size: 16px; }
.stake-info .timer { display: flex; align-items: center; gap: 3px; font-size: 9px; margin-top: 3px; }
.stake-info .timer img { width: 10px; height: 10px; }
.stake-info .pl { font-family: "Anton", sans-serif; font-size: 13px; color: #fff; border-top: 1px solid rgba(255, 255, 255, .6); padding: 0 6px; }
.stake-info .pl.up { color: #3dff6a; }
.stake-info .pl.down { color: #ff4a4a; }

.buttons { display: flex; align-items: center; gap: 26px; z-index: 1; }
.icon {
  position: relative;
  width: 35px; height: 35px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--icon-bg); border: 2px solid var(--icon-border);
  box-shadow: 0 0 6px rgba(0, 0, 0, .5);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.icon img { width: 60%; height: 60%; }
.icon:hover { box-shadow: 0 0 10px var(--icon-border); }
.icon:active { transform: scale(.94); }
.icon.disabled { opacity: .45; pointer-events: none; }
.icon.selected { background: var(--icon-border); }
.icon.selected img { filter: brightness(0); }
.icon .i-clear, .icon.is-clear .i-undo { display: none; }
.icon.is-clear .i-clear { display: block; }
.icon.play { width: 52px; height: 52px; margin-left: 20px; border-width: 3px; }
.icon.play .i-skip, .icon.play.skip .i-play { display: none; }
.icon.play.skip .i-skip { display: block; }

/* ---------- panels ---------- */
.panel {
  position: absolute; left: 10px; right: 10px; top: 46px; bottom: 80px; z-index: 20;
  display: flex; flex-direction: column;
  background: rgba(8, 18, 16, .94); border: 1px solid var(--accent); border-radius: 10px;
}
.panel header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(37, 224, 209, .4); }
.panel h3 { margin: 0; font-size: 16px; color: var(--accent); letter-spacing: .5px; }
.panel-close { font-size: 26px; line-height: 1; color: var(--accent); }
.panel-body { flex: 1; overflow: auto; padding: 10px 16px 16px; font-size: 13px; line-height: 1.45; }
.panel-body h4 { margin: 12px 0 4px; color: var(--accent); }
.panel-body p { margin: 0 0 6px; }
.panel-body .empty, .panel-body .sum { color: #bbb; }
.bet-entry { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bet-entry .bet-num { min-width: 28px; height: 24px; font-size: 13px; }
.bet-entry.winning-bet .bet-pricing small { color: #3dff6a; }
.bet-details { flex: 1; display: flex; flex-direction: column; }
.bet-details small, .bet-pricing small { color: #999; font-size: 11px; }
.bet-pricing { display: flex; flex-direction: column; align-items: flex-end; }
.stats-clear { margin-top: 12px; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 16px; color: var(--accent); font-size: 12px; }

.toast {
  position: absolute; left: 50%; bottom: 86px; transform: translate(-50%, 20px);
  max-width: 90%; padding: 9px 18px; border-radius: 18px;
  background: rgba(0, 0, 0, .85); border: 1px solid var(--accent);
  font-size: 13px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 40;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Penguin Plunge ---------- */
:root {
  --icon-bg: rgba(21, 86, 140, .8);
  --frame-bg: #5fb7e0;
  --frame-w: clamp(420px, min(100vw - 16px, 720px, (100vh - 510px) * 4 / 3), 720px);
}
body { background-image: url("/casino/virt-pinguinplin/assets/Images/ICE-BG-1920x1080.jpg"); }
.frame { background-image: url("/casino/virt-pinguinplin/assets/Images/ICE-BG-1920x1080.jpg"); }
.stage { background: #0d4d7a url("/casino/virt-pinguinplin/assets/Images/LoadingImage.jpg") center / cover; }

.table-zone {
  position: relative;
  padding: 22px 26px 12px;
  background: url("/casino/virt-pinguinplin/assets/Images/penguins-bg.jpg") center / cover no-repeat;
  border-top: 2px solid #45bdfa;
}
.board { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 20px; max-width: 520px; margin: 0 auto; transition: opacity .3s; }

.penguin {
  position: relative; isolation: isolate;
  justify-self: center;
  width: 92px; height: 92px; border-radius: 50%;
  box-shadow: 0 5px 15px #011f22cc;
  transition: transform .4s cubic-bezier(.075, .82, .165, 1);
}
.penguin::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: 50%; background: radial-gradient(circle, #7c62a6, #6fd6e9); }
.penguin img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; object-fit: cover; z-index: -1; }
.penguin::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%; border: 6px solid var(--ring); box-shadow: inset 0 0 6px rgba(0, 0, 0, .35), 0 5px 5px #03626bcc; }
.penguin .snow {
  position: absolute; z-index: 2; top: -9px; left: 12%; width: 76%; height: 30px;
  background: url("/casino/virt-pinguinplin/assets/Images/oval-snow.png") 50% 0 / 100% auto no-repeat;
}
.penguin .stake {
  position: absolute; z-index: 1; left: 5px; right: 5px; top: 50%; bottom: 5px;
  display: none; align-items: center; justify-content: center;
  border-top: 1px solid #7eece4; border-radius: 0 0 44px 44px;
  background: #abf3edcc;
  font-family: "Anton", sans-serif; font-size: 16px; color: #0d5f58; text-shadow: 0 2px 3px #fff;
}
.penguin.has-bet .stake { display: flex; }
.penguin:hover { transform: scale(1.05); }
.penguin:active { transform: scale(.97); }

.chips { display: flex; justify-content: center; gap: 12px; margin: 22px auto 0; }
.pill {
  min-width: 46px; padding: 5px 9px;
  border-radius: 6px; border: 1px solid #b9ecff;
  background: linear-gradient(#4db3e0, #1d6e9f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 6px rgba(1, 31, 60, .45);
  font-family: "Anton", sans-serif; font-size: 16px; letter-spacing: .5px; color: #fff; text-shadow: 0 1px 2px #0b3550;
  transition: box-shadow .15s, transform .15s;
}
.pill:hover { transform: translateY(-2px); }
.pill.selected { background: linear-gradient(#6fd6f5, #2a8cc4); box-shadow: 0 0 0 2px #25e0d1, 0 0 12px 3px #25e0d1; }

.stake-pill {
  display: flex; align-items: center; justify-content: space-between;
  width: min(72%, 380px); height: 32px; margin: 16px auto 0; padding: 0 6px;
  border-radius: 18px; border: 2px solid #8fd6f5;
  background: linear-gradient(#2a77a8, #0f3e60);
  box-shadow: 0 3px 8px rgba(1, 31, 60, .5);
}
.stake-pill button {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; background: #0f3e60; font-size: 16px; font-weight: 700; line-height: 1;
}
.stake-pill span { font-family: "Anton", sans-serif; font-size: 17px; color: #ffe14d; letter-spacing: .5px; }

.frame:not([data-phase="betting"]) .board,
.frame:not([data-phase="betting"]) .chips,
.frame:not([data-phase="betting"]) .stake-pill { pointer-events: none; }
.frame[data-phase="playing"] .board,
.frame[data-phase="playing"] .chips,
.frame[data-phase="playing"] .stake-pill,
.frame[data-phase="error"] .board { opacity: .6; }

.podium-screen {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  background: url("/casino/virt-pinguinplin/assets/Images/Podium-BG.jpg") center / cover no-repeat;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
  overflow: hidden;
}
.podium-screen.show { opacity: 1; visibility: visible; }
.podium-screen h1 {
  position: relative; z-index: 1;
  margin: 6% 6% 0; text-align: center;
  font-family: "Lato", "Segoe UI", Arial, sans-serif; font-weight: 900; letter-spacing: 1px; line-height: 1.1;
  font-size: calc(var(--frame-w) * .075); color: #123a43;
}
.podium-screen h1 b { display: block; font-family: "Anton", sans-serif; font-weight: 400; color: #ffe14d; text-shadow: 0 3px 8px rgba(0, 0, 0, .45); font-size: 1.2em; }
.podium-screen.winning-rays h1 { color: #fff; text-shadow: 0 3px 8px rgba(0, 0, 0, .45); }
.podium-screen.winning-rays::before {
  content: ""; position: absolute; left: 50%; top: 22%; width: 120%; aspect-ratio: 1; margin-left: -60%; margin-top: -60%;
  background: url("/casino/virt-pinguinplin/assets/Images/rays.png") center / contain no-repeat;
  opacity: .7; animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.podium { position: absolute; left: 6%; right: 6%; bottom: 10%; display: flex; justify-content: space-around; align-items: flex-end; }
.podium .pl { position: relative; width: 21%; transform: translateY(30px); opacity: 0; transition: transform .5s, opacity .5s; }
.podium-screen.show .pl { transform: none; opacity: 1; }
.podium-screen.show .pl.first { transform: translateY(-14%); transition-delay: .25s; }
.podium-screen.show .pl.second { transition-delay: .1s; }
.podium-screen.show .pl.third { transition-delay: .4s; }
.podium .trophy { position: absolute; z-index: 2; left: 50%; top: -48%; width: 62%; transform: translateX(-50%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.podium .pl.mine .pav { box-shadow: 0 0 0 5px #ff9a1f, 0 6px 14px rgba(0, 0, 0, .4); }

.pav {
  position: relative; display: inline-block; flex: none;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #7c62a6, #6fd6e9);
  border: 4px solid var(--ring);
}
.pav img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pav.big { width: 100%; aspect-ratio: 1; border-width: 5px; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.pav.mini { width: 34px; height: 34px; border-width: 3px; }

.footer { background: linear-gradient(180deg, #b1e8fc80, #215b8ce6); border-top: 2px solid #45bdfa; }
.panel { background: rgba(6, 30, 48, .95); }
