/* =========================================================
   CASINO THEME (Felt + Gold + Neon)
   - Drop-in replacement for existing class names in your site
   - No external images required
========================================================= */

:root{
  --bg0:#05070b;
  --bg1:#07110d;
  --felt:#0a4d33;
  --felt2:#073626;
  --feltGlow: rgba(32, 201, 151, .18);
  --gold:#f6c343;
  --gold2:#c99a2b;
  --red:#ff4d4d;
  --blue:#2d6bff;
  --ink:#071018;
  --card:#0e1620;
  --line: rgba(255,255,255,.12);
  --line2: rgba(255,255,255,.18);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --shadow2: 0 10px 22px rgba(0,0,0,.35);
  --radius: 16px;
  --radius2: 22px;
}

/* ================================
   GLOBAL
================================ */
*{ box-sizing:border-box; }

html, body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text);
  overflow-x:hidden;

  /* Felt + vignette + subtle pattern */
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(246,195,67,.12), rgba(0,0,0,0) 60%),
    radial-gradient(900px 500px at 50% 20%, rgba(32,201,151,.18), rgba(0,0,0,0) 55%),
    radial-gradient(1200px 900px at 50% 120%, rgba(0,0,0,.65), rgba(0,0,0,.92) 65%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.02) 0 6px, rgba(0,0,0,0) 6px 12px),
    radial-gradient(circle at 30% 30%, var(--felt), var(--felt2) 65%, #04130d 100%);
}

a{
  color: #b7ccff;
  text-decoration:none;
}
a:hover{ text-decoration: underline; }

/* Selection */
::selection{ background: rgba(246,195,67,.25); }

/* ================================
   TOP BAR
================================ */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;

  padding: 14px 18px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;

  background:
    radial-gradient(800px 140px at 50% 0%, rgba(246,195,67,.18), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(6,10,16,.92), rgba(6,10,16,.75));
  border-bottom: 1px solid rgba(246,195,67,.18);
  backdrop-filter: blur(8px);
}

.topbar a{ color:#dbe6ff; }

.title{
  font-weight: 900;
  letter-spacing: .4px;
  font-size: 18px;
  text-shadow: 0 2px 14px rgba(0,0,0,.5);
}

.right{
  display:flex;
  gap: 12px;
  align-items:center;
  flex-wrap: wrap;
}

/* ================================
   LAYOUT / CARDS
================================ */
.wrap{
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 14px 40px;
}

.card{
  background:
    radial-gradient(900px 420px at 30% 0%, rgba(246,195,67,.08), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(14,22,32,.92), rgba(10,16,24,.92));
  border: 1px solid rgba(246,195,67,.14);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: var(--shadow);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 14px;
  align-items:start;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
}

/* ================================
   BADGES / SMALL TEXT
================================ */
.small{
  font-size: 13px;
  color: var(--muted);
}

.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  font-weight: 800;
  letter-spacing: .2px;
}

/* ================================
   BUTTONS
================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.22);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow2);
  transition: transform .12s ease, filter .12s ease, background .12s ease;
  user-select:none;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.08); }
.btn:active{ transform: translateY(1px); filter: brightness(.98); }

.btn2{
  border-color: rgba(246,195,67,.30);
  background: linear-gradient(180deg, rgba(246,195,67,.95), rgba(201,154,43,.92));
  color: #1a1400;
}
.btnDanger{
  border-color: rgba(255,77,77,.35);
  background: linear-gradient(180deg, rgba(255,77,77,.95), rgba(178,34,34,.92));
  color: #140202;
}

.btnSmall{
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 900;
  cursor:pointer;
}

.btnClear{
  background: rgba(45,107,255,.18);
  border-color: rgba(45,107,255,.28);
  color: #dfe8ff;
}
.btnMax{
  background: rgba(246,195,67,.22);
  border-color: rgba(246,195,67,.30);
  color: #fff;
}

/* ================================
   INPUTS
================================ */
input, select{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  color: #fff;
  outline: none;
}
input:focus, select:focus{
  border-color: rgba(246,195,67,.35);
  box-shadow: 0 0 0 4px rgba(246,195,67,.12);
}

