/* ============================================================
   US Futsal — Goal Clip Submission
   Brand: Navy / Blue / Red / Gold, Barlow (matches usfutsal.com)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,600&family=Barlow+Condensed:wght@600;700;800&display=swap');

:root {
  --navy-950: #081328;
  --navy-900: #0d2342;
  --navy-800: #142c50;
  --navy-700: #193c71;
  --blue: #0057b8;
  --red: #c8102e;
  --red-dark: #6d0417;
  --gold: #f2a900;
  --white: #ffffff;
  --off-white: #f2f2f2;
  --ink-soft: rgba(255, 255, 255, 0.72);
  --ink-faint: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.14);
  --max-w: 1080px;
  --radius: 3px;
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Barlow', Helvetica, Arial, sans-serif;
  background: var(--navy-950);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-950);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.topbar .logo {
  height: 30px;
  width: auto;
}
.topbar .event-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
}
.topbar .event-tag strong {
  display: block;
  color: var(--gold);
  font-size: 13px;
}

/* Inside the hero, the header becomes a transparent overlay so it reads as
   one unified block with the photo/text below rather than a separate bar. */
.hero > .topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(8, 19, 40, 0.94) 0%, rgba(8, 19, 40, 0.6) 60%, rgba(8, 19, 40, 0) 100%);
  border-bottom: none;
  padding-bottom: 30px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 118px 0 46px;
  background:
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  overflow: hidden;
  border-bottom: 4px solid var(--red);
}
@media (min-width: 721px) {
  .hero {
    min-height: max(600px, 42vw);
    display: flex;
    align-items: center;
  }
}
.hero-inner { position: relative; z-index: 2; }

@media (min-width: 721px) {
  .hero .hero-inner {
    max-width: 620px;
    width: auto;
    margin: 0;
    padding-left: clamp(24px, 4vw, 80px);
    padding-right: 24px;
  }
}

.hero-photo {
  position: absolute;
  inset: 0;
  left: max(680px, 44%);
  z-index: 1;
  overflow: hidden;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 42%;
  display: block;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    var(--navy-950) 0%,
    rgba(8, 19, 40, 0.82) 14%,
    rgba(8, 19, 40, 0.28) 34%,
    rgba(8, 19, 40, 0) 56%
  );
  z-index: 2;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(8, 19, 40, 0) 55%, rgba(8, 19, 40, 0.6) 100%);
  z-index: 2;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
}
.hero h1 {
  font-size: clamp(38px, 5vw, 80px);
  line-height: 0.96;
  color: var(--white);
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 span { color: var(--gold); }
.hero p.lede {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--ink-soft);
  font-weight: 500;
}
.hero-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.hero-meta .item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-meta .item .k {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
}
.hero-meta .item .v {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
}

/* ---------- section shell ---------- */
.section {
  padding: 46px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.section-head .num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--navy-950);
  background: var(--gold);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.section-head h2 {
  font-size: 22px;
  color: var(--white);
}
.section-head .hint {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 500;
  text-transform: none;
}

/* ---------- form ---------- */
.card {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field label .opt {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-faint);
  font-weight: 500;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  background: var(--navy-950);
  border: 1px solid var(--line);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 78px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  background: #0a1a33;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23F2A900' stroke-width='2' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field .error-msg {
  font-size: 12.5px;
  color: #ff8a8a;
  min-height: 1em;
}
.field.invalid input, .field.invalid select, .field.invalid textarea {
  border-color: var(--red);
}

