/* ================= CI เติมเกมออนไลน์: โต๊ะแบรนด์ ================= */

/* แถบบน: ไล่สีแบรนด์ + เส้นแสงด้านล่าง */
.topbar {
  background: linear-gradient(90deg, rgba(11, 16, 32, 0.95), rgba(19, 37, 74, 0.92) 60%, rgba(11, 16, 32, 0.95));
  border-bottom: 0;
  box-shadow: 0 1px 0 rgba(96, 165, 250, 0.25), 0 8px 30px -12px rgba(43, 127, 255, 0.6);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, transparent, #2b7fff 30%, #60a5fa 50%, #2b7fff 70%, transparent);
  animation: beam 4s linear infinite; background-size: 200% 100%;
}
@keyframes beam { to { background-position: -200% 0; } }
.topbar .logo { width: 118px; height: 36px; margin: 0; object-fit: cover; filter: drop-shadow(0 0 10px rgba(43, 127, 255, 0.55)); }
.topbar .title { font-size: 24px; background: linear-gradient(180deg, #fff, #93c5fd 60%, #2b7fff); -webkit-background-clip: text; background-clip: text; }

/* โต๊ะสักหลาดแบรนด์ */
.table { isolation: isolate; }
.felt {
  position: absolute; z-index: -1;
  width: min(94vw, 760px); height: min(62%, 420px); min-height: 250px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(43, 127, 255, 0.28), transparent 65%),
    repeating-linear-gradient(115deg, rgba(96, 165, 250, 0.045) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, #13254a, #0d1a36 60%, #0a1328);
  box-shadow:
    0 0 0 3px rgba(43, 127, 255, 0.55),
    0 0 0 10px rgba(11, 16, 32, 0.9),
    0 0 0 12px rgba(96, 165, 250, 0.35),
    0 0 50px 8px rgba(43, 127, 255, 0.35),
    inset 0 0 60px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(147, 197, 253, 0.25);
  display: grid; place-items: center;
  overflow: hidden;
}
.felt::before { /* แสงวิ่งรอบขอบโต๊ะ */
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from var(--fa, 0deg), transparent 0 80%, rgba(96, 165, 250, 0.35) 88%, transparent 96%);
  animation: felt-spin 7s linear infinite;
}
@property --fa { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes felt-spin { to { --fa: 360deg; } }
.felt .wm { position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%); width: clamp(120px, 26%, 190px); aspect-ratio: 3.4; object-fit: cover; opacity: 0.26; filter: drop-shadow(0 0 8px rgba(43, 127, 255, 0.5)); }
.felt .wm-text { position: absolute; top: 7%; left: 50%; transform: translateX(-50%); font-family: 'Kanit'; font-size: 11px; letter-spacing: 4px; color: rgba(147, 197, 253, 0.3); white-space: nowrap; }
.hero-logo { display: block; width: 180px; height: 53px; object-fit: cover; margin: 10px auto 0; filter: drop-shadow(0 0 12px rgba(43, 127, 255, 0.55)); }
.dir-ring { width: min(84vw, 680px); border-color: rgba(147, 197, 253, 0.18); }
.color-glow { width: min(50vw, 300px); opacity: 0.75; }

/* กองไพ่บนโต๊ะ: ฐานเรืองแสง */
.pile::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -10px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); filter: blur(6px); z-index: -1; }
.color-chip { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 18px var(--cur); }

/* ผู้เล่น: กระจกขอบแบรนด์ */
.opp {
  background: linear-gradient(180deg, rgba(19, 37, 74, 0.75), rgba(13, 20, 38, 0.85));
  border: 1px solid rgba(96, 165, 250, 0.22);
  backdrop-filter: blur(6px);
}
.opp .count i { background: linear-gradient(135deg, #2b7fff, #60a5fa); }
.av img, .av .ph { border-color: rgba(96, 165, 250, 0.45); background: linear-gradient(135deg, #1a4f9c, #2b7fff); }

/* แถบของเรา */
.me-bar {
  margin: 0 10px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(19, 37, 74, 0.7), rgba(13, 20, 38, 0.6));
  border: 1px solid rgba(96, 165, 250, 0.18);
}
.turn-banner { background: rgba(13, 26, 54, 0.92); border-color: rgba(96, 165, 250, 0.3); }

/* ล็อบบี้: ที่นั่งเป็นกระจกแบรนด์ */
.seat { background: linear-gradient(180deg, rgba(19, 37, 74, 0.7), rgba(13, 20, 38, 0.8)); border-color: rgba(96, 165, 250, 0.22); }
.hero .uno-word { filter: drop-shadow(0 6px 30px rgba(43, 127, 255, 0.75)); }

/* หน้าต่างโมดัล */
.sheet { background: linear-gradient(180deg, #13254a, #0f172a 55%); border-color: rgba(96, 165, 250, 0.3); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(43, 127, 255, 0.5); }
.sheet::before { content: ""; display: block; width: 160px; height: 46px; margin: -4px auto 10px; background: url('./assets/logo-v2.webp') 50% 48% / 160px 160px no-repeat; filter: drop-shadow(0 0 10px rgba(43, 127, 255, 0.5)); }

/* ===== ตั้งค่าห้อง UNO ===== */
.settings { width: min(560px, 100%); border-radius: 18px; padding: 14px 16px; background: linear-gradient(180deg, rgba(19, 37, 74, 0.7), rgba(13, 20, 38, 0.85)); border: 1px solid rgba(96, 165, 250, 0.25); }
.settings h3 { margin: 0 0 10px; font-family: 'Kanit'; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.settings h3 small { font-family: 'IBM Plex Sans Thai'; font-weight: 400; color: var(--muted); font-size: 12px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(96, 165, 250, 0.1); }
.set-row:first-of-type { border-top: 0; }
.set-row .lbl { font-size: 14px; }
.set-row .lbl small { display: block; color: var(--muted); font-size: 11px; }
.seg { display: flex; gap: 4px; background: rgba(5, 8, 15, 0.5); padding: 3px; border-radius: 10px; }
.seg button { padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; background: transparent; color: var(--muted); }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(43, 127, 255, 0.8); }
.seg button:disabled { cursor: default; }
.toggle { width: 46px; height: 26px; border-radius: 99px; background: #334155; position: relative; transition: background 0.2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.toggle.on { background: linear-gradient(135deg, #2b7fff, #60a5fa); }
.toggle.on::after { transform: translateX(20px); }
.toggle:disabled { opacity: 0.7; cursor: default; }
.stack-badge { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; font-family: 'Kanit'; font-size: 15px; background: linear-gradient(135deg, #dc2626, #a855f7); box-shadow: 0 0 18px rgba(239, 68, 68, 0.7); white-space: nowrap; animation: pulse 0.8s infinite; }
