html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

:root {
  --bg: #0b1720;
  --bg-elevated: #111e29;
  --primary: #2e7d32;
  --primary-soft: #1b5e20;
  --accent: #00b894;
  --danger: #ff5252;
  --text: #f5f7fa;
  --text-muted: #9aa4b2;
  --border-subtle: #1f2a36;
  --radius-lg: 10px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-subtle: 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  --transition-fast: 0.18s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #102a43 0, #020817 45%, #000 100%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 12px 24px;
  min-width: 0;
}

.app-header {
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

a.logo-link {
  text-decoration: none;
  color: inherit;
}

a.logo-link:hover {
  opacity: 0.9;
}

.app-logo {
  width: 64px;
  height: 64px;
  margin-left: 2px;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  font-size: 28px;
  margin: 0;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.tab-btn {
  flex: 1;
  border-radius: 12px;
  border: 0;
  padding: 8px 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn-active {
  background: radial-gradient(circle at top, #16a34a, #15803d);
  color: #e6fffa;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.5);
}

.layout {
  display: block;
}

.card {
  background: radial-gradient(circle at top left, #132337, #050814 55%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 12px 13px 10px;
}

.main-card {
  min-height: 420px;
  width: 100%;
  min-width: 0;
}

.side-card {
  max-height: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-footer {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.btn {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color var(--transition-fast),
    color var(--transition-fast), border-color var(--transition-fast),
    box-shadow var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), #43a047);
  color: #e8f5e9;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.35);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #388e3c, #4caf50);
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text);
}

.secondary-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.7);
}

.ghost-btn {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--text-muted);
}

.ghost-btn:hover {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  background: rgba(22, 163, 74, 0.14);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hint {
  margin: 4px 0 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.hint.error {
  color: var(--danger);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

.chip {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background-color var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.chip:hover {
  border-color: rgba(148, 163, 184, 0.7);
}

.chip-active {
  background: linear-gradient(135deg, #1e293b, #020617);
  border-color: var(--accent);
  color: #e5f9f4;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-card {
  border-radius: 12px;
  background: linear-gradient(145deg, #0f172a 0%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: grid;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.match-card-clickable {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.match-card-clickable:hover {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.match-detail-popup {
  width: 100%;
  max-width: 680px;
}

.match-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.match-detail-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.match-detail-overview {
  font-size: 14px;
  padding: 1rem 1rem 0;
}

.match-detail-teams {
  margin-bottom: 0.5rem;
}

.match-detail-teams .team-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.match-detail-score {
  margin-bottom: 0.25rem;
}

.match-detail-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.match-detail-team {
  min-width: 0;
}

.match-detail-team-home .team-row {
  justify-content: flex-start;
}

.match-detail-team-away .team-row {
  justify-content: flex-end;
}

.match-detail-score-main {
  font-size: 1.1rem;
  white-space: nowrap;
}

.match-detail-live-time {
  margin: 0.35rem 0;
  font-size: 15px;
}

.match-live-minute {
  font-weight: 600;
  color: var(--accent);
}

.match-live-half {
  color: var(--text-muted);
}

.match-live-paused {
  color: var(--text-muted);
  font-style: italic;
}

.match-detail-meta {
  color: var(--text-muted);
  font-size: 13px;
}

.match-detail-stats h5 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.match-detail-stats {
  padding: 0 1rem 1rem;
}

.match-events-timeline-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.match-events-team-head {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
}

.match-events-team-head .team-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.match-events-timeline-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.45rem 0.5rem;
}

.match-events-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.match-event-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
}

.match-event-side {
  min-width: 0;
}

.match-event-side-home {
  text-align: right;
}

.match-event-side-away {
  text-align: left;
}

.match-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
}

.match-event-player {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.player-avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.player-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.match-event-minute {
  color: var(--text-muted);
  margin: 0;
  font-size: 12px;
}

.stats-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.team-roster-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.team-roster-link:hover {
  color: var(--accent);
}

@media (max-width: 700px) {
  .match-events-timeline-head {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .match-event-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .match-event-side-home,
  .match-event-side-away {
    text-align: left;
  }
}

/* Всплывающее окно (модальное) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-popup {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.modal-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-popup-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  padding: 0.35rem 0.5rem;
  min-width: auto;
}

.modal-popup-body {
  padding: 1rem;
}

.match-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.match-header .teams {
  flex: 1;
  min-width: 0;
}

.team-names {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.team-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.team-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.match-header .score {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  min-width: 4ch;
  text-align: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.status-pill {
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.status-upcoming {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-live {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.6);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.status-finished {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.status-cancelled {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.match-meta {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 13px 10px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.field span {
  color: var(--text-muted);
}

.field input,
.field select {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.field input::placeholder {
  color: rgba(148, 163, 184, 0.65);
}

.field input:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.5);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.admin-matches-list {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

/* элементы турниров кликабельные */
.admin-clickable-row,
.admin-match-row[data-tournament-id] {
  cursor: pointer;
}
.admin-clickable-row:hover,
.admin-match-row[data-tournament-id]:hover {
  background: radial-gradient(circle at top left, #1a3550, #050814 75%);
}

.score-inputs,
.score-live {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.score-input {
  width: 3rem;
  min-width: 2.5rem;
  padding: 4px 6px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text);
}
.field-grid .field {
  min-width: 0;
}

.live-overview-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.live-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
  min-width: 0;
}

.live-overview-header h4 {
  margin: 0;
  min-width: 0;
}

.live-overview-score {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.live-overview-time {
  min-width: 0;
}

.live-overview-time .score-inputs,
.live-overview-time .field-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.live-minute-display {
  font-weight: 600;
  font-size: 1.1rem;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.live-overview-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 6px;
  min-width: 0;
}

.live-overview-time-row .live-minute-display,
.live-overview-time-row .hint,
.live-overview-time-row .btn,
.live-overview-time-row .field-inline {
  flex-shrink: 0;
}

.live-overview-time-row .field-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-overview-time input[type="number"] {
  width: 4rem;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  color: var(--text);
}

.live-events-list {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  font-size: 13px;
}

.live-overview-teams {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.live-players-tbl {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.live-players-tbl th,
.live-players-tbl td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.live-players-tbl th {
  color: var(--text-muted);
  font-weight: 600;
}

.live-player-actions {
  white-space: nowrap;
}

.live-player-actions .btn-icon {
  padding: 2px 4px;
}

.admin-match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 13px 10px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, #132337, #050814 55%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  min-width: 0;
}

.admin-match-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}


.admin-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.reg-card {
  flex-wrap: wrap;
  align-items: flex-start;
}

.reg-card .reg-data {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.reg-photo {
  flex-shrink: 0;
}

.reg-photo img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.reg-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.reg-field {
  color: var(--text);
}

.reg-field strong {
  color: var(--text-muted);
  margin-right: 6px;
}

.reg-created {
  font-size: 11px;
  color: var(--text-muted);
}

.reg-fallback-team {
  width: 100%;
  margin-top: 8px;
}

.reg-fallback-team .reg-team-select {
  margin-top: 4px;
}

.roster-team-row {
  cursor: pointer;
}
.roster-team-row:hover {
  background: radial-gradient(circle at top left, #1a3550, #050814 75%);
}
.roster-team-arrow {
  color: var(--text-muted);
  font-size: 14px;
}
.roster-players-block {
  margin-top: 0.5rem;
}

.teams-by-tournament-group {
  margin-bottom: 12px;
}

.teams-by-tournament-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 4px 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tournament-card {
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, #132337, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 12px 13px 10px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
}

.tournament-card-main {
  display: flex;
  flex-direction: column;
}

.btn-icon {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 14px;
}

.btn-icon:hover {
  border-color: rgba(248, 113, 113, 0.8);
  color: var(--danger);
}

.mt-lg {
  margin-top: 16px;
}

.screen {
  display: none;
}

.screen-active {
  display: block;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, #0f172a, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 12px 13px 10px;
  margin-bottom: 5px;
  box-shadow: var(--shadow-subtle);
}

.profile-card {
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, #0f172a, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 12px 13px 10px;
  margin-bottom: 5px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  gap: 10px;
}

.profile-card img {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
}

.profile-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.mt-sm { margin-top: 6px; }

.profile-login-data {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 13px;
}

.profile-login-data .copyable-login {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.profile-login-data .copyable-login:hover {
  color: var(--primary, #3b82f6);
}

.profile-login-data .copyable-login.copyable-copied {
  color: var(--success, #22c55e);
}

.profile-login-data .btn-copy-login {
  margin-top: 8px;
  font-size: 12px;
}

.profile-login-data .btn-copy-login.btn-copy-done {
  color: var(--success, #22c55e);
}

.profile-repaired-hint {
  color: var(--primary);
  margin-bottom: 8px;
}

/* Профиль игрока: фото слева, данные справа */
.player-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at top left, #0f172a, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
}

.player-profile-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.player-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-profile-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
}

.player-profile-data {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.player-profile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.player-profile-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 140px;
}

.player-profile-value {
  font-weight: 500;
  color: var(--text);
}

.news-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.news-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.news-text {
  font-size: 13px;
}

.live-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.live-card {
  border-radius: 12px;
  background: linear-gradient(145deg, #1c1917 0%, #0c0a09 50%, #020617 100%);
  border: 1px solid rgba(248, 113, 113, 0.35);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(248, 113, 113, 0.08);
  position: relative;
  overflow: hidden;
}

.live-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #f87171, #dc2626);
  border-radius: 12px 0 0 12px;
}

.live-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.live-header .teams {
  flex: 1;
  min-width: 0;
}

.live-header .team-names {
  gap: 8px;
  font-size: 15px;
}

.live-header .score {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.live-minute {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.5);
  flex-shrink: 0;
}

.live-meta {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.live-events {
  margin-top: 6px;
  border-top: 1px dashed rgba(248, 113, 113, 0.5);
  padding-top: 4px;
  font-size: 12px;
}

.live-event-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.standings-header,
.standings-row {
  display: grid;
  grid-template-columns: 32px 1fr 32px 60px 32px;
  align-items: center;
  font-size: 12px;
  padding: 6px 4px;
}

.standings-header {
  font-weight: 600;
  color: var(--text-muted);
}

.standings-row:nth-child(odd) {
  background: rgba(15, 23, 42, 0.6);
}

.standings-header-players,
.standings-row-players {
  grid-template-columns: 30px minmax(130px, 1.3fr) minmax(100px, 1fr) 34px 40px 34px;
  gap: 6px;
}

.standings-row-players > span,
.standings-header-players > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Дополнительные вертикальные отступы между крупными блоками
   на главной и в разделе "Турниры" */
#homeTeamCard {
  margin-top: 12px;
}

#homeNews {
  margin-top: 24px;
}

#tournamentsPublicList {
  margin-top: 12px;
}

#tournamentDetail {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .layout {
    display: block;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 12px 10px 20px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 22px;
  }

  .card {
    padding: 14px 12px;
  }

  .admin-match-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .standings-header-players,
  .standings-row-players {
    grid-template-columns: 24px minmax(90px, 1.1fr) minmax(70px, 1fr) 26px 30px 26px;
    gap: 4px;
    font-size: 11px;
  }
}

