@import url(
  "https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800;900&display=swap"
);

:root {
  --match-bg: #020a14;
  --match-deep: #031224;
  --match-panel: rgba(8, 28, 52, 0.9);
  --match-border: rgba(145, 170, 202, 0.18);
  --match-text: #f7f9fc;
  --match-muted: #9fb0c7;
  --match-gold: #d5a43a;
  --match-gold-light: #ffe18a;
  --match-cyan: #43c8ff;
  --match-green: #54eb9c;
  --match-red: #ff707c;

  --match-shadow:
    0 26px 62px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body.premier-match-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--match-text);
  background:
    radial-gradient(
      circle at 10% 4%,
      rgba(216, 170, 56, 0.09),
      transparent 29rem
    ),
    radial-gradient(
      circle at 92% 14%,
      rgba(67, 200, 255, 0.1),
      transparent 34rem
    ),
    linear-gradient(
      180deg,
      #020a14,
      #061426 48%,
      #020a14
    );
  font-family:
    "Inter",
    Arial,
    Helvetica,
    sans-serif;
}

body.premier-match-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  pointer-events: none;
  background:
    linear-gradient(
      112deg,
      transparent 18%,
      rgba(216, 170, 56, 0.11) 18.1%,
      transparent 18.35%
    ),
    linear-gradient(
      68deg,
      transparent 79%,
      rgba(67, 200, 255, 0.09) 79.1%,
      transparent 79.35%
    );
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

.match-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding:
    12px clamp(18px, 5vw, 68px);
  border-bottom:
    1px solid rgba(216, 170, 56, 0.32);
  background:
    rgba(2, 10, 20, 0.94);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.match-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}

.match-brand-mark {
  width: 62px;
  height: 62px;
  display: block;
  flex: 0 0 62px;
  overflow: hidden;
  border:
    1px solid rgba(216, 170, 56, 0.36);
  border-radius: 16px;
  background: #061426;
  box-shadow:
    0 0 24px rgba(216, 170, 56, 0.1);
}

.match-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-brand strong,
.match-brand small {
  display: block;
}

.match-brand strong {
  color: white;
  font-size: 1.05rem;
}

.match-brand small {
  margin-top: 0.2rem;
  color: var(--match-muted);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.match-header-actions {
  display: flex;
  gap: 0.65rem;
}

.match-header-actions a,
.match-header-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border:
    1px solid var(--match-border);
  border-radius: 11px;
  color: #d3ddea;
  background:
    rgba(255, 255, 255, 0.025);
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

#matchSignOutButton {
  border-color:
    rgba(255, 112, 124, 0.38);
  color: #ffabb3;
  background:
    rgba(255, 112, 124, 0.055);
}

.match-access-status {
  width:
    min(1440px, calc(100% - 32px));
  min-height: 46px;
  display: flex;
  align-items: center;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  border:
    1px solid rgba(67, 200, 255, 0.23);
  border-radius: 13px;
  color: #bfeaff;
  background:
    rgba(8, 35, 64, 0.78);
  font-size: 0.75rem;
}

.match-page {
  width:
    min(1440px, calc(100% - 32px));
  margin: 0 auto 4rem;
}

.match-submit-app,
.match-auth-required {
  position: relative;
  padding:
    clamp(1.3rem, 3vw, 2.4rem);
  border:
    1px solid var(--match-border);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(14, 45, 78, 0.82),
      rgba(3, 17, 34, 0.96)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    var(--match-shadow);
}

.match-submit-app::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2.2rem;
  width: 100px;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      var(--match-gold),
      var(--match-cyan)
    );
  box-shadow:
    0 0 18px rgba(67, 200, 255, 0.45);
}

.match-page-heading,
.match-form-panel > header,
.match-player-panel > header,
.match-document-preview > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.match-eyebrow {
  margin: 0 0 0.55rem;
  color: var(--match-gold-light);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: white;
}

