@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

/* ── Tokens ───────────────────────────────────────────── */
:root {
  --pl-purple:      #37003c;
  --pl-purple-mid:  #4f0060;
  --pl-purple-soft: #6a0080;
  --pl-green:       #00ff85;
  --pl-green-dark:  #00c865;
  --pitch-green:    #1a7a3c;
  --pitch-light:    #1e8f46;
  --pl-white:       #ffffff;
  --bg:             #f5f4f7;
  --card-bg:        #ffffff;
  --text:           #1a1a2e;
  --text-muted:     #6b6b80;
  --border:         #e0dde6;
  --radius:         10px;
  --shadow:         0 2px 12px rgba(55,0,60,0.08);
}

/* ── Reset / Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--pl-purple-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header — stadium atmosphere ─────────────────────── */
header {
  background:
    /* centre-circle lines */
    radial-gradient(circle at 50% 140%, transparent 90px, rgba(255,255,255,0.07) 90px, rgba(255,255,255,0.07) 93px, transparent 93px),
    radial-gradient(circle at 50% 140%, transparent 52px, rgba(255,255,255,0.06) 52px, rgba(255,255,255,0.06) 55px, transparent 55px),
    /* penalty-arc line at bottom */
    /* stadium floodlights */
    radial-gradient(ellipse at 10% -20%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% -20%, rgba(255,255,255,0.08) 0%, transparent 50%),
    /* base gradient */
    linear-gradient(160deg, var(--pl-purple) 0%, #2a0030 60%, #1a001e 100%);
  color: var(--pl-white);
  padding: 52px 24px 58px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* pitch white line across the bottom of header */
header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  font-weight: 800;
  letter-spacing: -1px;
  position: relative;
  text-transform: uppercase;
}

/* PL-style green bar under heading */
header h1::after {
  content: '';
  display: block;
  width: 64px;
  height: 4px;
  background: var(--pl-green);
  border-radius: 2px;
  margin: 12px auto 0;
}

.tagline {
  color: rgba(255,255,255,0.65);
  margin: 16px 0 0;
  font-size: 0.95em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
}

.tagline::before { content: '\26BD\00A0\00A0'; } /* ⚽ football */
.tagline::after  { content: '\00A0\00A0\26BD'; } /* ⚽ football */

header a { color: var(--pl-green); font-weight: 600; }

/* ── Pitch grass strip ────────────────────────────────── */
main {
  flex: 1;
}

main::before {
  content: '';
  display: block;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--pitch-green)  0px,
    var(--pitch-green)  30px,
    var(--pitch-light)  30px,
    var(--pitch-light)  60px
  );
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  background: var(--pl-purple);
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 20px;
  font-size: 0.85em;
  border-top: 4px solid var(--pitch-green);
}

/* ── Layout ───────────────────────────────────────────── */
.hero {
  max-width: 560px;
  margin: 72px auto;
  text-align: center;
  padding: 0 20px;
}

.hero p {
  font-size: 1.1em;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.fixtures {
  max-width: 740px;
  margin: 48px auto;
  padding: 0 20px;
  text-align: center;
}

/* ── Buttons ──────────────────────────────────────────── */
button {
  background: var(--pl-green);
  color: var(--pl-purple);
  border: none;
  padding: 13px 32px;
  font-size: 1em;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

button:hover {
  background: var(--pl-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,255,133,0.4);
}

button:active { transform: translateY(0); }

#day-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

#day-buttons button {
  background: var(--pl-purple);
  color: var(--pl-white);
  padding: 8px 18px;
  font-size: 0.82em;
  margin-top: 0;
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
}

#day-buttons button:hover {
  background: var(--pl-purple-mid);
  box-shadow: 0 4px 14px rgba(55,0,60,0.35);
}

/* ── Inputs ───────────────────────────────────────────── */
input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s;
}

input:focus {
  outline: none;
  border-color: var(--pl-purple);
  box-shadow: 0 0 0 3px rgba(55,0,60,0.1);
}

/* ── Fixture / match cards ────────────────────────────── */
.fixture {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  font-weight: 600;
  width: 100%;
  box-shadow: var(--shadow);
  transition: box-shadow 0.18s, transform 0.18s;
  position: relative;
  overflow: hidden;
}

/* green top accent bar */
.fixture::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pitch-green), var(--pl-purple), var(--pl-green));
}

.fixture:hover {
  box-shadow: 0 6px 24px rgba(55,0,60,0.14);
  transform: translateY(-2px);
}

.scorer-label {
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

/* score display layout */
.match-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.match-score .score {
  background: var(--pl-purple);
  color: var(--pl-white);
  font-size: 1.1em;
  font-weight: 800;
  padding: 5px 18px;
  border-radius: 6px;
  letter-spacing: 2px;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
}

/* ── Section headings ─────────────────────────────────── */
h2, h3 {
  color: var(--pl-purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* "MATCHWEEK X" badge */
.matchweek-label {
  display: inline-block;
  background: var(--pl-purple);
  color: var(--pl-green);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ── Leaderboard rank badges ──────────────────────────── */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8em;
  font-weight: 700;
  background: var(--pl-purple);
  color: var(--pl-white);
  margin-right: 8px;
  flex-shrink: 0;
}

.rank-badge.gold   { background: #f5c518; color: #1a1a2e; }
.rank-badge.silver { background: #c0c0c0; color: #1a1a2e; }
.rank-badge.bronze { background: #cd7f32; color: #fff; }

/* ── Front-page hero icons ────────────────────────────── */
.hero-icons {
  font-size: 3.2em;
  letter-spacing: 12px;
  margin-bottom: 10px;
  line-height: 1;
}

/* ── Small button variant ─────────────────────────────── */
button.btn-sm {
  padding: 8px 20px;
  font-size: 0.82em;
  margin-top: 10px;
}

/* ── Header nav links (spread row) ───────────────────── */
.header-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.88em;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--pl-green);
  color: var(--pl-green);
  text-decoration: none;
}

/* ── Utility ──────────────────────────────────────────── */
p#create-message,
p#join-message {
  font-size: 0.92em;
  color: var(--text-muted);
  min-height: 1.2em;
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 600px) {
  header {
    padding: 32px 16px 38px;
  }

  header h1 {
    font-size: 1.7em;
    letter-spacing: -0.5px;
  }

  .tagline {
    font-size: 0.78em;
    letter-spacing: 0.2px;
  }

  .hero {
    margin: 48px auto;
    padding: 0 16px;
  }

  .fixtures {
    margin: 32px auto;
    padding: 0 14px;
  }

  button {
    width: 100%;
    padding: 14px 20px;
  }

  #day-buttons button {
    width: auto;
    padding: 8px 14px;
  }

  .fixture {
    padding: 14px 16px;
    font-size: 0.95em;
  }

  .match-score .score {
    font-size: 0.95em;
    padding: 4px 12px;
    min-width: 60px;
  }
}
