/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@font-face {
  font-family: "Proxima Nova Soft";
  src: url("/fonts/ProximaNovaSoft-Regular.otf") format("opentype");
  font-weight: 400;
}

@font-face {
  font-family: "Proxima Nova Soft";
  src: url("/fonts/ProximaNovaSoft-Medium.otf") format("opentype");
  font-weight: 500;
}

@font-face {
  font-family: "Proxima Nova Soft";
  src: url("/fonts/ProximaNovaSoft-Bold.otf") format("opentype");
  font-weight: 700;
}

:root {
  --ink: #16211f;
  --muted: #64736c;
  --line: #e2e8e1;
  --surface: #ffffff;
  --soft: #f4f7f2;
  --soft-field: #edf6ef;
  --primary: #147d64;
  --primary-dark: #0d5748;
  --primary-light: #e2f2ea;
  --aqua: #0b6cae;
  --aqua-soft: rgba(11, 108, 174, 0.12);
  --red: #d94c4c;
  --red-soft: #fde8e7;
  --yellow: #f4b400;
  --yellow-soft: #fff7d6;
  --shadow: 0 14px 36px rgba(22, 33, 31, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(20, 125, 100, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(11, 108, 174, 0.025) 1px, transparent 1px),
    var(--soft);
  background-size: 40px 40px;
  color: var(--ink);
  font-family: "Proxima Nova Soft", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(22, 33, 31, 0.04);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
}

.brand {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  position: relative;
}

.brand::before {
  content: "⚽";
  display: inline-block;
  font-size: 18px;
  margin-right: 8px;
  transform: translateY(1px);
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.page {
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px;
}

.page-header {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero-panel {
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(20, 125, 100, 0.22);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto auto;
  margin-bottom: 24px;
  min-height: 220px;
  overflow: hidden;
  padding: 32px;
  position: relative;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.football-field::before {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-left: 0;
  border-right: 0;
  content: "";
  inset: 22px -80px 22px auto;
  position: absolute;
  width: 360px;
}

.football-field::after {
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  content: "";
  height: 132px;
  position: absolute;
  right: 30px;
  top: 44px;
  width: 132px;
}

.football-field {
  background:
    linear-gradient(135deg, rgba(20, 125, 100, 0.96), rgba(11, 108, 174, 0.88) 55%, rgba(244, 180, 0, 0.78)),
    var(--surface);
  color: #fff;
}

.football-field .eyebrow,
.football-field .muted {
  color: rgba(255, 255, 255, 0.82);
}

.hero-ball {
  align-items: center;
  background: #fff;
  border: 6px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  box-shadow: 0 16px 34px rgba(22, 33, 31, 0.22);
  color: var(--ink);
  display: flex;
  font-size: 56px;
  height: 116px;
  justify-content: center;
  width: 116px;
}

.hero-action {
  background: #fff;
  border-color: #fff;
  color: var(--primary);
}

.hero-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-flags span {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  display: inline-flex;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  width: 42px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 18px;
}

.spaced-top {
  margin-top: 18px;
}

.timezone-note {
  margin-top: 8px;
}

.timezone-note strong {
  color: var(--ink);
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.rules-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(22, 33, 31, 0.05);
  padding: 20px;
}

.stat {
  color: var(--muted);
  font-size: 14px;
}

.stat strong {
  color: var(--ink);
  display: block;
  font-size: 30px;
}

.stat {
  border-left: 5px solid var(--primary);
}

.stat-purple {
  background: linear-gradient(180deg, #fff, var(--soft-field));
}

.stat-green {
  border-left-color: var(--aqua);
  background: linear-gradient(180deg, #fff, rgba(11, 108, 174, 0.08));
}

.stat-yellow {
  border-left-color: var(--yellow);
  background: linear-gradient(180deg, #fff, var(--yellow-soft));
}

.rule-card {
  min-height: 184px;
  overflow: hidden;
  position: relative;
}

.rule-card::after {
  content: "⚽";
  font-size: 74px;
  opacity: 0.08;
  position: absolute;
  right: 16px;
  top: 12px;
}

.rule-card-primary {
  border-top: 5px solid var(--primary);
}

.rule-card-green {
  border-top: 5px solid var(--aqua);
}

.rule-card-red {
  border-top: 5px solid var(--red);
}

.rule-icon,
.rule-step {
  align-items: center;
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 22px;
  font-weight: 700;
  height: 46px;
  justify-content: center;
  margin-bottom: 14px;
  width: 46px;
}

.rules-list {
  display: grid;
  gap: 14px;
}

.rules-list-wide {
  gap: 16px;
}

.rule-row {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr;
  padding-bottom: 14px;
}

.rule-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.rule-row p {
  margin: 0;
}

.rule-step {
  font-size: 16px;
  height: 34px;
  margin: 0;
  width: 34px;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(120px, auto) 1fr auto;
  padding: 14px 16px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.match-row:hover {
  border-color: rgba(20, 125, 100, 0.42);
  box-shadow: 0 10px 24px rgba(22, 33, 31, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

.match-meta {
  display: grid;
  gap: 3px;
  min-width: 120px;
}

.match-time {
  white-space: nowrap;
}

.teams {
  display: grid;
  gap: 4px;
}

.team-line {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.team-badge {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  gap: 9px;
  min-width: 0;
}

.team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flag {
  align-items: center;
  background: var(--soft-field);
  border: 1px solid rgba(20, 125, 100, 0.2);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.mini-fixture,
.fixture-title,
.final-score {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fixture-title {
  font-size: 30px;
}

.versus {
  align-items: center;
  background: var(--primary-light);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  text-transform: uppercase;
  width: 34px;
}

.score {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--primary-dark);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  padding: 5px 10px;
  white-space: nowrap;
}

.pill.open {
  background: var(--aqua-soft);
  border-color: rgba(11, 108, 174, 0.26);
  color: #085888;
}

.pill.closed {
  background: var(--red-soft);
  border-color: rgba(217, 76, 76, 0.28);
  color: var(--red);
}

.pill.live {
  background: var(--primary-light);
  border-color: rgba(20, 125, 100, 0.28);
  color: var(--primary-dark);
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
.button {
  appearance: none;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  min-width: 132px;
  padding: 7px 16px;
  text-transform: uppercase;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

button:hover,
.button:hover {
  background: #fff;
  color: var(--primary);
  text-decoration: none;
}

.button.secondary,
button.secondary {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.button.secondary:hover,
button.secondary:hover {
  background: var(--primary);
  color: #fff;
}

.button.danger,
button.danger {
  background: var(--red);
  border-color: var(--red);
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--primary);
  font-weight: 400;
  min-width: auto;
  min-height: auto;
  padding: 0;
  text-transform: none;
}

form.inline {
  display: inline;
}

.form {
  display: grid;
  gap: 14px;
  max-width: 460px;
}

.score-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.check-label {
  align-items: center;
  display: flex;
  gap: 8px;
  width: fit-content;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid rgba(22, 33, 31, 0.35);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 8px 14px;
  width: 100%;
}

input[type="checkbox"] {
  accent-color: var(--primary);
  flex: 0 0 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  width: 18px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 125, 100, 0.14);
  outline: 0;
}

input[type="number"] {
  max-width: 88px;
}

.error-list {
  color: var(--red);
  margin: 0;
  padding-left: 18px;
}

.flash {
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.flash.notice {
  background: var(--aqua-soft);
  color: #085888;
}

.flash.alert {
  background: var(--red-soft);
  color: var(--red);
}

table {
  background: var(--surface);
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

th {
  background: var(--soft-field);
  color: var(--muted);
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 720px) {
  .topbar,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 16px;
  }

  .page {
    padding: 18px;
  }

  .match-row {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .hero-ball {
    height: 84px;
    justify-self: start;
    width: 84px;
    font-size: 40px;
  }

  .fixture-title {
    font-size: 25px;
  }
}
