/* Turniersystem: Liste-Ergänzungen, Wizard, Detail, Bracket, Matchraum,
   Organizer- und Admin-Seiten. Neon-Design analog style_dashboard/style_tournaments. */

/* ---------- Karten (eigenständig, da style_dashboard nur auf dem Dashboard lädt) */
.dash-card {
  background: rgba(1, 15, 29, 0.75);
  border: 1px solid rgba(69, 244, 248, 0.25);
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(69, 244, 248, 0.08);
  color: #fff;
  overflow: hidden;
}
.dash-card-header {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(69, 244, 248, 0.2);
  color: #45f4f8;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.dash-card-body { padding: 1rem; }

.neon-title { color: #45f4f8; }
.tour-danger { border-color: #ff4dd2 !important; color: #ff4dd2 !important; }
.tour-danger-text { color: #ff4dd2; }

.btn-neon {
  background: transparent;
  border: 1px solid #45f4f8;
  color: #45f4f8;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-neon:hover {
  background: rgba(69, 244, 248, 0.12);
  box-shadow: 0 0 12px rgba(69, 244, 248, 0.4);
  color: #fff;
}

/* ---------- Turnier-Kopf (Detailseite) */
.tour-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(69, 244, 248, 0.3);
}
.tour-title { color: #fff; text-shadow: 0 0 14px rgba(69, 244, 248, 0.5); }
.tour-pot { text-align: right; display: flex; flex-direction: column; }
.tour-pot-label { color: #9fdfe6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.tour-pot-value { color: #ffd23f; font-size: 2rem; font-weight: 700; text-shadow: 0 0 12px rgba(255, 210, 63, 0.5); }

.tour-schedule div {
  display: flex; justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(69, 244, 248, 0.15);
}
.tour-schedule div span:first-child { color: #9fdfe6; }
.tour-countdown { color: #9fdfe6; margin-top: 0.8rem; }
.tour-countdown strong { color: #45f4f8; font-size: 1.3rem; margin-left: 0.4rem; }

.tour-participants { max-height: 380px; overflow-y: auto; }
.tour-participant {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(69, 244, 248, 0.12);
}
.tour-kick {
  background: none; border: none; color: #ff4dd2; cursor: pointer;
  padding: 0 0.3rem; font-size: 0.9rem;
}

/* ---------- Wizard */
.tour-wizard {
  padding: 2rem;
  color: #fff;
  background: linear-gradient(160deg, #0c2a3f, #010f1d);
  border: 1px solid rgba(69, 244, 248, 0.25);
  border-radius: 14px;
}
.wiz-steps {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center; margin-bottom: 1.5rem;
}
.wiz-step {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(69, 244, 248, 0.25);
  border-radius: 20px;
  color: #9fdfe6; font-size: 0.8rem;
}
.wiz-step.active { border-color: #45f4f8; color: #45f4f8; box-shadow: 0 0 10px rgba(69, 244, 248, 0.35); }
.wiz-step.done { border-color: rgba(69, 244, 248, 0.6); color: #fff; }
.wiz-step-no {
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
}
.wiz-format-cards { display: flex; gap: 1rem; flex-wrap: wrap; }
.wiz-format-card {
  flex: 1 1 200px;
  border: 1px solid rgba(69, 244, 248, 0.25);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.wiz-format-card input { display: none; }
.wiz-format-card:has(input:checked), .wiz-format-card.active {
  border-color: #45f4f8;
  box-shadow: 0 0 14px rgba(69, 244, 248, 0.3);
}
.wiz-summary-row {
  display: flex; justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(69, 244, 248, 0.15);
}
.wiz-summary-row span { color: #9fdfe6; }
.wiz-publish { border-color: #ffd23f; color: #ffd23f; }

.tour-wizard .form-control, .tour-wizard .form-select,
.tmatch-report .form-control, .tmatch-report .form-select,
.chat-input .form-control {
  background: rgba(1, 15, 29, 0.8);
  border: 1px solid rgba(69, 244, 248, 0.3);
  color: #fff;
}
.tour-wizard .form-control:focus, .tour-wizard .form-select:focus {
  background: rgba(1, 15, 29, 0.9);
  border-color: #45f4f8;
  box-shadow: 0 0 8px rgba(69, 244, 248, 0.4);
  color: #fff;
}
.tour-wizard .form-label { color: #9fdfe6; }

/* ---------- Badges */
.badge-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(255, 210, 63, 0.5);
  border-radius: 20px;
  color: #ffd23f; font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 210, 63, 0.2);
}
.badge-chip img { width: 20px; height: 20px; object-fit: contain; }
.badge-chip.small { padding: 0.1rem 0.5rem; font-size: 0.75rem; }
.badge-chip.small img { width: 14px; height: 14px; }
.player-badges { display: flex; gap: 0.3rem; }

/* ---------- Trophies & Hero */
.trophy-icon {
  width: 22px; height: 22px; object-fit: contain;
  vertical-align: text-bottom;
  filter: drop-shadow(0 0 4px rgba(255, 210, 63, 0.5));
}
.bracket-hero {
  display: flex; align-items: flex-end;
  min-height: 140px;
  padding: 1.2rem 1.6rem;
  border-radius: 14px;
  border: 1px solid rgba(69, 244, 248, 0.3);
  background-size: cover;
  background-position: center;
}

/* ---------- Bracket */
.bracket-back { color: #45f4f8; text-decoration: none; }
.bracket-scroll { overflow-x: auto; padding-bottom: 1rem; }
.bracket-tree { display: flex; gap: 2.2rem; align-items: stretch; min-width: min-content; }
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; gap: 1rem; min-width: 210px; }
.bracket-round-label {
  text-align: center; color: #9fdfe6; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.bracket-match-link { text-decoration: none; position: relative; }
.bracket-match {
  background: rgba(1, 15, 29, 0.85);
  border: 1px solid rgba(69, 244, 248, 0.3);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s;
}
.bracket-match:hover { box-shadow: 0 0 14px rgba(69, 244, 248, 0.45); }
.bracket-match.status-in_progress { border-color: #45f4f8; box-shadow: 0 0 10px rgba(69, 244, 248, 0.4); }
.bracket-match.status-disputed, .bracket-match.status-admin_review { border-color: #ff4dd2; }
.bracket-match.bye { opacity: 0.45; }
.bracket-player {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.4rem 0.7rem;
  color: #cfeef2;
  border-bottom: 1px solid rgba(69, 244, 248, 0.12);
}
.bracket-player:last-of-type { border-bottom: none; }
.bracket-player.winner { color: #45f4f8; font-weight: 600; background: rgba(69, 244, 248, 0.07); }
.bracket-player.me .bp-name::after { content: ' (Du)'; color: #ffd23f; font-size: 0.75rem; }
.bp-score { min-width: 1.4rem; text-align: right; }
.bracket-status {
  position: absolute; top: 2px; right: 4px;
  font-size: 0.65rem; color: #ff4dd2;
}
/* Verbindungslinien zwischen den Runden */
.bracket-round + .bracket-round .bracket-match-link::before {
  content: '';
  position: absolute;
  left: -1.2rem; top: 50%;
  width: 1.2rem; height: 1px;
  background: rgba(69, 244, 248, 0.35);
}

/* Sieger-Spalte hinter dem Finale */
.bracket-champion {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px dashed rgba(255, 210, 63, 0.4);
  background: rgba(1, 15, 29, 0.85);
  color: #9fdfe6;
  font-size: 0.9rem;
}
.bracket-champion.decided {
  border-style: solid;
  border-color: #ffd23f;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(255, 210, 63, 0.35);
}
.bracket-champion-trophy {
  width: 26px;
  height: 26px;
  filter: grayscale(1) opacity(0.5);
}
.bracket-champion.decided .bracket-champion-trophy { filter: none; }
.bracket-champion::before {
  content: '';
  position: absolute;
  left: -2.2rem; top: 50%;
  width: 2.2rem; height: 1px;
  background: rgba(255, 210, 63, 0.4);
}

/* Turnierliste: Kopf für eingeloggte User (ohne Hero-Hintergrundbild) */
.tour-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.8rem;
  border-radius: 14px;
  border: 1px solid rgba(69, 244, 248, 0.3);
  background: linear-gradient(135deg, rgba(14, 51, 77, 0.85), rgba(1, 15, 29, 0.95));
  box-shadow: 0 0 18px rgba(69, 244, 248, 0.12);
  margin-bottom: 1.6rem;
}
.tour-list-title {
  color: #fff;
  font-weight: 800;
  font-size: 2.1rem;
  margin: 0.15rem 0 0.35rem;
}
.tour-list-sub {
  color: #9fdfe6;
  font-size: 0.92rem;
}

.rr-round { display: flex; flex-wrap: wrap; gap: 1rem; }
.rr-round .bracket-match-link { min-width: 220px; }
.rr-standings .rr-head { font-size: 0.85rem; }
.rr-standings .glowing-table-content { min-width: 0; }
.rr-me { box-shadow: 0 0 10px rgba(255, 210, 63, 0.35); }

/* ---------- Matchraum */
.tmatch-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.2rem 1.6rem; color: #fff;
}
.tmatch-game-img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(69, 244, 248, 0.4); }
.tmatch-vs { display: flex; align-items: center; justify-content: space-around; gap: 1rem; }
.tmatch-player { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; color: #fff; }
.tmatch-player.winner strong { color: #45f4f8; text-shadow: 0 0 10px rgba(69, 244, 248, 0.6); }
.tmatch-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(69, 244, 248, 0.5);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: #45f4f8; font-size: 1.6rem;
  background: rgba(1, 15, 29, 0.8);
}
.tmatch-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tmatch-score { text-align: center; }
.tmatch-score span:first-child { color: #ffd23f; font-size: 2.2rem; font-weight: 700; text-shadow: 0 0 12px rgba(255, 210, 63, 0.5); }
.tmatch-report { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.tmatch-report .form-control, .tmatch-report .form-select { max-width: 180px; }

.tmatch-chat .chat-messages, .chat-messages {
  max-height: 420px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.chat-msg { color: #cfeef2; font-size: 0.9rem; word-break: break-word; }
.chat-msg strong { color: #45f4f8; }
.chat-input { display: flex; gap: 0.5rem; }

.tour-admin-panel { border-color: rgba(255, 77, 210, 0.5); }
.tour-admin-panel .dash-card-header { color: #ff4dd2; border-bottom-color: rgba(255, 77, 210, 0.35); }

.dispute-screenshot {
  max-width: 160px; max-height: 110px;
  border: 1px solid rgba(69, 244, 248, 0.35);
  border-radius: 6px; margin: 0.3rem 0.3rem 0 0;
}

/* KYC-Prüfung: Ausweisbilder im Antragsdetail */
.kyc-id-img {
  max-width: 100%;
  border: 1px solid rgba(69, 244, 248, 0.35);
  border-radius: 6px;
}

@media (max-width: 768px) {
  .tour-head { padding: 1.2rem; }
  .tmatch-vs { flex-direction: column; }
  .bracket-round { min-width: 175px; }
}

/* ============================================================
   Geteilte Komponenten für alle Turnier- + Admin-Seiten
   (hierher verschoben aus style_tournaments.css, das nur auf
   /tournaments lädt – Admin/Organizer/Detail/Bracket/Matchraum
   laden ausschließlich dieses Stylesheet)
   ============================================================ */

/* Überschriften-Fallback (auf der Startseite/Turnierliste gewinnt
   das spezifischere .home-section .section-title aus style_home.css) */
.section-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.section-title .accent {
  color: #45f4f8;
  text-shadow: 0 0 14px rgba(69, 244, 248, 0.7);
}

.neon-divider {
  height: 2px;
  width: 120px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, #45f4f8, transparent);
  box-shadow: 0 0 12px rgba(69, 244, 248, 0.8);
  border: none;
}

/* Turnier-/Admin-Tabelle */
.glowing-table {
  margin-top: 20px;
  background-color: #111;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), 0 0 15px rgba(255, 0, 255, 0.5);
  overflow: hidden;
  padding: 12px;
  color: white;
}

.glowing-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
  border-radius: 10px;
  padding: 8px 12px;
  transition: box-shadow 0.2s ease;
}

.glowing-table-row:hover {
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5), 0 0 10px rgba(255, 0, 255, 0.5);
}

.glowing-table-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  background-size: cover !important;
  background-position: center !important;
  border: 1px solid rgba(0, 255, 255, 0.35);
}

.glowing-table-content {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.4;
  min-width: 0;
}

.glowing-table-content strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glowing-table-action {
  flex-shrink: 0;
  color: white;
  background: linear-gradient(45deg, #00FFFF, #FF00FF);
  border: none;
  padding: 5px 14px;
  border-radius: 25px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: box-shadow 0.3s ease;
}

.glowing-table-action:hover {
  box-shadow: 0 0 10px #00FFFF, 0 0 10px #FF00FF;
}

/* Mobile: Zeilen umbrechen */
@media (max-width: 575px) {
  .glowing-table-row {
    flex-wrap: wrap;
    padding: 10px;
  }

  .glowing-table-icon {
    width: 40px;
    height: 40px;
  }

  .glowing-table-content:first-of-type {
    flex: 1;
    min-width: calc(100% - 60px);
  }

  .glowing-table-content:last-of-type {
    flex: 1;
    font-size: 0.75rem;
    color: #aaa;
  }

  .glowing-table-action {
    width: 100%;
    text-align: center;
    padding: 8px;
    margin-top: 4px;
  }
}

/* Status-Badges, Pool & Meta */
.glowing-table-content .t-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #9fd4d8;
  line-height: 1.4;
  white-space: normal;
}

.t-meta {
  color: #9fd4d8;
  font-size: 0.8rem;
}

.t-status {
  font-weight: 700;
  margin-right: 4px;
}

.t-status-live {
  color: #00ff78;
  text-shadow: 0 0 8px rgba(0, 255, 120, 0.6);
}

.t-status-soon {
  color: #ffd23f;
  text-shadow: 0 0 8px rgba(255, 180, 30, 0.6);
}

.t-pool-cell {
  text-align: right;
}

.t-pool {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  color: #45f4f8;
  text-shadow: 0 0 10px rgba(69, 244, 248, 0.5);
  white-space: nowrap;
}

.t-table-note {
  color: #9fd4d8;
  font-size: 0.85rem;
}

@media (max-width: 575px) {
  .t-pool-cell {
    text-align: left;
  }
}
