/* ===== CRAPS ACADEMY — AUTHENTIC TABLE LAYOUT ===== */

:root {
  --felt: #2d7a3a;
  --felt-dark: #1e5227;
  --felt-light: #359244;
  --felt-border: #1a3e20;
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --gold-dim: #8a6e2f;
  --cream: #f5ead0;
  --white: #f0ede0;
  --red: #cc1a1a;
  --red-bright: #e82020;
  --text-dim: #a09070;
  --table-line: rgba(255,255,255,0.55);
  --table-line-thin: rgba(255,255,255,0.3);
  --glow-gold: 0 0 20px rgba(201,168,76,0.4);
  --prop-bg: #2a6e36;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  background: #080e09;
  color: var(--cream);
  font-family: 'DM Mono', monospace;
  overflow-x: hidden;
}

/* ===== CASINO BACKGROUND ===== */
.casino-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #1a3020 0%, transparent 70%),
    #050b06;
}
.casino-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 2px,
    rgba(201,168,76,0.012) 2px, rgba(201,168,76,0.012) 4px
  );
}
.chandelier {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 300px; height: 180px;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,220,120,0.1) 0%, transparent 70%);
}

/* ===== NAV ===== */
.nav-strip {
  position: relative; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 28px;
  background: rgba(0,0,0,0.75);
  border-bottom: 2px solid var(--gold-dim);
  backdrop-filter: blur(10px);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 900;
  color: var(--gold-light); letter-spacing: 3px;
  text-shadow: var(--glow-gold);
}
.nav-links { display: flex; gap: 20px; }
.nav-link {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.72rem; letter-spacing: 2px;
  padding: 4px 10px; border: 1px solid transparent;
  transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-light); border-color: var(--gold-dim);
  text-shadow: var(--glow-gold);
}
.bankroll-display { font-size: 0.82rem; color: var(--gold-light); letter-spacing: 1px; }

