* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --mffl-red: #e30613;
  --mffl-purple: #2e146b;
  --mffl-navy: #050922;
  --mffl-bg: #f7f7f7;
  --mffl-card: #ffffff;
  --mffl-border: #e3e3e3;
  --mffl-text: #050922;
  --mffl-muted: #5f6270;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--mffl-bg);
  color: var(--mffl-text);
}

.app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 24px 80px;
}

.hidden {
  display: none;
}

/* HEADER */

.portal-header {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-bottom: 42px;
  background: #ffffff;
}

.portal-logo {
  width: 150px;
  height: auto;
  flex-shrink: 0;
}

.portal-header h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  font-weight: 900;
  color: var(--mffl-navy);
  margin-bottom: 16px;
}

.portal-header p {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.25;
  font-weight: 800;
  color: var(--mffl-navy);
  max-width: 720px;
}

.season {
  display: inline-block;
  margin-top: 18px;
  background: var(--mffl-purple);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
}

/* TEAM GRID */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.team-card {
  background: var(--mffl-card);
  border: 1px solid var(--mffl-border);
  border-radius: 22px;
  padding: 34px 24px 26px;
  min-height: 286px;
  cursor: pointer;
  text-align: center;
  transition: 0.22s ease;
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  background: var(--mffl-purple);
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--mffl-purple);
  box-shadow: 0 16px 35px rgba(46, 20, 107, 0.18);
}

.club-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
  margin: 8px auto 24px;
}

.team-card h2 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--mffl-navy);
  margin-bottom: 18px;
}

.team-card h2::after {
  content: "";
  display: block;
  width: 58px;
  height: 4px;
  background: var(--mffl-purple);
  margin: 18px auto 0;
  border-radius: 999px;
}

.team-card p {
  font-size: 15px;
  font-weight: 900;
  color: var(--mffl-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.team-card p::after {
  content: "  →";
  color: var(--mffl-purple);
  font-weight: 900;
}

/* TEAM PAGE */

.back-button {
  border: 0;
  background: var(--mffl-purple);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  margin-bottom: 24px;
}

.team-header {
  text-align: center;
  background: var(--mffl-purple);
  color: #ffffff;
  padding: 42px 24px;
  margin-bottom: 28px;
  border-radius: 24px;
}

.team-logo {
  width: 132px;
  height: 132px;
  margin: 0 auto 22px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.team-header h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  font-weight: 900;
}

.team-header p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

/* SEARCH */

.player-search {
  width: 100%;
  border: 2px solid var(--mffl-border);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 26px;
  background: #ffffff;
  color: var(--mffl-navy);
}

.player-search:focus {
  outline: none;
  border-color: var(--mffl-purple);
}

/* PLAYER CARDS */

.player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.player-card {
  background: #ffffff;
  border: 1px solid var(--mffl-border);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9px;
  background: var(--mffl-purple);
}

.player-photo{

    width:170px;
    height:170px;

    margin:18px auto 26px;

    border-radius:50%;

    background-size:cover;
    background-position:center;

    border:6px solid var(--mffl-purple);

    background-color:#ececec;

    box-shadow:0 10px 30px rgba(0,0,0,.15);
    overflow:hidden;
}

.player-info h2 {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  color: var(--mffl-navy);
  margin-bottom: 8px;
}

.player-id {
  font-size: 13px;
  color: var(--mffl-muted);
  font-weight: 800;
  margin-bottom: 18px;
}

.player-route {
  background: var(--mffl-purple);
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.player-bmi {
  background: var(--mffl-navy);
  color: #ffffff;
  padding: 12px;
  border-radius: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}

.league-note {
  background: var(--mffl-red);
  color: #ffffff;
  padding: 16px;
  border-radius: 14px;
  text-align: left;
  font-weight: 800;
  margin-top: 16px;
}

.league-note strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* MOBILE */

@media (max-width: 760px) {
  .app {
    padding: 22px 16px 60px;
  }

  .portal-header {
    display: block;
    text-align: center;
  }

  .portal-logo {
    width: 125px;
    margin: 0 auto 24px;
    display: block;
  }

  .portal-header p {
    margin: 0 auto;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card {
    min-height: 240px;
  }

  .club-logo {
    width: 116px;
    height: 116px;
  }

  .player-list {
    grid-template-columns: 1fr;
  }
}