/* Farbenrausch (js/farbenui.js): the card table. */

.fr { --c-rot: #e5383b; --c-gelb: #f4b400; --c-gruen: #2ea44f; --c-blau: #1f7ae0; --cw: clamp(64px, 8.4vw, 104px);
	display: flex; flex-direction: column; gap: 14px; padding: 16px; min-height: calc(100vh - var(--op-bar, 0px) - 60px); box-sizing: border-box;
	background: radial-gradient(900px 500px at 50% 45%, #1d6a4a, #0f3b2a 70%, #0a2a1e); }
.fr-rivals { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.fr-rival { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 120px; padding: 10px 14px; border-radius: 16px; background: rgba(0, 0, 0, .25);
	border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.fr-rival.turn { border-color: #ffd76a; transform: translateY(2px); box-shadow: 0 0 20px rgba(255, 215, 106, .35); }
.fr-rival b { color: color-mix(in srgb, var(--pc) 45%, #fff); }
.fr-rival span { font-size: 13px; color: #c7d6cf; font-weight: 700; }
.fr-rival.near span { color: #ffb4a8; }
.fr-rival.out { opacity: .45; filter: grayscale(1); }
.fr-rival.out span { color: #ff8a7a; text-transform: uppercase; letter-spacing: .08em; }
.fr-mini { display: flex; height: 30px; }
.fr-mini i { width: 20px; height: 30px; margin-left: -9px; border-radius: 4px; background: radial-gradient(circle at 50% 50%, #e5383b 0 30%, transparent 32%), #0d0d12; border: 1.5px solid #08080c; outline: 1px solid rgba(255,255,255,.5); box-shadow: 0 2px 4px rgba(0, 0, 0, .4); }
.fr-mini i:first-child { margin-left: 0; }

.fr-mid { flex: 1; display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: center; max-width: 900px; width: 100%; margin: 0 auto; }
.fr-piles { display: flex; align-items: center; justify-content: center; gap: 28px; }
.fr-draw { position: relative; border: 0; background: none; padding: 0; }
.fr-draw span { position: absolute; right: -8px; bottom: -8px; background: #000a; color: #fff; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.fr-draw.can .fc { box-shadow: 0 0 0 3px #ffd76a, 0 10px 24px rgba(0, 0, 0, .5); animation: fr-bob 1.4s ease-in-out infinite; }
@keyframes fr-bob { 50% { transform: translateY(-4px); } }
.fr-discard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fr-discard::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(var(--cc), transparent 70%); opacity: .45; z-index: 0; }
.fr-discard .fc { position: relative; z-index: 1; transform: rotate(-4deg) scale(1.15); }
.fr-stack { position: absolute; z-index: 2; top: -14px; right: -22px; padding: 4px 10px; border-radius: 999px; background: #e5383b; color: #fff; font-weight: 900; font-size: 20px;
	border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); animation: fr-bob 1s ease-in-out infinite; }
.fr-color { position: relative; z-index: 1; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: var(--cc); color: #fff; }
.fr-dir { font-size: 40px; color: #ffffff88; }
.fr-side { display: flex; flex-direction: column; gap: 10px; }
.fr-turn { padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .3); font-weight: 800; }
.fr-turn.me { background: #ffd76a; color: #2a2006; }
.fr-clock { height: 6px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.fr-clock i { display: block; height: 100%; background: #ffd76a; transform-origin: left; animation: fr-clock linear forwards; }
@keyframes fr-clock { from { transform: scaleX(var(--from, 1)); } to { transform: scaleX(0); } }
.fr-log { list-style: none; margin: 0; padding: 0; font-size: 13px; color: #c7d6cf; display: flex; flex-direction: column; gap: 3px; }
.fr-log li:last-child { color: #fff; font-weight: 800; }

/* the hand: a fan that overlaps more the more cards there are */
.fr-hand { display: flex; justify-content: center; padding: 18px 10px 4px; --o: calc(min(0px, (100vw - 40px - var(--n) * var(--cw)) / max(1, var(--n) - 1))); }
.fr-hand .fc { margin-left: max(var(--o), calc(var(--cw) * -0.62)); transition: transform .15s; }
.fr-hand .fc:first-child { margin-left: 0; }
.fr-hand { position: relative; padding-bottom: 22px; }
.fr-hand::after { content: attr(data-count); position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-size: 12px; font-weight: 800; color: #c7d6cf; }
.fr-hand.near::after { color: #ff8a7a; }
.fr-hand .fc.ok:hover, .fr-hand .fc.ok:focus-visible { transform: translateY(-18px); z-index: 2; }
.fr-hand .fc.ok { box-shadow: 0 0 0 3px #ffd76a, 0 8px 18px rgba(0, 0, 0, .45); }
.fr-hand .fc.no { filter: brightness(.7) saturate(.8); }
.fr-actions { display: flex; justify-content: center; gap: 10px; min-height: 46px; }
.fr-call { background: #e5383b !important; border-color: #e5383b !important; animation: fr-bob 1s ease-in-out infinite; }
.fr-catch { background: #f4b400 !important; border-color: #f4b400 !important; color: #2a2006 !important; }

/* a card, merciless style: black frame, the colour inside, a dark oval with the symbol in colour,
   wild cards black with flames, the back black and red */
.fc { position: relative; width: var(--cw); aspect-ratio: 5 / 7.6; flex: none; border-radius: 10px; padding: 0; border: 3px solid #08080c; color: #fff; overflow: hidden; cursor: pointer;
	background: linear-gradient(160deg, color-mix(in srgb, var(--bg) 100%, #fff 18%), var(--bg) 45%, color-mix(in srgb, var(--bg) 70%, #000));
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55), 0 6px 14px rgba(0, 0, 0, .5); font: 900 16px 'Nunito', sans-serif; }
.fc.rot { --bg: var(--c-rot, #e5383b); }
.fc.gelb { --bg: var(--c-gelb, #f4b400); }
.fc.gruen { --bg: var(--c-gruen, #2ea44f); }
.fc.blau { --bg: var(--c-blau, #1f7ae0); }
.fc.wild { --bg: #111; background: radial-gradient(120% 60% at 50% 115%, #ff6a00 0%, #e5383b 30%, rgba(229, 56, 59, 0) 62%), linear-gradient(170deg, #26262e, #08080c 70%); }
.fc.back { --bg: #e5383b; cursor: default; background: repeating-linear-gradient(135deg, #16161c 0 8px, #0d0d12 8px 16px); }
.fc-oval { position: absolute; inset: 14% 10%; border-radius: 50%; background: #111; transform: rotate(-28deg); display: grid; place-items: center;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), inset 0 -6px 12px rgba(0, 0, 0, .6); }
.fc.back .fc-oval { background: linear-gradient(160deg, #ff4d4f, #b3121a); box-shadow: 0 0 0 2px #08080c, 0 0 18px rgba(229, 56, 59, .6); }
.fc-oval b.s3 { font-size: calc(var(--cw) * .27) !important; letter-spacing: -.06em; }
.fc-oval b { transform: rotate(28deg); font-size: calc(var(--cw) * .38); color: var(--bg); -webkit-text-stroke: 1.5px #fff; paint-order: stroke; text-shadow: 2px 2px 0 #000; }
.fc.wild .fc-oval b { color: #ffcc33; -webkit-text-stroke: 1.5px #e5383b; text-shadow: 0 0 10px rgba(255, 106, 0, .8), 2px 2px 0 #000; }
.fc.back .fc-oval b { color: #fff; -webkit-text-stroke: 0; font-size: calc(var(--cw) * .26); letter-spacing: -.04em; text-shadow: 2px 2px 0 #08080c; }
.fc.wild .fc-oval { background: conic-gradient(var(--c-rot, #e5383b) 0 25%, var(--c-gelb, #f4b400) 0 50%, var(--c-gruen, #2ea44f) 0 75%, var(--c-blau, #1f7ae0) 0); }
.fc.wild .fc-oval::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: #08080c; }
.fc.wild .fc-oval b { position: relative; z-index: 1; }
.fc-corner { position: absolute; top: 5%; left: 9%; font-size: calc(var(--cw) * .18); line-height: 1; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.fc-corner.br { top: auto; left: auto; bottom: 5%; right: 9%; transform: rotate(180deg); }
.fc-cap { position: absolute; left: 0; right: 0; bottom: 18%; text-align: center; font-size: max(8px, calc(var(--cw) * .1)); letter-spacing: .04em; text-transform: uppercase;
	color: #fff; background: rgba(8, 8, 12, .82); padding: 1px 0; line-height: 1.2; white-space: nowrap; }
.fc.wild .fc-cap { color: #ffcc33; }
.fc.back .fc-cap { color: #ff4d4f; bottom: 8%; font-size: max(7px, calc(var(--cw) * .09)); letter-spacing: .12em; }
.fc:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.fr-pick { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0, 0, 0, .5); }
.fr-pick-box { display: flex; flex-direction: column; gap: 14px; align-items: center; padding: 22px; border-radius: 20px; background: #151c26; }
.fr-pick-box h3 { margin: 0; }
.fr-pick-box p { margin: -6px 0 0; max-width: 260px; text-align: center; color: #c7d6cf; font-size: 14px; }
.fr-sw.who { background: #2b3445; font-size: 15px; }
.fr-pick-box > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-sw { width: 120px; height: 70px; border-radius: 14px; border: 3px solid #fff; color: #fff; font-weight: 900; font-size: 17px; }
.fr-sw.rot { background: #e5383b; } .fr-sw.gelb { background: #f4b400; } .fr-sw.gruen { background: #2ea44f; } .fr-sw.blau { background: #1f7ae0; }

@media (max-width: 760px) {
	.fr-mid { grid-template-columns: 1fr; }
	.fr-rival { min-width: 92px; padding: 8px; }
	.fr-dir { display: none; }
}
