/* ============================================================
   UV Minigolf Kladno – scorecard.css
   Styly pro online scorecard
   ============================================================ */

/* ─── Screen manager ───────────────────────────────────────── */
.sc-screen {
  min-height: calc(100vh - 80px);
}

/* ─── SETUP page ───────────────────────────────────────────── */
.sc-setup__header {
  padding-block: var(--space-10) var(--space-8);
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.sc-setup__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: var(--space-4);
}

.sc-setup__desc {
  font-size: var(--fs-base);
  color: var(--color-text-muted);
  line-height: 1.75;
}

.sc-setup__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 600px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
}

.sc-setup__step {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sc-setup__step-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.sc-setup__step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--gradient-gold);
  color: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* Počet hráčů */
.sc-player-count {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sc-count-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-accent);
  font-size: 1.4rem;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sc-count-btn:hover {
  border-color: rgba(245,197,66,0.5);
  color: var(--color-neon-gold);
  background: rgba(245,197,66,0.06);
}

.sc-count-btn--active {
  background: rgba(245,197,66,0.1);
  border-color: var(--color-neon-gold);
  color: var(--color-neon-gold);
  box-shadow: 0 0 12px rgba(245,197,66,0.2);
}

/* Inputy hráčů */
.sc-players-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sc-player-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sc-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 1rem;
  flex-shrink: 0;
  font-weight: 700;
}

.sc-player-input {
  flex: 1;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  transition: all var(--transition-base);
  outline: none;
}

.sc-player-input:focus {
  border-color: var(--color-neon-gold);
  box-shadow: 0 0 0 3px rgba(245,197,66,0.1);
}

.sc-player-input::placeholder {
  color: var(--color-text-dim);
}

/* Výběr jamek */
.sc-holes-select {
  display: flex;
  gap: var(--space-4);
}

.sc-holes-btn {
  flex: 1;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface-2);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sc-holes-btn:hover {
  border-color: rgba(245,197,66,0.4);
  background: rgba(245,197,66,0.04);
  color: var(--color-text);
}

.sc-holes-btn--active {
  border-color: var(--color-neon-gold);
  background: rgba(245,197,66,0.08);
  color: var(--color-text);
}

.sc-holes-btn__num {
  font-family: var(--font-accent);
  font-size: 2rem;
  color: var(--color-neon-gold);
  line-height: 1;
}

.sc-holes-btn__label {
  font-size: var(--fs-sm);
  text-align: left;
  line-height: 1.4;
}

.sc-holes-btn__label small {
  color: var(--color-text-dim);
  font-size: var(--fs-xs);
}

/* Start btn */
.sc-start-btn {
  transition: all var(--transition-bounce);
}

/* Resume */
.sc-resume-wrap {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: var(--radius-xl);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.sc-resume-text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* ─── SCOREBAR ─────────────────────────────────────────────── */
.sc-scorebar {
  position: sticky;
  top: 70px;
  z-index: var(--z-raised);
  background: rgba(18,18,26,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-3);
}

.sc-scorebar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.sc-scorebar__players {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.sc-score-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-base);
}

.sc-score-chip--leader {
  border-color: rgba(245,197,66,0.4);
  background: rgba(245,197,66,0.08);
}

.sc-score-chip__name {
  color: var(--color-text-muted);
}

.sc-score-chip__score {
  font-family: var(--font-accent);
  font-size: var(--fs-base);
  color: var(--color-neon-gold);
}

.sc-score-chip--leader .sc-score-chip__name {
  color: var(--color-text);
}

.sc-scorebar__actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ─── Progress bar ─────────────────────────────────────────── */
.sc-progress {
  height: 4px;
  background: var(--color-surface-2);
  position: relative;
}

.sc-progress__fill {
  height: 100%;
  background: var(--gradient-gold);
  transition: width var(--transition-slow);
  box-shadow: var(--glow-gold);
  width: 0%;
}

