/* ---------- uno (builds on the durak layout in shared/style.css) ---------- */
.uno { --cw: clamp(40px, min(14vw, 7.8dvh), 66px); --ch: calc(var(--cw) * 1.48); }
.uno .opps { flex-wrap: wrap; row-gap: .45rem; }
.uno .opp { flex-basis: 96px; }
.uno .opp.turn { border-color: var(--accent); box-shadow: 0 0 14px #ffc14566; transform: translateY(-2px); }
.uno .opp.risk { border-color: var(--bad); animation: shake .5s infinite; }
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.unotag { color: var(--bad); font-family: var(--fun); letter-spacing: .03em; }

/* table: felt edge glows in the current color */
.uno .felt { justify-content: center; gap: clamp(.8rem, 6vw, 2.4rem);
  border-color: var(--cur); box-shadow: inset 0 0 40px #0008, 0 0 22px color-mix(in srgb, var(--cur) 55%, transparent);
  transition: border-color .3s, box-shadow .3s; }
.uno .dir { position: absolute; inset: 0; display: grid; place-items: center; font-size: min(46vw, 30dvh);
  color: #ffffff0d; pointer-events: none; line-height: 1; }
.uno .dir.cw { animation: spin 12s linear infinite; }
.uno .dir.ccw { animation: spin 12s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.drawpile { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem;
  position: relative; z-index: 1; }
.drawpile .cardback { width: var(--cw); height: var(--ch); border-radius: 9px; box-shadow: 3px 3px 0 #fff8, 6px 6px 0 #fff4, 0 4px 10px #0007;
  background: radial-gradient(ellipse at 50% 50%, #e53935 0 34%, transparent 35%), #1d1a26; }
.drawpile .lbl { font-family: var(--fun); font-size: .8rem; color: #fff; min-height: 1.1em; }
.drawpile.ready .cardback { animation: nudge 1.1s ease-in-out infinite; box-shadow: 0 0 0 3px var(--accent), 0 0 18px var(--accent); }
@keyframes nudge { 50% { transform: translateY(-5px); } }
.drawpile:disabled { cursor: default; opacity: 1; }

.discard { position: relative; z-index: 1; }
.discard .uc { --cw: calc(clamp(40px, min(14vw, 7.8dvh), 66px) * 1.3); transform: rotate(-4deg); }
.discard .pending { position: absolute; top: -10px; right: -16px; background: var(--bad); color: #fff; font-family: var(--fun);
  font-weight: 700; border-radius: 99px; padding: .1em .5em; font-size: 1.1rem; box-shadow: 0 2px 6px #0008; animation: popin .3s; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }
.curcolor { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: .72rem; color: #fffc;
  display: flex; align-items: center; gap: .3rem; z-index: 1; }
.curcolor i { width: 12px; height: 12px; border-radius: 50%; background: var(--cur); border: 1.5px solid #fff; }

/* cards */
.uc { --ch: calc(var(--cw) * 1.48); width: var(--cw); height: var(--ch); padding: 0; border-radius: 9px; flex: none;
  border: calc(var(--cw) * .055) solid #fff; background: var(--k); color: #fff; position: relative; overflow: hidden;
  font-family: var(--fun); font-weight: 700; line-height: 1; box-shadow: 0 2px 6px #0007; text-shadow: 0 1px 0 #0006; }
.uc:disabled { opacity: 1; cursor: default; }
.uc .tl, .uc .br { position: absolute; font-size: calc(var(--cw) * .24); }
.uc .tl { top: 4%; left: 8%; }
.uc .br { bottom: 4%; right: 8%; transform: rotate(180deg); }
.uc .oval { position: absolute; left: 12%; right: 12%; top: 18%; bottom: 18%; border-radius: 50%; background: #fff;
  transform: rotate(28deg); display: grid; place-items: center; }
.uc .oval b { transform: rotate(-28deg); color: var(--k); font-size: calc(var(--cw) * .52); text-shadow: 1px 1px 0 #0003; }
.uc .oval b.small { font-size: calc(var(--cw) * .36); }
.uc.wild .oval { background: conic-gradient(#e53935 0 25%, #1e74dc 0 50%, #2aa952 0 75%, #f5b915 0); }
.uc.wild .oval b { color: #fff; text-shadow: 0 1px 3px #000; }
.uc.wild.chosen .oval { box-shadow: 0 0 0 calc(var(--cw) * .07) var(--ring); }
.uc .swirl { display: block; width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); border-radius: 50%; background: #fff; }
.uc.fly { animation: unofly .35s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes unofly { from { transform: translateY(140px) scale(.6) rotate(-30deg); opacity: 0; } }

.uno .hand { height: calc(var(--ch) + 24px); }
.uno .hand .uc { margin-left: var(--ov, 4px); transition: transform .15s, margin .2s, filter .2s; }
.uno .hand .uc:first-child { margin-left: 0; }
.uno .hand .uc.dim { filter: brightness(.5) saturate(.6); }
.uno .hand .uc.ok { transform: translateY(-8px); box-shadow: 0 0 0 2px var(--good), 0 4px 10px #0008; cursor: pointer; }
.uno .hand .uc.sel { transform: translateY(-18px) scale(1.06); box-shadow: 0 0 0 3px var(--accent), 0 8px 16px #000a; z-index: 2; }

/* action bar */
.swatch { width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0; background: var(--k); border: 3px solid #fff;
  box-shadow: 0 2px 8px #0008; animation: popin .25s backwards; }
.swatch:nth-child(2) { animation-delay: .04s; } .swatch:nth-child(3) { animation-delay: .08s; } .swatch:nth-child(4) { animation-delay: .12s; }
.unobtn { font-family: var(--fun); font-size: 1.15rem; animation: nudge .8s ease-in-out infinite; }
.catchbtn { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 700; animation: nudge .6s ease-in-out infinite; }
