:root {
  --black: #000000;
  --blue: #0163AD;
  --gold: #D2CC9B;
  --bg-color: #000000;
  --text-color: #FFFFFF;
  --highlight-blue: #3399FF;
  --highlight-gold: #D2CC9B;
}

/* Extend background color into iOS safe areas, prevent white gaps */
html,
body {
  background-color: var(--black);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  margin: 0;
  height: 100%;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
    "Open Sans", "Helvetica Neue", sans-serif;
  background: repeating-linear-gradient(
    90deg,
    #000000,
    #000000 70px,
    #d2cc9b 70px,
    #d2cc9b 76px,
    #0163ad 76px,
    #0163ad 146px,
    #d2cc9b 146px,
    #d2cc9b 152px
  );
  color: var(--text-color);
  padding-left: 15px;
  padding-right: 15px;
  min-height: 100vh;
}

header {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  background: var(--black);
  border-bottom: 3px solid var(--gold);
  display: flex;
  justify-content: center;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: 20px;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
  z-index: 10;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  text-decoration: underline;
  font-size: 1.5rem;
}

.instagram-logo {
  width: 24px;
  height: 24px;
}

.fixtures-title {
  color: var(--highlight-gold);
  text-align: center;
  margin: 20px auto;
  font-weight: 700;
  background-color: #111;
  box-shadow: 0 0 10px var(--blue), 0 0 15px var(--gold);
  border: 2px solid var(--blue);
  border-radius: 16px;
  padding: 20px;
  max-width: 550px;
}

.match-box {
  background-color: #111;
  box-shadow: 0 0 10px var(--blue), 0 0 15px var(--gold);
  border: 2px solid var(--blue);
  border-radius: 16px;
  padding: 28px 20px 18px 20px;
  margin: 22px auto;
  max-width: 550px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown {
  color: var(--highlight-gold);
  font-weight: 600;
  font-size: 1.01rem;
  margin-bottom: 18px;
  font-style: italic;
  text-shadow: 0 0 4px var(--gold);
  white-space: pre-line;
  text-align: center;
  width: 100%;
}

.match-info {
  width: 100%;
  text-align: center;
  margin-top: 18px;
}

.match-date {
  font-size: 0.91rem;
  color: var(--gold);
  font-weight: 600;
}

.result-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 42px;
  margin-top: 15px;
  margin-bottom: 12px;
  width: 100%;
}

.result-team-img {
  max-width: 65px;
  max-height: 65px;
  border-radius: 10px;
  border: 2px solid var(--blue);
  background-color: var(--black);
  padding: 3px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.team-name {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-weight: 600;
  font-size: 1.03rem;
  text-align: center;
  user-select: none;
  min-width: 90px;
}

.result-final {
  color: var(--highlight-gold);
  font-weight: 700;
  font-size: 1.27rem;
  text-shadow: 0 0 4px var(--gold);
  text-align: center;
  min-width: 50px;
}

.competition {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  gap: 12px;
}

.competition-text {
  font-weight: 700;
  color: var(--highlight-gold);
  margin-bottom: 8px;
  font-size: 1.17rem;
  text-align: center;
  text-shadow: 0 0 6px var(--gold);
}

.competition-logo {
  height: 62px;
  filter: drop-shadow(0 0 2px var(--gold));
}

.match-info > div {
  margin: 8px 0;
  font-weight: 500;
}

.status {
  font-weight: 700;
  margin-top: 10px;
  color: var(--highlight-gold);
  font-size: 1.1rem;
  text-shadow: 0 0 6px var(--gold);
}

.match-info .countdown {
  color: var(--highlight-gold);
  font-weight: 600;
  font-size: 1.01rem;
  margin-top: 6px;
  margin-bottom: 18px;
  font-style: italic;
  text-shadow: 0 0 4px var(--gold);
  white-space: pre-line;
}

@media (min-width: 780px) {
  .match-box {
    max-width: 600px;
  }
  .competition-logo {
    height: 110px;
  }
  .fixtures-title {
    max-width: 600px;
  }
  .countdown {
    font-size: 1.5rem !important;
  }
  .result-final {
    font-size: 1.5rem;
  }
  .match-date {
    font-size: 1.145rem;
  }
  .result-team-img {
    max-width: 130px;
    max-height: 130px;
  }
  .team-name {
    font-size: 1.22rem;
    min-width: 130px;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  header {
    padding: calc(15px + env(safe-area-inset-top)) 10px 15px 10px;
  }
  .instagram-link {
    font-size: 1.2rem;
  }
  .fixtures-title {
    font-size: 1.15rem;
    color: var(--highlight-gold);
  }
  .match-box {
    padding: 16px 2px 12px 2px;
    max-width: 99vw;
  }
  .competition-logo {
    height: 76px;
  }
  .result-team-img {
    max-width: 70px;
    max-height: 70px;
  }
  .result-final {
    font-size: 1.12rem;
  }
  .team-name {
    font-size: 0.97rem;
    min-width: 70px;
  }
}