/* ---------- dropzone ---------- */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--navy-950);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--gold);
  background: #0a1a33;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone .dz-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--gold);
}
.dropzone .dz-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
}
.dropzone .dz-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-faint);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--blue);
  text-align: left;
  padding: 18px 20px;
}
.file-row {
  display: none;
  align-items: center;
  gap: 14px;
}
.dropzone.has-file .file-row { display: flex; }
.dropzone.has-file .dz-empty { display: none; }
.file-row .file-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.file-row .file-meta { min-width: 0; flex: 1; }
.file-row .file-name {
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-row .file-size { font-size: 12.5px; color: var(--ink-faint); }
.file-row .file-remove {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: var(--radius);
  width: 30px; height: 30px;
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 auto;
}
.file-row .file-remove:hover { border-color: var(--red); color: var(--red); }

/* ---------- consent ---------- */
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.consent input[type="checkbox"] {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}
.consent label {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-lift);
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { font-size: 13px; padding: 9px 16px; }

/* ---------- progress ---------- */
.progress-wrap { display: none; margin-top: 18px; }
.progress-wrap.active { display: block; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 600;
}
.progress-track {
  height: 8px;
  background: var(--navy-950);
  border: 1px solid var(--line);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width 0.15s ease;
}

/* ---------- status banners ---------- */
.banner {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.banner.show { display: block; }
.banner.error { background: rgba(200, 16, 46, 0.14); border-color: var(--red); color: #ffb3bf; }
.banner.success { background: rgba(242, 169, 0, 0.12); border-color: var(--gold); color: var(--gold); }

/* ---------- success state ---------- */
.success-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
}
.success-state.show { display: block; }
.success-state .icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-950);
  display: flex; align-items: center; justify-content: center;
}
.success-state h2 { font-size: 26px; color: var(--white); }
.success-state p { margin-top: 10px; color: var(--ink-soft); max-width: 42ch; margin-left: auto; margin-right: auto; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--ink-faint);
  font-size: 13px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a.back { color: var(--ink-soft); font-weight: 600; }
.site-footer a.back:hover { color: var(--gold); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 98px 0 34px; }
  .section { padding: 34px 0; }
  .topbar .event-tag { font-size: 11px; }
  .hero > .topbar { padding-bottom: 20px; }
  .hero-photo { display: none; }
}

/* ============================================================
   Admin
   ============================================================ */
.admin-body { background: var(--navy-950); }
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  text-align: center;
}
.login-card img { height: 34px; margin: 0 auto 22px; }
.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-card p.sub { color: var(--ink-faint); font-size: 13.5px; margin: 6px 0 22px; }
.login-card .field { text-align: left; margin-bottom: 16px; }

.admin-wrap { max-width: 1280px; }
.admin-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.topbar .admin-header {
  height: auto;
}
.admin-header img { height: 26px; }
.admin-header h1 { font-size: 18px; margin-right: auto; }
@media (max-width: 640px) {
  .admin-header { row-gap: 12px; }
  .admin-header h1 { order: 1; flex: 1 1 100%; margin-right: 0; }
  .admin-header #refreshBtn, .admin-header #logoutBtn { order: 2; flex: 1 1 0; }
}
.admin-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 0;
  align-items: center;
}
.admin-toolbar input[type="search"], .admin-toolbar select {
  background: var(--navy-900);
  border: 1px solid var(--line);
  color: var(--white);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
}
.admin-toolbar input[type="search"] { min-width: 220px; flex: 1; }
.admin-stats {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-faint);
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}
.admin-stats strong { color: var(--gold); }
.admin-stats .starred-count { color: var(--gold); font-weight: 600; }

.star-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.star-filter svg { flex: 0 0 auto; }
.star-filter.active {
  background: rgba(242, 169, 0, 0.14);
  border-color: var(--gold);
  color: var(--gold);
}
.star-filter.active svg { fill: var(--gold); }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding-bottom: 60px;
}
.sub-card {
  background: var(--navy-900);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.video-wrap { position: relative; }
.sub-card video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  display: block;
}
.star-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(8, 19, 40, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(2px);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.star-toggle:hover { border-color: var(--gold); color: var(--gold); }
.star-toggle:active { transform: scale(0.92); }
.star-toggle.is-starred {
  background: rgba(242, 169, 0, 0.9);
  border-color: var(--gold);
  color: var(--navy-950);
}
.sub-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sub-card .name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sub-card .name-row .name { font-weight: 700; font-size: 15.5px; }
.sub-card .name-row .division {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-950);
  background: var(--gold);
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.sub-card .meta-line { font-size: 13px; color: var(--ink-soft); }
.sub-card .meta-line.faint { color: var(--ink-faint); }
.sub-card .game-info { font-size: 12.5px; color: var(--ink-faint); font-style: italic; }
.sub-card .actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding-top: 6px;
}
.sub-card .actions .btn { flex: 1; padding: 10px 12px; font-size: 13px; }
.sub-card .actions .btn-danger {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  flex: 0 0 auto;
  width: 40px;
  padding: 10px;
}
.sub-card .actions .btn-danger:hover { border-color: var(--red); color: var(--red); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-faint);
}
.empty-state h3 { color: var(--white); font-size: 20px; margin-bottom: 8px; }

.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
