/* Klupski bilten: orah, bakar i parket. Layout ostaje u game.html. */
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #2e211b;
  --panel: #3d2b22;
  --panel-2: #493329;
  --text: #fff0d7;
  --muted: #d1b69a;
  --line: #71513b;
  --accent: #b94e27;
  --accent-2: #ebb474;
  --good: #a7c58a;
  --warn: #efb96f;
  --bad: #ffa48a;
  --shadow: 0 2px 0 rgba(25, 14, 8, .18);
  font-family: "Segoe UI", Arial, sans-serif;
}

body { background: var(--bg); }
body::before {
  opacity: .23;
  filter: sepia(.35) saturate(.65);
  transform: none;
}
body::after { background: linear-gradient(90deg, #2e211b88, #2e211be8 32% 68%, #2e211b88); }

h1, .setup-heading h2, .court-section-head h2, .draw-title, .leaderboard-head h2 {
  font-family: Impact, "Arial Narrow", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -.015em;
}

.start-screen { background: #2e211beb; backdrop-filter: none; }
.start-card, .board, .card, .game-setup, .modal-card, .leaderboard-card,
.draft-card, .draft-court-card {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.start-card { border-top: 4px solid var(--accent); }
.start-card::before { display: none; }
.start-card h1 { line-height: 1.04; }
.start-copy { color: var(--muted); }
.start-logo, .logo {
  color: #fff9ef;
  background: #b94e27;
  border: 2px solid #d58a54;
  border-radius: 50%;
  box-shadow: none;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-weight: 800;
}
.topbar {
  padding: 14px 0;
  border: 0;
  border-bottom: 2px solid #91623f;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.brand > div:last-child { min-width: 0; }
.signature { color: #dfb583; }

.primary, .secondary, .chip, .leaderboard-launch, .setup-mode,
.filter-panel, .filter-hint, .team-lineup, .slot, .player-card,
.game-actions, .start-rule, .player-entry input, .tag, .meta-pill,
.start-meta span, .install-badge, .turn-badge, .court-prompt {
  border-radius: 4px;
  box-shadow: none;
}
.primary, .secondary, .chip, .setup-mode, .player-card {
  transition: background-color .15s ease, border-color .15s ease;
}
.primary { background: var(--accent); color: #fff9ef; border: 1px solid #d58153; }
.primary:hover:not(:disabled) { background: #92371c; transform: none; }
.secondary, .chip, .setup-mode, .player-card, .leaderboard-launch {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.secondary:hover:not(:disabled), .chip:hover:not(:disabled),
.chip.mode-chip:hover:not(:disabled), .setup-mode:hover, .player-card:hover:not(:disabled) {
  transform: none;
  background: #51392b;
  border-color: #b28055;
}
.chip.mode-chip { box-shadow: none; }
.chip.active, .setup-mode.selected, .leaderboard-controls button[aria-pressed="true"] {
  color: #ffd09b;
  background: #5d3625;
  border-color: #d88d52;
  box-shadow: inset 3px 0 #d88d52;
}
.setup-mode small, .player-entry label, .controls-copy strong,
.mobile-list-hint, .pick-cta, .season-source, .slot-season,
.leader-row strong, .leaderboard-controls button[aria-pressed="true"] { color: var(--accent-2); }
.setup-mode.selected strong { color: var(--text); }
.player-entry input { background: #30221b; border-color: #9d7653; font-size: 1rem; }
.player-entry input::placeholder { color: #bda082; opacity: 1; }
.player-entry input:focus { box-shadow: none; border-color: #ebb474; outline: 2px solid #ebb47455; }
.name-error { color: var(--bad); }
.filter-panel, .game-actions, .start-rule, .team-lineup, .slot { background: var(--panel-2); }
.team-lineup.current { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.tag, .meta-pill, .start-meta span, .install-badge, .turn-badge {
  color: var(--muted);
  background: #493329;
  border-color: var(--line);
}
.turn-badge { color: #ffd09b; border-color: #ad794d; }
.filter-hint { border-style: solid; }
.controls { background: var(--panel-2); box-shadow: none; backdrop-filter: none; }
.score-strip { background: #261a15; }
.score-box { border-color: #735440; }
.score-label { color: #ddc5aa; }
.score-value { color: #fff5df; }
.player-card { box-shadow: none; }
.player-photo {
  align-items: center;
  justify-items: center;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}
.player-photo::before { display: none; }
.player-initials {
  position: static;
  width: auto;
  color: #f4d5aa;
  font-family: Georgia, serif;
  font-size: 1.6rem;
  text-shadow: none;
}
.ovr { color: #ffd09b; border-color: #a8774d; background: #5b3726; border-radius: 3px; }
.stat { background: #30221b; border-color: #77543a; border-radius: 2px; }
.stat span { color: var(--muted); }
.season-source.missing { color: var(--muted); }
.court-prompt { color: var(--muted); background: #493329; border-color: #9b714d; }
.install-card { background: #4b3425; }
.result { color: var(--text); background: #513825; border-color: #bd8950; border-radius: 4px; }
.bar { background: #79573e; border-radius: 2px; }
.bar span { background: #dfa367; }
.leaderboard-launch { background: #503526; border-color: #aa784d; }
.leaderboard-launch span:last-child { font-size: .72rem; }
.leaderboard-head { border-color: var(--line); }
.leader-row:nth-child(even) { background: #493329; }
.result-modal, .leaderboard-modal { background: #1c110cbb; backdrop-filter: none; }
.modal-title { color: var(--muted); }
.score-reel { background: #241911; border: 0; border-radius: 3px; box-shadow: none; }
.score-reel-label { color: #ead4b7; }
.score-reel-number { color: #fff9ef; }
.score-reel-number.settled { color: #f5c77f; text-shadow: none; }
.score-reel-prefix, .score-reel-separator { color: #f0b778; text-shadow: none; }
.mobile-nav { background: #3d2b22fa; border-color: #9b704d; border-radius: 6px; box-shadow: 0 2px 8px #160e0a33; backdrop-filter: none; }
.mobile-nav button { color: var(--muted); border-radius: 3px; }
.mobile-nav button:active { color: #ffd09b; background: #5d3625; }

/* Court markings and team crests retain their natural shapes. */
.basketball-court {
  border-color: #80502e;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0 47px, #7e401a18 47px 48px),
    #b77d43;
  box-shadow: none;
}
.basketball-court::after { background: none; }
.court-paint { background: #ad5a2b25; }
.court-position, .court-player {
  background: #483020;
  color: #fff8eb;
  border: 1px solid #f5e0be;
  border-radius: 4px;
  box-shadow: none;
  backdrop-filter: none;
}
.court-position { transition: background-color .15s ease, border-color .15s ease; }
.court-position:hover:not(:disabled), .court-position.active {
  transform: translate(-50%, -50%);
  background: #a53c1e;
  border-color: #fff4d9;
  box-shadow: none;
}
.court-position.filled { background: #5b452e; border-color: #f1d8b2; }
.court-player-token { border-radius: 3px; box-shadow: none; }
.court-player.current { animation: none; border-color: #fff3ca; }
#lineupSection.lineup-focus { border-radius: 4px; }
@keyframes lineupFocus {
  0%, 100% { background-color: transparent; }
  35% { background-color: #e69d4a22; }
}
.club-badge-image {
  padding: 0;
  object-fit: contain;
  clip-path: none;
  background: none;
  filter: none;
  text-shadow: none;
}
.club-badge-image.small { padding: 0; }
.court-brand {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 48%;
  width: 24%;
  max-width: 154px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.court-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.court-section-head { align-items: start; }
.court-heading { flex: 1; min-width: 0; }
.network-notice { position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid var(--line); color: var(--text); background: var(--panel-2); font-size: .9rem; }
.network-notice button { min-height: 44px; }
.campaign-banner { border-left: 3px solid var(--accent-2); padding: 10px; background: var(--panel-2); color: var(--text); font-size: .9rem; line-height: 1.4; }
.setup-note, .start-links { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.start-links a { color: var(--accent-2); text-underline-offset: 3px; }
.leaderboard-controls label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: .74rem; }
.leaderboard-controls select { min-height: 44px; max-width: 210px; min-width: 0; padding: 6px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; }
.modal-card { max-height: 90svh; overflow-y: auto; overscroll-behavior: contain; }
.leaderboard-full { overscroll-behavior: contain; }
.team-change-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin-top: 10px;
}
.team-change-controls[hidden] { display: none; }
.team-change-controls button { min-height: 44px; color: #ffd09b; border-color: #b28055; }
.team-change-controls small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.court-section-head .team-change-status {
  flex-basis: 100%;
  max-width: none;
  color: var(--accent-2);
  font-size: .78rem;
  text-align: left;
}
.team-change-status:empty { display: none; }
.basketball-court[data-club="partizan"] { border-color: #302b26; }
.basketball-court[data-club="zvezda"] { border-color: #a82f28; }
button:focus-visible { outline: 3px solid #f3b36b; outline-offset: 3px; }

@media (max-width: 720px) {
  .start-card, .board, .card, .game-setup, .draft-court-card, .draft-card,
  .side .card, .team-lineup, .player-card { border-radius: 5px; }
  .modal-card, .leaderboard-card { border-radius: 6px 6px 0 0; }
  .topbar { border-radius: 0; }
  .brand h1 { white-space: normal; font-size: clamp(1.3rem, 6vw, 1.8rem); }
  .player-photo { border-radius: 3px; }
  .player-initials { width: auto; font-size: 1.4rem; }
  .court-position, .court-player { border-radius: 4px; }
  .court-player-token { border-radius: 3px; }
  .court-brand { width: 25%; }
  .mobile-list-hint { color: var(--muted); }
  .team-change-controls { align-items: stretch; }
  .team-change-controls button { width: 100%; }
  .team-change-controls small { width: 100%; }
  .leaderboard-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .leaderboard-controls select { width: 100%; max-width: none; font-size: .8rem; }
  .share-row button { width: 100%; min-height: 44px; }
  .network-notice { top: 0; font-size: .82rem; }
  body::before { background-image: none; }
}

@media (max-width: 480px) {
  .topbar { grid-template-columns: minmax(0, 1fr); }
  .top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
  .top-actions .secondary { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .primary, .secondary, .chip, .setup-mode, .player-card, .court-position { transition: none; }
}
