/* ── Reset & base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0b5e2a;
  background-image: radial-gradient(ellipse at 50% 40%, #0e7a35 0%, #0b5e2a 60%, #073d1b 100%);
  color: #e8e8e8;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Header ────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 12px 2px;
  user-select: none;
  flex-shrink: 0;
}
.header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  letter-spacing: .04em;
  color: #ffd700;
  text-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header .hash-badge {
  font-size: .68rem;
  padding: 2px 8px;
}
.header .btn-action {
  font-size: .7rem;
  padding: 3px 10px;
}

/* ── Info bar ──────────────────────────────────────── */
.info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 500;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.player-status {
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .3s;
}
.player-status.complete {
  background: rgba(46,204,113,.2);
  border-color: rgba(46,204,113,.4);
  color: #6ff5a9;
}
.player-status b { color: #ffd700; }
.phase-label { color: #aad4a0; }
.contract-label { color: #e8e8e8; }
.contract-label b { color: #ffd700; }
.trick-label b { color: #ffd700; }
.turn-label b { color: #6ff5a9; }
.result-label { font-size: .9rem; }
.result-label b { color: #ffd700; }

/* ── Buttons ───────────────────────────────────────── */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #ddd;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.btn-action:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-action:disabled { opacity: .35; cursor: default; }
.btn-action:disabled:hover { background: rgba(255,255,255,.07); color: #ddd; }
.btn-reset:hover { background: rgba(231,76,60,.2); border-color: rgba(231,76,60,.4); color: #ff8a80; }
.btn-back:hover { background: rgba(52,152,219,.2); border-color: rgba(52,152,219,.4); color: #85c1e9; }
.btn-contract {
  background: rgba(46,204,113,.12);
  border-color: rgba(46,204,113,.3);
  color: #6ff5a9;
}
.btn-contract:hover:not(:disabled) {
  background: rgba(46,204,113,.25);
  border-color: rgba(46,204,113,.5);
  color: #6ff5a9;
}

/* ── Action bar ────────────────────────────────────── */
.action-bar {
  display: none;
  justify-content: center;
  gap: 10px;
  padding: 6px;
  flex-shrink: 0;
}

/* ── Hash badge & copy toast ────────────────────────── */
.hash-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255,215,0,.1);
  border: 1px solid rgba(255,215,0,.25);
  color: #ffd700;
  font-size: .72rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .03em;
  user-select: all;
}
.hash-badge:hover {
  background: rgba(255,215,0,.2);
  border-color: rgba(255,215,0,.5);
  transform: scale(1.02);
}
.hash-badge:active { transform: scale(.98); }

.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(46,204,113,.9);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  html { font-size: 13px; }

  .header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px 4px;
  }
  .header h1 { font-size: 1.1rem; }
  .header-actions { gap: 6px; }
  .header .btn-action { font-size: .65rem; padding: 3px 8px; }
  .header .hash-badge { font-size: .58rem; padding: 2px 6px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

  .info-bar {
    gap: 6px;
    padding: 3px 8px;
    font-size: .7rem;
  }
  .player-status { padding: 2px 7px; font-size: .65rem; }
  .btn-action { font-size: .68rem; padding: 3px 10px; }
}
