:root {
  --bg-sky: #f3f8ff;
  --bg-sky-2: #e2eeff;
  --bg-deep-blue: #cfdff8;
  --card-bg: rgba(255, 255, 255, 0.86);
  --line-soft: rgba(57, 106, 168, 0.24);
  --text-main: #2a4f78;
  --text-muted: #5e7fa7;
  --brand: #2b73d0;
  --brand-alt: #6aa8ff;
  --ok: #16a34a;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Roboto", sans-serif;
  background:
    radial-gradient(
      circle at 12% 9%,
      rgba(89, 153, 255, 0.22),
      transparent 36%
    ),
    radial-gradient(
      circle at 88% 11%,
      rgba(46, 114, 224, 0.22),
      transparent 34%
    ),
    linear-gradient(
      160deg,
      var(--bg-sky) 0%,
      var(--bg-sky-2) 50%,
      var(--bg-deep-blue) 100%
    );
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(0, 92, 148, 0.08) 1px,
    transparent 1px
  );
  background-size: 5px 5px;
  opacity: 0.34;
  z-index: -4;
}

.app-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background:
    linear-gradient(115deg, rgba(106, 168, 255, 0.2), transparent 42%),
    linear-gradient(300deg, rgba(43, 115, 208, 0.2), transparent 45%);
}

.stadium-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    linear-gradient(
      to bottom,
      rgba(236, 245, 255, 0.2),
      rgba(210, 227, 252, 0.74) 58%,
      rgba(194, 214, 247, 0.7) 100%
    ),
    url("https://images.unsplash.com/photo-1570498839593-e565b39455fc?auto=format&fit=crop&w=1800&q=80")
      center / cover no-repeat;
  opacity: 0.5;
}

.pitch-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(80, 147, 255, 0.08) 0,
      rgba(80, 147, 255, 0.08) 45px,
      rgba(255, 255, 255, 0.05) 45px,
      rgba(255, 255, 255, 0.05) 90px
    ),
    radial-gradient(
      circle at 50% 50%,
      transparent 0 180px,
      rgba(53, 123, 224, 0.28) 181px 183px,
      transparent 184px
    );
  opacity: 0.4;
}

.app-navbar {
  backdrop-filter: blur(10px);
  background: linear-gradient(
    120deg,
    rgba(11, 72, 168, 0.96),
    rgba(33, 108, 219, 0.93)
  );
  border-bottom: 1px solid rgba(151, 196, 255, 0.42);
  box-shadow: 0 8px 24px rgba(7, 36, 84, 0.33);
}

.brand-mark {
  font-family: "Roboto", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 400;
  color: #f5faff !important;
  font-size: 2rem;
  text-shadow: 0 1px 0 rgba(0, 22, 55, 0.4);
}

.brand-word {
  line-height: 1;
  transform: translateY(0.03em);
}

.brand-ball-o {
  width: 0.88em;
  height: 0.88em;
  margin-top: 0.03em;
  border-radius: 50%;
  border: 1px solid rgba(235, 244, 255, 0.88);
  box-shadow: 0 1px 3px rgba(7, 32, 76, 0.45);
  background: url("https://thf.bing.com/th/id/OSB.wRVIpsIHiT2n8o0JrWuDNQ--.png?w=50&h=50&c=6&qlt=90&o=6&dpr=2&pid=BingSports")
    center / cover no-repeat;
}

.nav-link {
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #ecf5ff !important;
}

.nav-link:hover {
  color: #cbe4ff !important;
}

.nav-link.disabled {
  color: #d8ebff !important;
  opacity: 0.85;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 150, 225, 0.5);
  border-radius: 1rem;
  padding: 1.25rem;
  background:
    linear-gradient(
      130deg,
      rgba(94, 147, 221, 0.42),
      rgba(226, 239, 255, 0.84) 40%
    ),
    url("https://images.unsplash.com/photo-1487466365202-1afdb86c764e?auto=format&fit=crop&w=1400&q=80")
      center / cover no-repeat;
  box-shadow: 0 14px 34px rgba(33, 70, 124, 0.24);
  animation: rise 0.55s ease-out;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -26px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 32%,
    #ffffff 0 20%,
    #e2e8f0 20% 45%,
    #1f2937 46% 52%,
    #f8fafc 53% 74%,
    #0f172a 75% 100%
  );
  opacity: 0.32;
  transform: rotate(16deg);
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: #7aa8e2;
  font-weight: 700;
}

