/* Table games (js/tableui.js): menu, lobby, play bar and results in a dark glass look; each game
   sets --accent. The game's own field lives in .tb-stage. */

.tb { --accent: #00aff0; --glass: rgba(18, 24, 33, .86); --line: rgba(255, 255, 255, .1); position: relative; min-height: 100%; color: #eef2f6;
	font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	background: radial-gradient(1100px 600px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%), linear-gradient(180deg, #121821, #0a0e14); }
.tb button { font: inherit; cursor: pointer; }
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--line);
	background: rgba(255, 255, 255, .06); color: #eef2f6; font-weight: 800; font-size: 15px; text-decoration: none; transition: transform .12s, background .15s; }
.tb-btn:hover:not([disabled]) { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.tb-btn.go { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 26px -12px var(--accent); }
.tb-btn.go:hover:not([disabled]) { background: color-mix(in srgb, var(--accent) 85%, #000); }
.tb-btn.ghost { background: transparent; }
.tb-btn.small { padding: 6px 14px; font-size: 13px; }
.tb-btn[disabled] { opacity: .45; cursor: default; }
.tb-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.tb-menu { max-width: 860px; margin: 0 auto; padding: 44px 18px 40px; }
.tb-title { text-align: center; margin-bottom: 28px; }
.tb-title h1 { margin: 0 0 8px; font: 800 clamp(36px, 6vw, 56px)/1.02 'Nunito', sans-serif; letter-spacing: -.03em; }
.tb-title p { margin: 0 auto; max-width: 34em; color: #a9b4c2; font-size: 17px; }
.tb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tb-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); }
.tb-card h2 { margin: 0; font-size: 20px; }
.tb-card p { margin: 0 0 4px; color: #a9b4c2; }
.tb-join { display: flex; gap: 8px; }
.tb-join input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, .3); color: #fff;
	font: 800 16px 'Nunito', sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.tb-ranked { margin-top: 16px; padding: 20px; border-radius: 20px; background: var(--glass); border: 1px solid var(--accent); }
.tb-ranked > h2 { margin: 0 0 4px; font-size: 20px; }
.tb-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.tb-mode { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); text-align: center; min-width: 0; }
.tb-mode h3 { margin: 0; font-size: 15px; letter-spacing: .06em; color: var(--accent); }
.tb-rating { font-size: 30px; line-height: 1; }
.tb-mode small { color: #a9b4c2; font-weight: 700; }
.tb-wait { min-height: 18px; font-size: 13px; font-weight: 800; color: #a9b4c2; }
.tb-mode ol { width: 100%; margin: 2px 0 0; padding: 0; list-style: none; font-size: 13px; border-top: 1px solid var(--line); }
.tb-mode ol li { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; }
.tb-mode ol span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-rules { margin-top: 18px; padding: 16px 20px; border-radius: 18px; border: 1px dashed var(--line); }
.tb-rules h3 { margin: 0 0 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.tb-rules ul { margin: 0; padding-left: 18px; color: #c4ccd6; }
.tb-foot { text-align: center; margin-top: 20px; }

.tb-lobby { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); }
.tb-lobby h2 { margin: 0; font-size: 22px; }
.tb-code { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); }
.tb-code span { color: #a9b4c2; font-weight: 800; font-size: 13px; }
.tb-code b { flex: 1; font-size: 30px; letter-spacing: .22em; user-select: all; }
.tb-link { width: 100%; box-sizing: border-box; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: #a9b4c2; font: 600 12px monospace; }
.tb-seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tb-seats li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-weight: 800; }
.tb-seats li i { width: 12px; height: 12px; border-radius: 50%; background: var(--pc, #555); flex: none; }
.tb-seats li span { flex: 1; }
.tb-seats li em { font-style: normal; font-size: 12px; color: #a9b4c2; }
.tb-seats li em.away { color: #ff9c8a; }
.tb-seats li.free { color: #5e6976; font-weight: 700; border: 1px dashed var(--line); background: none; }
.tb-x { border: 0; background: none; color: #a9b4c2; padding: 2px 6px; }
.tb-x:hover { color: #ff9c8a; }
.tb-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tb-row .tb-btn { flex: 1; }
.tb-opts { display: flex; flex-direction: column; gap: 6px; }
.tb-opts label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-weight: 800; }
.tb-opts select { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: #1a222d; color: #eef2f6; font: inherit; }
.tb-note { margin: 0; color: #a9b4c2; font-size: 14px; }

.tb-play { display: flex; flex-direction: column; min-height: 100%; }
.tb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.tb-bar b { font-size: 16px; }
.tb-players { flex: 1; color: #a9b4c2; font-weight: 700; font-size: 14px; }
.tb-stage { flex: 1; position: relative; }

.tb-over { position: fixed; inset: var(--op-bar, 0) 0 0 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 12, .6); animation: tb-fade .3s; }
@keyframes tb-fade { from { opacity: 0; } }
.tb-panel { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: #151c26; border: 1px solid var(--line); text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, .6); }
.tb-panel h2 { margin: 0; font-size: 38px; letter-spacing: -.02em; }
.tb-panel h2.won { color: #ffd76a; }
.tb-table { width: 100%; border-collapse: collapse; font-weight: 700; }
.tb-table th { font-size: 12px; color: #a9b4c2; text-align: left; padding: 6px 8px; }
.tb-table td { padding: 8px; border-top: 1px solid var(--line); text-align: left; }
.tb-table td:last-child, .tb-table th:last-child { text-align: right; }
.tb-table tr.me td { background: rgba(255, 255, 255, .06); }
.tb-reward { margin: 0; color: #ffd76a; font-weight: 800; }

@media (max-width: 720px) {
	.tb-cards, .tb-modes { grid-template-columns: 1fr; }
	.tb-menu { padding-top: 26px; }
}

/* Invite a friend by name, and the card an invitation shows up as. */
.tb-invite { display: flex; gap: 8px; }
.tb-invite input { flex: 1; min-width: 0; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, .3); color: #fff; font: inherit; }
.tb-invited { position: fixed; z-index: 60; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 16px; background: #111827; color: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
	border: 2px solid var(--accent); animation: tb-drop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tb-drop { from { transform: translate(-50%, -30px); opacity: 0; } }