/* ===== HUD ===== */
.hud {
  position: relative; z-index: 50;
  display: flex; justify-content: center; gap: 36px;
  padding: 7px; background: rgba(0,0,0,0.55);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.hud-item { text-align: center; }
.hud-label { display: block; font-size: 0.58rem; color: var(--text-dim); letter-spacing: 2px; }
.hud-val { display: block; font-size: 1rem; color: var(--gold-light); font-weight: 500; }

/* ===== PAGE LAYOUT ===== */
.page-layout {
  position: relative; z-index: 10;
  display: flex; gap: 16px;
  padding: 14px 16px;
  max-width: 1400px; margin: 0 auto;
  align-items: flex-start;
}

/* ===== SIDE PANEL ===== */
.side-panel {
  display: flex; flex-direction: column; gap: 12px;
  width: 160px; flex-shrink: 0;
}

/* DICE */
.dice-zone {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dice-display { display: flex; gap: 10px; }
.die { width: 58px; height: 58px; perspective: 300px; }
.die-face {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #fffef2, #e4dcc0);
  border-radius: 10px;
  box-shadow: 2px 2px 0 #b0a070, inset 0 0 6px rgba(255,255,255,0.4), 0 4px 14px rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
}
.die.rolling .die-face { animation: diceRoll 0.4s ease-out; }
@keyframes diceRoll {
  0%   { transform: rotate(0deg) scale(1); }
  25%  { transform: rotate(-15deg) scale(0.9); }
  60%  { transform: rotate(8deg) scale(1.08); }
  100% { transform: rotate(0deg) scale(1); }
}
.pip-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 44px; height: 44px;
}
.pip { display: flex; align-items: center; justify-content: center; }
.pip::after {
  content: '';
  width: 10px; height: 10px;
  background: radial-gradient(circle, #111, #333);
  border-radius: 50%;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
}
.pip.empty::after { display: none; }
.dice-sum-display {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(201,168,76,0.6);
  min-height: 40px; line-height: 1;
}
.roll-btn {
  width: 100%;
  background: linear-gradient(160deg, #8b1a1a, #c01818, #8b1a1a);
  border: 2px solid #e03030;
  border-radius: 7px;
  padding: 11px 8px;
  color: white;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(180,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.15s;
  position: relative; overflow: hidden;
}
.roll-btn:hover { background: linear-gradient(160deg, #a02020, #d82020, #a02020); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(220,40,40,0.5); }
.roll-btn:active { transform: translateY(0); }
.roll-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: translateX(-100%); transition: transform 0.4s;
}
.roll-btn:hover::after { transform: translateX(100%); }

.puck-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.puck {
  width: 78px;
  height: 78px;
  border-radius: 50%;

  background: radial-gradient(circle at 35% 35%, #2a2a2a, #0a0a0a);
  border: 4px solid #666;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 1px;

  color: #777;

  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.08),
    0 3px 10px rgba(0,0,0,0.5);

  transition: all 0.4s;
}
.puck.on {
  background: radial-gradient(circle at 35% 35%, #ffffff, #d8d8d8);

  border-color: #fff;
  color: #111;

  text-shadow:
    0 0 8px rgba(255,215,0,0.7);

  box-shadow:
    0 0 22px rgba(255,255,255,0.55),
    0 0 40px rgba(255,215,0,0.25),
    inset 0 2px 4px rgba(255,255,255,0.4);
}
.puck-label { font-size: 0.58rem; color: var(--text-dim); letter-spacing: 1px; text-align: center; }

/* CHIP PANEL */
.chip-panel {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.chip-panel-label {
  font-size: 0.58rem;
  letter-spacing: 3px;
  color: var(--text-dim);
}

.chips {
  display: grid;
  grid-template-columns: repeat(3, 38px);
  gap: 6px;
  justify-content: center;
}

.chip {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.18);

  font-family: 'DM Mono', monospace;
  font-size: 0.52rem;
  font-weight: 700;

  cursor: pointer;
  transition: all 0.15s;
  color: white;

  box-shadow:
    0 3px 8px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

/* Smaller text for larger chips */
.chip-100000 {
  font-size: 0.42rem;
}

.chip-25000,
.chip-5000,
.chip-1000 {
  font-size: 0.46rem;
}
.chip-1  { background: radial-gradient(circle at 35% 35%, #d8d8d8, #808080); color: #222; }
.chip-5  { background: radial-gradient(circle at 35% 35%, #ff4040, #aa1010); }
.chip-25 { background: radial-gradient(circle at 35% 35%, #44bb44, #1a6e1a); }
.chip-100{ background: radial-gradient(circle at 35% 35%, #5588ff, #1133aa); }
.chip:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 5px 16px rgba(0,0,0,0.5); }
.chip.active { border-color: var(--gold-light); transform: translateY(-3px) scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.5), 0 0 10px rgba(201,168,76,0.4); }

.action-btns { display: flex; gap: 6px; width: 100%; }
.action-btn {
  flex: 1; padding: 6px 4px;
  background: transparent; border: 1px solid var(--gold-dim);
  color: var(--text-dim); font-family: 'DM Mono', monospace;
  font-size: 0.58rem; letter-spacing: 1px; cursor: pointer;
  border-radius: 3px; transition: all 0.15s;
}
.action-btn:hover { color: var(--gold-light); border-color: var(--gold); background: rgba(201,168,76,0.08); }
.bankroll-big {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; color: var(--gold-light);
  text-shadow: var(--glow-gold); letter-spacing: 1px;
}

/* HISTORY */
.history-panel {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 10px; padding: 10px;
}
.history-label { font-size: 0.55rem; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 8px; }
.history-rolls { display: flex; flex-wrap: wrap; gap: 4px; }
.roll-badge {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  animation: badgePop 0.3s ease-out;
}
@keyframes badgePop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.roll-badge.craps-num  { background: #6e1a1a; color: #ffaaaa; }
.roll-badge.natural    { background: #1a5e1a; color: #aaffaa; }
.roll-badge.seven      { background: #8b2000; color: #ffccaa; }
.roll-badge.point      { background: #1a3a7a; color: #aaccff; }
.roll-badge.normal     { background: #1a2a1a; color: #88cc88; }

/* ===== TABLE OUTER ===== */
.table-outer {
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.phase-banner {
  text-align: center; font-size: 0.65rem; letter-spacing: 3px;
  color: var(--gold-light); padding: 5px;
  border: 1px dashed rgba(201,168,76,0.3); border-radius: 4px;
  background: rgba(0,0,0,0.3);
  animation: bannerPulse 2.5s ease-in-out infinite;
}
@keyframes bannerPulse { 0%,100% { opacity:1; } 50% { opacity:0.55; } }

/* ===== THE CRAPS TABLE ===== */
.craps-table {
  display: flex;
  background: var(--felt);
  border: 4px solid #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 6px var(--felt-dark),
    0 0 0 8px #c9a84c,
    0 0 50px rgba(0,0,0,0.8),
    inset 0 0 80px rgba(0,0,0,0.25);
  position: relative;
  min-height: 420px;
}

/* Felt texture */
.craps-table::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0z' fill='rgba(255,255,255,0.018)'/%3E%3C/svg%3E");
}

/* ===== LEFT RAIL ===== */
/* Vertical split: top=Don't Pass, bottom=Pass Line, both rotated */
.left-rail {
  display: flex;
  flex-direction: column;
  width: 44px;
  flex-shrink: 0;
  border-right: 2px solid var(--table-line);
  position: relative; z-index: 2;
}
.lr-dontpass {
  flex: 1;
  background: var(--felt);
  border-bottom: 2px solid var(--table-line);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background 0.15s;
}
.lr-dontpass:hover { background: rgba(255,255,255,0.08); }
.lr-passline {
  flex: 2;
  background: var(--felt);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background 0.15s;
}
.lr-passline:hover { background: rgba(255,255,255,0.08); }
.lr-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 2px;
  color: var(--white);
  text-align: center; line-height: 1;
  white-space: nowrap;
}
.lr-big {
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem !important; font-weight: 700 !important;
  letter-spacing: 3px !important;
}

/* ===== TABLE BODY ===== */
.table-body {
  flex: 1;
  display: flex; flex-direction: column;
  min-width: 0;
  position: relative; z-index: 2;
}

/* --- ROW TOP: Don't Come + Numbers + C/E --- */
.row-top {
  display: flex;
  border-bottom: 2px solid var(--table-line);
  min-height: 90px;
}

.dontcome-box {
  width: 72px; flex-shrink: 0;
  border-right: 2px solid var(--table-line);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px 4px;
  cursor: pointer; gap: 4px;
  transition: background 0.15s;
}
.dontcome-box:hover { background: rgba(255,255,255,0.08); }
.dc-top-label {
  font-family: 'Crimson Pro', serif;
  font-style: italic; font-size: 0.72rem;
  color: var(--white); text-align: center; line-height: 1.3;
}
.dc-dice-icons { font-size: 1rem; letter-spacing: 2px; opacity: 0.7; }

.numbers-strip {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  min-width: 0;
}

.place-num {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-right: 2px solid var(--table-line);
  padding: 8px 4px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  gap: 3px;
}
.place-num:last-child { border-right: none; }
.place-num:hover { background: rgba(255,255,255,0.1); }

.pn-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; font-weight: 900;
  color: var(--white); line-height: 1;
}
.pn-italic { font-style: italic; font-size: 1.4rem !important; }
.pn-odds {
  font-size: 0.58rem; color: rgba(255,255,255,0.6);
  letter-spacing: 1px;
}
.place-best .pn-num { color: var(--gold-light); text-shadow: 0 0 8px rgba(201,168,76,0.5); }
.place-num.is-point {
  background: rgba(255,255,255,0.15) !important;
}
.place-num.is-point .pn-num {
  color: #fff; text-shadow: 0 0 12px rgba(255,255,255,0.8);
}
.place-num.is-point::after {
  content: '★';
  position: absolute; top: 2px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem; color: var(--gold-light);
}

/* C/E Column */
.ce-col {
  display: flex; flex-direction: column;
  width: 38px; flex-shrink: 0;
  border-left: 2px solid var(--table-line);
}
.ce-cell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  transition: background 0.15s;
}
.ce-cell:hover { background: rgba(255,255,255,0.1); }
.ce-cell:first-child { border-bottom: 2px solid var(--table-line); }
.ce-cell span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem; font-weight: 700; color: var(--white);
  pointer-events: none;
}

/* --- ROW COME --- */
.row-come {
  display: flex;
  border-bottom: 2px solid var(--table-line);
  min-height: 70px;
}
.come-cell {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.come-cell:hover { background: rgba(255,255,255,0.08); }
.come-big {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 900;
  color: var(--red-bright);
  letter-spacing: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.odds-cell {
  width: 80px; flex-shrink: 0;
  border-left: 2px dashed rgba(255,255,255,0.35);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; padding: 8px 4px;
  background: rgba(0,0,80,0.2);
  transition: background 0.15s;
}
.odds-cell:hover { background: rgba(50,50,150,0.3); }
.odds-title {
  font-size: 0.6rem; letter-spacing: 2px;
  color: var(--white); text-align: center;
}
.odds-edge {
  font-size: 0.58rem; color: #88ff88;
  letter-spacing: 1px;
}

/* --- ROW FIELD --- */
.row-field {
  border-bottom: 2px solid var(--table-line);
}
.field-cell {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  cursor: pointer; position: relative; min-height: 52px;
  transition: background 0.15s;
}
.field-cell:hover { background: rgba(255,255,255,0.07); }
.field-content {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex: 1;
}
.field-doub {
  font-family: 'Crimson Pro', serif;
  font-size: 0.85rem; color: var(--white);
}
.field-doub:first-child, .field-doub:last-child { color: var(--red-bright); font-weight: 600; }
.field-nums-row {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700;
  color: var(--gold-light); letter-spacing: 3px;
}
.field-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 4px;
  margin-left: 10px;
}

/* --- ROW DON'T PASS --- */
.row-dontpass {
  border-bottom: 2px solid var(--table-line);
}
.dontpass-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 8px 16px; min-height: 38px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.dontpass-strip:hover { background: rgba(255,255,255,0.07); }
.dp-text {
  font-family: 'Crimson Pro', serif;
  font-style: italic; font-size: 0.95rem;
  color: var(--white); letter-spacing: 1px;
}
.dp-dice { font-size: 1rem; letter-spacing: 3px; opacity: 0.7; }

/* --- ROW PASS LINE --- */
.row-passline {
  /* no border-bottom, it's the last row */
}
.passline-strip {
  display: flex; align-items: center; justify-content: center;
  padding: 12px 16px; min-height: 50px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.passline-strip:hover { background: rgba(255,255,255,0.08); }
.pl-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 900;
  color: var(--white); letter-spacing: 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ===== PROPS COLUMN ===== */
.props-col {
  width: 130px; flex-shrink: 0;
  border-left: 3px solid var(--table-line);
  display: flex; flex-direction: column;
  position: relative; z-index: 2;
  background: var(--prop-bg);
}

.props-header-label {
  text-align: center;
  font-size: 0.6rem; letter-spacing: 2px;
  color: var(--white); font-weight: 700;
  padding: 7px 4px;
  border-bottom: 2px solid var(--table-line);
  line-height: 1.4;
}

.prop-any7 {
  border-bottom: 2px solid var(--table-line);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 6px; gap: 2px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.prop-any7:hover { background: rgba(255,255,255,0.08); }

.prop-red-name {
  font-family: 'Crimson Pro', serif;
  font-style: italic; font-size: 1.2rem;
  color: var(--red-bright); font-weight: 600;
}
.prop-italic-odds {
  font-family: 'Crimson Pro', serif;
  font-style: italic; font-size: 0.82rem;
  color: var(--white);
}

.prop-hardways-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  flex: 1;
}

.prop-cell {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-right: 1px solid var(--table-line-thin);
  border-bottom: 1px solid var(--table-line-thin);
  padding: 7px 4px; gap: 3px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.prop-cell:hover { background: rgba(255,255,255,0.1); }
.prop-cell:nth-child(even) { border-right: none; }

.prop-die-pair {
  display: flex; gap: 2px;
}
.mini-die {
  font-size: 1.3rem; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.prop-pay-text {
  font-family: 'Crimson Pro', serif;
  font-style: italic; font-size: 0.72rem;
  color: var(--white);
}

.prop-anycraps {
  border-top: 2px solid var(--table-line);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 6px; gap: 2px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.prop-anycraps:hover { background: rgba(255,255,255,0.08); }

.prop-horn {
  border-top: 1px solid var(--table-line-thin);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 6px; gap: 2px;
  cursor: pointer; position: relative;
  transition: background 0.15s;
}
.prop-horn:hover { background: rgba(255,255,255,0.08); }
.prop-horn-label {
  font-size: 0.65rem; letter-spacing: 2px;
  color: var(--gold-light); font-weight: 700;
}
.prop-horn-sub {
  font-family: 'Crimson Pro', serif;
  font-size: 0.72rem; color: rgba(255,255,255,0.6);
}

/* ===== BET CHIPS ===== */
.bet-chip-holder {
  position: absolute; bottom: 3px; right: 3px;
  display: flex; flex-wrap: wrap; gap: 2px;
  max-width: 44px; z-index: 5;
  pointer-events: none;
}
/* TABLE STACKED CHIPS */
.chip-stack {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 6px rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:11px;
}

/* BANK CHIPS (static selection) */
.chip-bank {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:bold;
}

.chip-stack.c1   { background: radial-gradient(circle at 35% 35%, #e0e0e0, #888); color: #222; }
.chip-stack.c5   { background: radial-gradient(circle at 35% 35%, #ff4444, #aa1111); }
.chip-stack.c25  { background: radial-gradient(circle at 35% 35%, #44bb44, #1a6e1a); }
.chip-stack.c100 { background: radial-gradient(circle at 35% 35%, #5588ff, #1133aa); }

/* has-bet glow on cells */
.has-bet { box-shadow: inset 0 0 0 2px rgba(255,220,80,0.5) !important; }

/* Win / Lose flash */
.winner { animation: winFlash 0.7s ease-in-out; }
.loser  { animation: loseFlash 0.5s ease-in-out; }
@keyframes winFlash {
  0%,100% { background: inherit; }
  40% { background: rgba(50,220,50,0.45); box-shadow: inset 0 0 20px rgba(50,255,50,0.4); }
}
@keyframes loseFlash {
  0%,100% { background: inherit; }
  40% { background: rgba(220,40,40,0.45); box-shadow: inset 0 0 16px rgba(255,0,0,0.3); }
}

/* Float amounts */
.float-amount {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 700;
  pointer-events: none; z-index: 100;
  animation: floatUp 1.3s ease-out forwards;
}
.float-amount.win { color: #66ff66; text-shadow: 0 0 10px rgba(100,255,100,0.6); }
.float-amount.lose { color: #ff5555; text-shadow: 0 0 10px rgba(255,80,80,0.5); }
@keyframes floatUp {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px); }
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: fixed; z-index: 9999;
  background: rgba(4,12,5,0.97);
  border: 1px solid var(--gold);
  border-radius: 8px; padding: 10px 14px;
  max-width: 240px; font-size: 0.72rem; line-height: 1.6;
  color: var(--cream); pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.12s, transform 0.12s;
  box-shadow: 0 8px 28px rgba(0,0,0,0.7), 0 0 16px rgba(201,168,76,0.15);
}
.tooltip.visible { opacity: 1; transform: translateY(0); }

/* ===== MESSAGE OVERLAY ===== */
.msg-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.82);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  backdrop-filter: blur(5px);
}
.msg-overlay.visible { opacity: 1; pointer-events: all; }
.msg-box {
  background: linear-gradient(160deg, #0a1f0e, #050c06);
  border: 2px solid var(--gold); border-radius: 14px;
  padding: 36px; max-width: 400px; width: 90%;
  text-align: center;
  box-shadow: 0 0 80px rgba(0,0,0,0.9), 0 0 40px rgba(201,168,76,0.2);
}
.msg-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem; font-weight: 900;
  margin-bottom: 14px; letter-spacing: 2px;
}
.msg-title.win  { color: var(--gold-light); text-shadow: 0 0 24px rgba(201,168,76,0.7); }
.msg-title.lose { color: #cc4444; text-shadow: 0 0 18px rgba(200,0,0,0.5); }
.msg-title.push { color: #aaaaaa; }
.msg-title.info { color: var(--gold-light); }
.msg-body {
  font-size: 0.88rem; line-height: 1.7;
  color: var(--cream); margin-bottom: 22px;
  white-space: pre-line;
}
.msg-btn {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none; color: #000;
  font-family: 'DM Mono', monospace; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 3px; padding: 11px 28px; border-radius: 5px;
  cursor: pointer; transition: all 0.15s;
}
.msg-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(201,168,76,0.4); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .page-layout { flex-direction: column; padding: 8px; gap: 10px; }
  .side-panel { flex-direction: row; width: 100%; flex-wrap: wrap; }
  .dice-zone { flex: 1; min-width: 160px; }
  .chip-panel { flex: 1; min-width: 140px; }
  .history-panel { flex: 1; min-width: 120px; }
  .props-col { width: 110px; }
  .pn-num { font-size: 1.3rem !important; }
  .come-big { font-size: 1.5rem !important; }
  .pl-text { font-size: 1.1rem !important; letter-spacing: 4px !important; }
}

@media (max-width: 700px) {
  .props-col { display: none; }
  .ce-col { display: none; }
  .left-rail { width: 32px; }
}

/* chip holder must allow absolutely-positioned chips */
[id^="chip-"] { position: relative; min-height: 30px; }

/* base chip */
.chip{
  position:relative;
  width:34px;
  height:34px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,0.85);
  box-shadow:0 3px 6px rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:11px;
  letter-spacing:.2px;
  user-select:none;
}

/* colors */
.chip-100{ background:#0b0b0b; color:#fff; }
.chip-25 { background:#1e7f32; color:#fff; }
.chip-5  { background:#c62828; color:#fff; }
.chip-1  { background:#f4f4f4; color:#111; border-color:rgba(0,0,0,0.25); }

.chip-500{
  background: radial-gradient(circle at 35% 35%, #7b1fa2, #4a148c);
  color:#fff;
}

.chip-1000{
  background: radial-gradient(circle at 35% 35%, #f57c00, #e65100);
  color:#fff;
}

.chip-5000{
  background: radial-gradient(circle at 35% 35%, #00897b, #004d40);
  color:#fff;
}

.chip-25000{
  background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
  color:#000;
}

.chip-100000{
  background: radial-gradient(circle at 35% 35%, #ffffff, #9e9e9e);
  color:#000;
  border-color:#ffd700;
}


#tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.15s ease;
}

.roll-result {
  position: fixed;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid gold;
  padding: 16px 22px;
  border-radius: 10px;
  font-size: 14px;
  color: #fff;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.roll-result.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.roll-result.win { border-color: #4caf50; }
.roll-result.lose { border-color: #e53935; }

.chip-stack.chip-1 {
  background: radial-gradient(circle at 35% 35%, #f4f4f4, #888);
  color: #111;
}

.chip-stack.chip-5 {
  background: radial-gradient(circle at 35% 35%, #ff4040, #aa1010);
  color: #fff;
}

.chip-stack.chip-25 {
  background: radial-gradient(circle at 35% 35%, #44bb44, #1a6e1a);
  color: #fff;
}

.chip-stack.chip-100 {
  background: radial-gradient(circle at 35% 35%, #222, #000);
  color: #fff;
}

.chip-stack.chip-500 {
  background: radial-gradient(circle at 35% 35%, #7b1fa2, #4a148c);
  color: #fff;
}

.chip-stack.chip-1000 {
  background: radial-gradient(circle at 35% 35%, #f57c00, #e65100);
  color: #fff;
}

.chip-stack.chip-5000 {
  background: radial-gradient(circle at 35% 35%, #00897b, #004d40);
  color: #fff;
}

.chip-stack.chip-25000 {
  background: radial-gradient(circle at 35% 35%, #ffd700, #b8860b);
  color: #000;
}

.chip-stack.chip-100000 {
  background: radial-gradient(circle at 35% 35%, #ffffff, #9e9e9e);
  color: #000;
  border-color: #ffd700;
}


#academyPanel {
  width: 160px !important;
}

.academyBox {
  min-height: 44px;
  color: #f5ead0;
  line-height: 1.4;
  overflow: visible;
}

#edgePanel:empty::before {
  content: "Active Edges";
  color: #f5ead0;
}

#statsPanel:empty::before {
  content: "Session stats will appear here.";
  color: #f5ead0;
}

#riskPanel:empty::before {
  content: "Risk level will appear here.";
  color: #f5ead0;
}

.chip-stack {
  font-size: 10px !important;
  font-weight: 800;
  text-align: center;
  line-height: 1;
}

.chip-stack.chip-5,
.chip-stack.chip-25,
.chip-stack.chip-100,
.chip-stack.chip-500,
.chip-stack.chip-1000,
.chip-stack.chip-5000,
.chip-stack.chip-25000,
.chip-stack.chip-100000 {
  color: #fff !important;
}

.chip-stack.chip-1,
.chip-stack.chip-25000,
.chip-stack.chip-100000 {
  color: #111 !important;
}


.guide-links {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
}

.guide-links h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.guide-links p {
  margin-bottom: 30px;
  color: #bbb;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.guide-card {
  background: #111;
  border: 1px solid #222;
  padding: 20px;
  border-radius: 12px;
  text-decoration: none;
  color: white;
  transition: 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-4px);
  border-color: #d4af37;
}

.guide-card h3 {
  margin-bottom: 10px;
  color: #d4af37;
}

.guide-card p {
  color: #ccc;
  font-size: 0.95rem;
}

.guide-card {
  opacity: 1 !important;
  visibility: visible !important;
}

.guide-card h3,
.guide-card p {
  opacity: 1 !important;
  visibility: visible !important;
  color: #fff !important;
}

.guide-card p {
  color: #ccc !important;
}


/* ===== FORCE GUIDE VISIBILITY ===== */

.guide-links {
  position: relative;
  z-index: 9999;
  margin-top: 80px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.guide-card {
  display: block !important;
  background: #101010 !important;
  border: 2px solid #c9a84c !important;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none !important;
  min-height: 170px;

  opacity: 1 !important;
  visibility: visible !important;

  color: #ffffff !important;
}

.guide-card * {
  opacity: 1 !important;
  visibility: visible !important;
}

.guide-card h3 {
  color: #e8c96a !important;
  margin-bottom: 12px;
}

.guide-card p {
  color: #dddddd !important;
}

/* ===== ACTIVE POINT HIGHLIGHT ===== */

.place-num.is-point {
  background:
    radial-gradient(circle at center, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.04) 60%),
    rgba(255, 255, 255, 0.10) !important;

  box-shadow:
    inset 0 0 0 3px rgba(255, 215, 0, 0.95),
    inset 0 0 18px rgba(255, 215, 0, 0.65),
    0 0 16px rgba(255, 215, 0, 0.75),
    0 0 32px rgba(255, 215, 0, 0.35) !important;

  z-index: 10;
}

.place-num.is-point .pn-num {
  color: #fff8c8 !important;
  text-shadow:
    0 0 8px rgba(255, 215, 0, 0.9),
    0 0 18px rgba(255, 215, 0, 0.7),
    0 2px 4px rgba(0,0,0,0.7) !important;
}

.place-num.is-point .pn-odds {
  color: #fff2a8 !important;
  font-weight: 700;
}

.place-num.is-point::before {
  content: "POINT";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.52rem;
  letter-spacing: 2px;
  color: #ffe680;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
  z-index: 20;
}