.display-title {
  margin-bottom: 0.65rem;
  font-family: "Roboto", sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  letter-spacing: 0.6px;
  line-height: 1.03;
  color: #e8f2ff;
  text-shadow: 0 2px 6px rgba(17, 44, 78, 0.4);
}

.hero-panel .text-secondary {
  color: #d2e4fb !important;
}

.app-card {
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.9),
    rgba(240, 250, 255, 0.82)
  );
  box-shadow: 0 16px 28px rgba(6, 80, 121, 0.16);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease;
  animation: rise 0.5s ease both;
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: rgba(65, 132, 224, 0.45);
}

.option-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(1, 98, 161, 0.26);
  border-radius: 0.78rem;
  padding: 0.62rem 0.78rem;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  background: rgba(255, 255, 255, 0.62);
}

.option-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 139, 230, 0.45);
  background: rgba(102, 164, 255, 0.16);
}

.option-pill input[type="radio"] {
  margin: 0;
  accent-color: var(--brand-alt);
}

.option-pill span {
  color: #3a5f8d;
}

.option-pill input[type="radio"]:checked + span {
  color: #1f4f88;
  font-weight: 600;
}

.team-flag {
  width: 36px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(1, 98, 161, 0.28);
  box-shadow: 0 2px 6px rgba(22, 58, 107, 0.18);
}

.stat-card {
  height: 100%;
  border: 1px solid rgba(1, 98, 161, 0.24);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.88),
    rgba(235, 246, 253, 0.8)
  );
}