h1 {
  font-family:
    "Bebas Neue",
    Impact,
    sans-serif;
  font-size:
    clamp(3.8rem, 7vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: 0.035em;
}

.match-page-heading p:not(.match-eyebrow),
.match-auth-required p {
  max-width: 740px;
  color: var(--match-muted);
  line-height: 1.7;
}

.match-preview-badge {
  padding: 0.7rem 0.9rem;
  border:
    1px solid rgba(255, 225, 138, 0.4);
  border-radius: 999px;
  color: var(--match-gold-light);
  background:
    rgba(216, 170, 56, 0.07);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.match-auth-required > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  border:
    1px solid rgba(255, 225, 138, 0.65);
  border-radius: 11px;
  color: #07101d;
  background:
    linear-gradient(
      110deg,
      #b98622,
      var(--match-gold-light),
      #ce9d30
    );
  font-size: 0.75rem;
  font-weight: 900;
  text-decoration: none;
}

.match-form-panel,
.match-player-panel,
.match-document-preview {
  margin-top: 1rem;
  padding: 1.25rem;
  border:
    1px solid rgba(145, 170, 202, 0.16);
  border-radius: 17px;
  background:
    rgba(2, 15, 30, 0.58);
}

.match-form-panel h2,
.match-player-panel h2,
.match-document-preview h2 {
  font-size: 1.1rem;
}

.match-form-grid,
.match-player-fields {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.match-form-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}

label > span {
  display: block;
  margin-bottom: 0.45rem;
  color: #d6e0eb;
  font-size: 0.72rem;
  font-weight: 800;
}

label small {
  color: var(--match-muted);
  font-weight: 500;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 0.8rem;
  border:
    1px solid rgba(145, 170, 202, 0.22);
  border-radius: 10px;
  outline: none;
  color: white;
  background:
    rgba(2, 14, 29, 0.86);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--match-cyan);
  background:
    rgba(3, 20, 39, 0.96);
  box-shadow:
    0 0 0 3px rgba(67, 200, 255, 0.09);
}

input::placeholder {
  color: #60738a;
}

.match-player-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.match-player-panel.is-submitter {
  border-color:
    rgba(216, 170, 56, 0.28);
}

.match-player-panel header span {
  color: var(--match-muted);
  font-size: 0.68rem;
}

.match-player-fields {
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
}

.match-player-fields .is-wide {
  grid-column: 1 / -1;
}

.match-player-panel footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top:
    1px solid rgba(145, 170, 202, 0.12);
  color: var(--match-muted);
  font-size: 0.72rem;
}

.match-player-panel footer strong {
  margin-left: 0.3rem;
  color: var(--match-gold-light);
  font-size: 1rem;
}

.match-preview-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border:
    1px solid rgba(67, 200, 255, 0.17);
  border-radius: 14px;
  background:
    rgba(6, 28, 53, 0.7);
}

#validateMatchButton {
  min-height: 47px;
  padding: 0 1.1rem;
  border:
    1px solid rgba(255, 225, 138, 0.7);
  border-radius: 11px;
  color: #07101d;
  background:
    linear-gradient(
      110deg,
      #b98622,
      var(--match-gold-light),
      #ce9d30
    );
  font-weight: 900;
  cursor: pointer;
}

#resetMatchButton {
  min-height: 47px;
  padding: 0 1.1rem;
  border:
    1px solid var(--match-border);
  border-radius: 11px;
  color: #d3ddea;
  background:
    rgba(255, 255, 255, 0.03);
  font-weight: 800;
  cursor: pointer;
}

#validateMatchButton:hover,
#resetMatchButton:hover {
  transform: translateY(-1px);
}

#matchFormStatus {
  flex-basis: 100%;
  margin: 0;
  color: var(--match-muted);
  font-size: 0.72rem;
}

.match-document-preview > header > span {
  padding: 0.45rem 0.7rem;
  border:
    1px solid rgba(255, 112, 124, 0.3);
  border-radius: 999px;
  color: #ffabb3;
  background:
    rgba(255, 112, 124, 0.05);
  font-size: 0.65rem;
  font-weight: 800;
}

.match-document-preview pre {
  max-height: 620px;
  overflow: auto;
  margin: 1rem 0 0;
  padding: 1rem;
  border:
    1px solid rgba(145, 170, 202, 0.13);
  border-radius: 12px;
  color: #bfeaff;
  background: #010913;
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.match-site-footer {
  padding: 1.5rem;
  border-top:
    1px solid rgba(145, 170, 202, 0.12);
  color: #71839a;
  background:
    rgba(2, 9, 18, 0.78);
  text-align: center;
  font-size: 0.72rem;
}

@media (max-width: 1050px) {
  .match-form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 650px) {
  .match-site-header,
  .match-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .match-header-actions {
    width: 100%;
  }

  .match-header-actions > * {
    flex: 1;
  }

  .match-page,
  .match-access-status {
    width:
      min(100% - 20px, 1440px);
  }

  .match-submit-app,
  .match-auth-required {
    padding: 1rem;
    border-radius: 17px;
  }

  .match-form-grid,
  .match-player-fields {
    grid-template-columns: 1fr;
  }

  .match-player-fields .is-wide {
    grid-column: auto;
  }

  .match-preview-badge {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