.sc-progress__label {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding-inline: var(--space-2);
  margin-top: -2px;
}

/* ─── Mobile hole panel ────────────────────────────────────── */
.sc-hole-panel {
  max-width: 540px;
  margin-inline: auto;
}

.sc-hole-panel__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.sc-hole-panel__counter {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--color-text);
}

.sc-prev-btn, .sc-next-btn {
  transition: all var(--transition-base);
}

.sc-prev-btn:disabled, .sc-next-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Hole info card */
.sc-hole-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.sc-hole-info__icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.sc-hole-info__num {
  font-family: var(--font-accent);
  font-size: 3rem;
  line-height: 1;
  color: var(--color-neon-gold);
  opacity: 0.5;
  margin-left: auto;
}

.sc-hole-info__name {
  font-size: var(--fs-lg);
  font-weight: 700;
}

.sc-hole-info__meta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-1);
}

.sc-hole-info__par {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.sc-hole-info__par span {
  color: var(--color-neon-gold);
  font-weight: 700;
}

/* Skóre hráčů */
.sc-hole-scores {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.sc-hole-score-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  transition: border-color var(--transition-base);
}

.sc-hole-score-row:focus-within {
  border-color: rgba(245,197,66,0.4);
}

.sc-hole-score-row__avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0f;
  flex-shrink: 0;
}