.stat-card--matches {
  border-color: #b7d4fb;
  background: linear-gradient(165deg, #f7fbff, #e8f2ff);
}

.stat-card--matches .stat-value {
  color: #2f5f9e;
}

.stat-card--correct {
  border-color: #bce6d0;
  background: linear-gradient(165deg, #f6fcf9, #e5f6ec);
}

.stat-card--correct .stat-value {
  color: #23754b;
}

.stat-card--wrong {
  border-color: #f3d6bc;
  background: linear-gradient(165deg, #fffaf5, #fdeedc);
}

.stat-card--wrong .stat-value {
  color: #9a5b20;
}

.stat-card--penalty {
  border-color: #d8cff8;
  background: linear-gradient(165deg, #fbf9ff, #efe9ff);
}

.stat-card--penalty .stat-value {
  color: #5d4a9f;
}

.stat-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.stat-value {
  margin: 0.36rem 0 0;
  font-size: 1.46rem;
  font-weight: 700;
  color: #315781;
}

.small-value {
  font-size: 1rem;
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(2, 90, 148, 0.24);
  color: #0f3047;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(0, 184, 148, 0.72);
  box-shadow: 0 0 0 0.18rem rgba(0, 184, 148, 0.18);
}

.form-label,
label {
  color: #16415b;
  font-weight: 600;
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-color: #143a53;
  --bs-table-border-color: rgba(1, 98, 161, 0.2);
  --bs-table-striped-bg: rgba(95, 147, 225, 0.12);
  --bs-table-hover-bg: rgba(75, 136, 227, 0.18);
}

th,
td {
  color: #355a84 !important;
}

.btn-primary {
  background: linear-gradient(135deg, #2f73cf, #5ea0ff);
  border: none;
  color: #f7fbff;
  font-weight: 700;
  box-shadow: 0 8px 14px rgba(47, 115, 207, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6aa8ff, #3e7fd7);
  color: #ffffff;
}

.btn-outline-light {
  border-color: rgba(1, 98, 161, 0.34);
  color: #0f3851;
  background: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  border-color: rgba(77, 141, 230, 0.62);
  background: rgba(100, 165, 255, 0.18);
  color: #163d6b;
}

.badge.text-bg-success {
  background-color: rgba(34, 197, 94, 0.2) !important;
  color: #0e6b33 !important;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.badge.text-bg-danger {
  background-color: rgba(220, 38, 38, 0.16) !important;
  color: #9f1b1b !important;
  border: 1px solid rgba(220, 38, 38, 0.45);
}

.text-secondary {
  color: var(--text-muted) !important;
}

.text-light,
.text-white {
  color: #3a618d !important;
}

.text-warning {
  color: #b76800 !important;
}

.alert {
  border-radius: 0.85rem;
  border: 1px solid rgba(83, 139, 220, 0.26);
  background: rgba(245, 250, 255, 0.94);
  color: #16395b;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero-panel {
    padding: 1rem;
  }

  .hero-panel::after {
    width: 92px;
    height: 92px;
    right: -16px;
    bottom: -16px;
    opacity: 0.27;
  }

  .display-title {
    font-size: 1.6rem;
  }

  .brand-mark {
    font-size: 1.42rem;
  }
}

/* Schedule style override inspired by sports listing pages */
body {
  background: linear-gradient(180deg, #f5f8fd 0%, #edf3fb 100%);
}

body::before,
.app-bg,
.stadium-overlay,
.pitch-lines {
  display: none;
}

.app-navbar {
  background: linear-gradient(140deg, #0b4aa5 0%, #2b73d0 55%, #1f63bc 100%);
  border-bottom: 1px solid #8ebaf5;
  box-shadow: 0 8px 24px rgba(11, 56, 124, 0.28);
}

.brand-mark,
.nav-link,
.nav-link.disabled {
  color: #eef6ff !important;
  text-shadow: none;
}

.nav-link:hover {
  color: #ffffff !important;
}

.hero-panel {
  border: 1px solid #d5e3f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 24px rgba(18, 70, 133, 0.08);
}

.hero-panel::after {
  display: none;
}

.eyebrow {
  color: #2b5ea9;
}

.display-title {
  color: #143c7a;
  text-shadow: none;
}

.hero-panel .text-secondary {
  color: #58729a !important;
}

.app-card {
  border: 1px solid #d9e5f5;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(18, 70, 133, 0.08);
  animation: none;
}

.app-card:hover {
  transform: none;
  border-color: #c4d8f2;
}

.schedule-card {
  border-left: 4px solid #0d6efd;
}

.match-teams {
  display: grid;
  gap: 0.38rem;
}

.team-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-name {
  color: #1b3f73;
  font-weight: 700;
  line-height: 1.2;
}

.team-code {
  margin-left: auto;
  font-size: 0.74rem;
  color: #54739f;
  font-weight: 700;
  border: 1px solid #d8e5f7;
  background: #f4f8ff;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.match-state {
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.prediction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #dbe8f7;
  border-radius: 0.6rem;
  background: #f8fbff;
  padding: 0.55rem 0.7rem;
}

.prediction-name {
  color: #1c447a;
  font-weight: 600;
}

.prediction-result {
  color: #2f5d95;
  font-weight: 700;
  font-size: 0.86rem;
  text-align: right;
}

.prediction-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.prediction-status-ok {
  background: rgba(22, 163, 74, 0.16);
  color: #127037;
  border: 1px solid rgba(22, 163, 74, 0.42);
}

.prediction-status-wrong {
  background: rgba(220, 38, 38, 0.14);
  color: #a52020;
  border: 1px solid rgba(220, 38, 38, 0.34);
}

.prediction-status-pending {
  background: rgba(71, 85, 105, 0.13);
  color: #475569;
  border: 1px solid rgba(71, 85, 105, 0.3);
}

.option-pill {
  border-color: #d8e4f6;
  border-radius: 10px;
  background: #f8fbff;
}

.option-pill:hover {
  background: #eef5ff;
  border-color: #bfd4f2;
  transform: none;
}

.option-pill span {
  color: #2c568e;
}

.btn-primary {
  background: #0b62d6;
  border: 1px solid #0b62d6;
  box-shadow: none;
}

.btn-primary:hover {
  background: #0854b6;
  border-color: #0854b6;
}

.btn-outline-light {
  border-color: #bfd4f2;
  color: #2c568e;
  background: #f8fbff;
}

.btn-outline-light:hover {
  border-color: #9fc1ec;
  background: #edf4ff;
  color: #1d4b86;
}

.alert {
  border: 1px solid #cfe0f7;
  background: #f8fbff;
  color: #1f487d;
}

.app-toast-container {
  z-index: 1120;
  margin-top: 0.35rem;
}

.app-toast {
  min-width: 280px;
  max-width: 360px;
  border-radius: 0.7rem;
  box-shadow: 0 10px 22px rgba(16, 49, 95, 0.22);
}

.app-toast .toast-body {
  font-weight: 600;
  letter-spacing: 0.1px;
}

.report-player-link {
  font-weight: 700;
  color: #2a4f78;
  text-decoration: none;
}

.report-player-link:hover {
  color: #1c3f69;
  text-decoration: underline;
}

.report-prediction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #dbe8f7;
  border-radius: 0.65rem;
  background: #f8fbff;
  padding: 0.65rem 0.75rem;
}

.report-prediction-match {
  font-weight: 700;
  color: #234a7c;
}

.report-prediction-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  text-align: right;
}

/* Participants page polish */
.participants-page .participant-form-card {
  border-color: #c8dcf6;
  box-shadow: 0 12px 24px rgba(20, 74, 140, 0.14);
}

.participants-page .participant-list-card {
  border-color: #d3e2f6;
}

.participant-editor-form .form-label {
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: #1f4b84;
}

.participant-editor-form .form-control,
.participant-editor-form .form-select {
  min-height: 42px;
}

.participant-table {
  border-collapse: separate;
  border-spacing: 0;
}

.participant-table thead th {
  font-weight: 800;
  color: #2a527f !important;
  background: rgba(233, 242, 255, 0.65);
  border-bottom-width: 1px;
}

.participant-table tbody tr {
  transition: background 0.2s ease;
}

.participant-table tbody tr:hover {
  background: rgba(131, 176, 243, 0.11);
}

.participant-table td {
  vertical-align: middle;
}

.participant-edit-link {
  font-weight: 700;
  color: #2b65b6;
  text-decoration: none;
  line-height: 1.3;
}

.participant-edit-link:hover {
  color: #184a8d;
  text-decoration: underline;
}

.participant-table td:nth-child(3),
.participant-table td:nth-child(4) {
  max-width: 220px;
  color: #365d8a !important;
  font-weight: 600;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
  min-height: 42px;
  border-color: rgba(9, 86, 145, 0.26);
  background: rgba(255, 255, 255, 0.96);
}

.select2-container--bootstrap-5.select2-container--focus
  .select2-selection--multiple {
  border-color: rgba(0, 184, 148, 0.72);
  box-shadow: 0 0 0 0.18rem rgba(0, 184, 148, 0.18);
}

.select2-container--bootstrap-5 .select2-selection__choice {
  background: #edf4ff;
  border: 1px solid #c5daf8;
  color: #235086;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 600;
}

@media (max-width: 992px) {
  .participant-table td:nth-child(3),
  .participant-table td:nth-child(4) {
    max-width: none;
  }
}

/* Unified pagination style */
.pagination {
  display: flex;
  gap: 0;
  width: max-content;
  margin-left: auto;
  border: 1px solid #d8e4f4;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
}

.pagination .page-item {
  margin: 0 !important;
}

.pagination .page-link {
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-right: 1px solid #d8e4f4;
  border-radius: 0 !important;
  background: #ffffff;
  color: #3e6ea6;
  font-weight: 600;
  line-height: 1;
}

.pagination .page-item:last-child .page-link {
  border-right: 0;
}

.pagination .page-item.active .page-link {
  background: #3f76d9;
  border-color: #3f76d9;
  color: #ffffff;
}

.pagination .page-item.disabled .page-link {
  background: #f8fbff;
  color: #9ab3d1;
}

.pagination .page-link:hover {
  background: #edf4ff;
  color: #2d5f99;
}

.pagination .page-link:focus {
  box-shadow: none;
}

/* Render compact icon-like previous/next cells */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  font-size: 0;
}

.pagination .page-item:first-child .page-link::before,
.pagination .page-item:last-child .page-link::before {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.pagination .page-item:first-child .page-link::before {
  content: "\2039";
}

.pagination .page-item:last-child .page-link::before {
  content: "\203A";
}

/* Flatpickr admin theme */
.flatpickr-calendar {
  border: 1px solid #c7daf5;
  box-shadow: 0 16px 30px rgba(21, 72, 134, 0.2);
  border-radius: 10px;
  font-family: "Roboto", sans-serif;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
.flatpickr-weekday {
  color: #1f4f89;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 6px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #3f76d9;
  border-color: #3f76d9;
}

.flatpickr-day.today {
  border-color: #3f76d9;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
  background: #edf4ff;
}