/* ================================
   TABLES
================================ */
table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: var(--radius);
}
th, td{
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  text-align:left;
  vertical-align: middle;
}
thead th{
  font-weight: 900;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(246,195,67,.18);
}
tbody tr:hover{ background: rgba(246,195,67,.06); }

/* ================================
   CHAT
================================ */
.chatBox{
  height: 340px;
  overflow:auto;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.20);
  padding: 10px;
}

.chatLine{
  margin: 0 0 8px 0;
  line-height: 1.35;
}
.chatUser{ font-weight: 900; color: #ffe39a; }
.chatTime{ font-size: 11px; opacity: .65; margin-left: 8px; }

.chatForm{
  margin-top: 10px;
  display:flex;
  gap: 10px;
}
.chatForm input{
  flex: 1;
}

/* ================================
   GAME AREA polish
================================ */
.tableFelt{
  border-radius: var(--radius2);
  border: 1px solid rgba(246,195,67,.18);
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(32,201,151,.20), rgba(0,0,0,0) 55%),
    radial-gradient(900px 600px at 50% 100%, rgba(0,0,0,.45), rgba(0,0,0,.75)),
    linear-gradient(180deg, rgba(10,77,51,.78), rgba(7,54,38,.88));
  box-shadow: var(--shadow);
  padding: 14px;
}

/* Chip betting UI (kept compatible with your newer lobby.php) */
.betPanel{
  margin-top:12px; padding:12px; border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
}
.betTop{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.betAmt{font-size:22px;font-weight:900;letter-spacing:.4px}
.chipRow{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:12px}
.chip{
  width:52px;height:52px;border-radius:999px;
  border:2px solid rgba(255,255,255,.22);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,.06) 45%, rgba(0,0,0,.15));
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  display:flex;align-items:center;justify-content:center;
  font-weight:900; cursor:pointer; user-select:none;
  transition: transform .12s ease, filter .12s ease;
}
.chip:hover{transform: translateY(-2px) scale(1.03); filter: brightness(1.05);}
.chip:active{transform: translateY(1px) scale(.98);}
.chip.badge5{outline:2px solid rgba(45,107,255,.45)}
.chip.badge25{outline:2px solid rgba(32,201,151,.45)}
.chip.badge100{outline:2px solid rgba(246,195,67,.55)}
.chip.badge500{outline:2px solid rgba(255,77,77,.55)}

.chipStack{display:flex;gap:8px;align-items:flex-end;min-height:60px;margin-top:10px}
.stackChip{
  width:44px;height:44px;border-radius:999px;
  border:2px solid rgba(255,255,255,.20);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,.06) 45%, rgba(0,0,0,.15));
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  transform: translateY(10px) scale(.9);
  opacity:0;
  animation: chipIn .18s ease forwards;
  position: relative;
}
@keyframes chipIn{ to{transform: translateY(0) scale(1); opacity:1;} }
.stackChip .txt{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-weight:900; font-size:12px; opacity:.9;
}

/* Turn indicator classes (compatible with your existing lobby.php) */
.turnBanner{
  margin-top:10px;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(32,201,151,.10);
  color: #bff8e6;
  font-weight: 900;
}
.turnTimer{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(45,107,255,.10);
}
.turnTimer .label{ opacity:.85; font-weight:900; }
.turnTimer .time{
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: .6px;
}
.turnTimer.low{
  background: rgba(255,77,77,.10);
  border-color: rgba(255,77,77,.35);
}
.turnPulse{
  position: relative;
  border: 2px solid rgba(32,201,151,.75);
  box-shadow: 0 0 0 0 rgba(32,201,151,.35);
  animation: pulseGlow 1.2s ease-in-out infinite;
  border-radius: 12px;
  padding: 10px;
}
@keyframes pulseGlow{
  0%   { box-shadow: 0 0 0 0 rgba(32,201,151,.35); }
  70%  { box-shadow: 0 0 0 10px rgba(32,201,151,0); }
  100% { box-shadow: 0 0 0 0 rgba(32,201,151,0); }
}
.turnTag{
  display:inline-block;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  background: rgba(32,201,151,.18);
  border: 1px solid rgba(32,201,151,.45);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .4px;
}

/* Little helper: code blocks */
code{
  background: rgba(0,0,0,.25);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
}

.link{color:#8fb3ff;text-decoration:none}
.link:hover{text-decoration:underline}