.sc-hole-score-row__name {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Score counter */
.sc-score-counter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sc-score-counter__btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.sc-score-counter__btn:hover {
  background: rgba(245,197,66,0.1);
  border-color: rgba(245,197,66,0.4);
  color: var(--color-neon-gold);
}

.sc-score-counter__value {
  width: 44px;
  text-align: center;
  font-family: var(--font-accent);
  font-size: 1.5rem;
  color: var(--color-neon-gold);
  background: transparent;
  border: none;
  outline: none;
}

/* Barevné kódování skóre vs par */
.sc-score--eagle   { color: #00e5ff !important; }
.sc-score--birdie  { color: #39ff14 !important; }
.sc-score--par     { color: var(--color-text) !important; }
.sc-score--bogey   { color: #ffaa00 !important; }
.sc-score--double  { color: #ff6b35 !important; }
.sc-score--triple  { color: #ff2d78 !important; }

/* Zajímavost o jamce */
.sc-hole-story {
  background: rgba(245,197,66,0.04);
  border: 1px solid rgba(245,197,66,0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.sc-hole-story__label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-neon-gold);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.sc-hole-story__text {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ─── Desktop score table ──────────────────────────────────── */
.sc-table-wrap {
  display: none;
}

/* Na desktopu zobraz oba panely vedle sebe */
@media (min-width: 1024px) {
  /* Mobilní view zůstane viditelný, ale ukážeme i tabulku */
  #sc-game .container > div:first-of-type {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: var(--space-8);
    align-items: start;
  }

  .sc-mobile-view {
    position: sticky;
    top: 130px;        /* pod scorebarem a progress barem */
  }

  .sc-table-wrap {
    display: block;
  }
}

.sc-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.sc-table-title {
  font-size: var(--fs-xl);
}

.sc-table-legend {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.sc-legend-item {
  font-size: var(--fs-xs);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-weight: 600;
  border: 1px solid;
}

.sc-legend--eagle { color: #00e5ff; border-color: rgba(0,229,255,0.3); background: rgba(0,229,255,0.06); }
.sc-legend--birdie { color: #39ff14; border-color: rgba(57,255,20,0.3); background: rgba(57,255,20,0.06); }
.sc-legend--par { color: var(--color-text-muted); border-color: var(--color-border); background: transparent; }
.sc-legend--bogey { color: #ffaa00; border-color: rgba(255,170,0,0.3); background: rgba(255,170,0,0.06); }
.sc-legend--double { color: #ff2d78; border-color: rgba(255,45,120,0.3); background: rgba(255,45,120,0.06); }

.sc-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.sc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: var(--fs-sm);
}

.sc-table th {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.sc-table th:first-child {
  text-align: left;
  padding-left: var(--space-5);
}

.sc-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--color-text-muted);
}

.sc-table td:first-child {
  text-align: left;
  padding-left: var(--space-5);
  font-weight: 600;
  color: var(--color-text);
}

.sc-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.sc-table tfoot tr {
  background: var(--color-surface);
  border-top: 2px solid var(--color-border);
}

.sc-table tfoot td {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  font-size: var(--fs-base);
}

/* Aktuální jamka highlight */
.sc-table tr.active-hole td {
  background: rgba(245,197,66,0.04);
}

.sc-table .hole-name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sc-table .hole-name-cell__icon { flex-shrink: 0; }

/* Score buňky */
.sc-table .score-cell {
  font-family: var(--font-accent);
  font-size: var(--fs-lg);
  font-weight: 700;
  position: relative;
}

.sc-table .score-cell input {
  width: 44px;
  text-align: center;
  background: transparent;
  border: none;
  font-family: var(--font-accent);
  font-size: var(--fs-lg);
  color: inherit;
  outline: none;
  cursor: pointer;
}

.sc-table .total-cell {
  font-family: var(--font-accent);
  font-size: var(--fs-xl);
  color: var(--color-neon-gold);
}

/* ─── VÝSLEDKY ─────────────────────────────────────────────── */
.sc-results__header {
  text-align: center;
  padding-block: var(--space-10);
}

.sc-results__trophy {
  font-size: 5rem;
  margin-bottom: var(--space-4);
  animation: float 3s ease-in-out infinite;
  display: block;
}

.sc-results__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-4);
}

.sc-results__subtitle {
  font-size: var(--fs-xl);
  color: var(--color-text-muted);
}

/* Podium */
.sc-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.sc-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.sc-podium-item__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: 1.75rem;
  font-weight: 700;
  color: #0a0a0f;
  position: relative;
}

.sc-podium-item__avatar::after {
  content: attr(data-medal);
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 1.25rem;
}

.sc-podium-item__name {
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--color-text);
  text-align: center;
}

.sc-podium-item__score {
  font-family: var(--font-accent);
  font-size: var(--fs-3xl);
  color: var(--color-neon-gold);
  line-height: 1;
}

.sc-podium-item__vs-par {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-align: center;
}

.sc-podium-item__plinth {
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-size: var(--fs-2xl);
  color: rgba(255,255,255,0.2);
  padding-block: var(--space-4);
  border: 1px solid;
  border-bottom: none;
}

.sc-podium-item:nth-child(1) .sc-podium-item__plinth { height: 80px; background: rgba(245,197,66,0.12); border-color: rgba(245,197,66,0.3); }
.sc-podium-item:nth-child(2) .sc-podium-item__plinth { height: 60px; background: rgba(192,192,200,0.08); border-color: rgba(192,192,200,0.25); }
.sc-podium-item:nth-child(3) .sc-podium-item__plinth { height: 45px; background: rgba(139,115,85,0.08); border-color: rgba(139,115,85,0.25); }

/* Results stats grid */
.sc-results__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-block: var(--space-8);
}

@media (min-width: 640px) {
  .sc-results__stats { grid-template-columns: repeat(4, 1fr); }
}

.sc-results__table-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-4);
}

.sc-results__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-block: var(--space-8);
}

/* Share panel */
.sc-share-panel {
  max-width: 500px;
  margin-inline: auto;
  text-align: center;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-top: var(--space-4);
}

.sc-share-textarea {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  font-family: monospace;
  resize: none;
  outline: none;
  line-height: 1.6;
}

/* Barvy hráčů */
:root {
  --player-1: #f5c542;
  --player-2: #00e5ff;
  --player-3: #39ff14;
  --player-4: #ff6b35;
  --player-5: #c77dff;
  --player-6: #ff2d78;
}
