/* ==========================================================
   Fritidshack – stylesheet
   Style: neon cyan + magenta, bold italic, angled shapes.
   All colors and sizes live in :root so they are easy to change.
   ========================================================== */

:root {
  /* Colors */
  --bg: #0e0a24;            /* deep purple-black background */
  --bg-raised: #1a1440;     /* cards and panels */
  --cyan: #5ef0ff;
  --magenta: #ff3fb4;
  --yellow: #ffe94d;
  --text: #eaf6ff;
  --text-muted: #9fb0d6;

  /* Fonts */
  --font-display: "Exo 2", system-ui, sans-serif;
  --font-body: "Exo 2", system-ui, sans-serif;

  /* Layout */
  --page-width: 1100px;
  --gutter: 1.25rem;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  /* Soft colored glows in the corners */
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(255, 63, 180, 0.18), transparent),
    radial-gradient(60rem 30rem at 10% 10%, rgba(94, 240, 255, 0.14), transparent);
  background-repeat: no-repeat;
}

a {
  color: var(--cyan);
}

/* Make the "hidden" attribute win over our own display rules */
[hidden] {
  display: none !important;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

.brand {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cyan);
}

.site-header nav a {
  margin-left: 1.25rem;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.site-header nav a:hover {
  color: var(--magenta);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 6rem var(--gutter) 5rem;
}

/* Big title: magenta on top fading into cyan, with a neon glow */
.title-glow {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(2.5rem, 11vw, 7rem);
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(to bottom, var(--magenta) 40%, var(--cyan) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(94, 240, 255, 0.55));
}

.tagline {
  margin: 1rem 0 2rem;
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* ---------- Button (angled corners via clip-path) ---------- */

.button {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: linear-gradient(135deg, var(--magenta), var(--cyan));
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: filter 0.2s;
}

.button:hover {
  filter: brightness(1.15) drop-shadow(0 0 8px var(--cyan));
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 3rem var(--gutter);
}

.section-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(94, 240, 255, 0.5);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 14px rgba(94, 240, 255, 0.3);
  clip-path: polygon(16px 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--magenta);
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2rem var(--gutter);
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid rgba(94, 240, 255, 0.2);
}

/* ---------- Player box ---------- */

.player-box {
  margin-top: 2rem;
  color: var(--text-muted);
}

.player-box strong {
  color: var(--magenta);
}

.link-button {
  margin-left: 0.5rem;
  padding: 0;
  font: inherit;
  color: var(--cyan);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Small button + logo card + scoreboard ---------- */

.button-small {
  margin-top: 1rem;
  padding: 0.5rem 1.4rem;
}

.card-logo {
  /* The logo has its own angled neon look, so no clipped corners here. */
  clip-path: none;
}

.card-logo img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

/* Highscore table: three clearly separated columns (rank, player, score) */
.scoreboard {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.scoreboard th {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  color: var(--text-muted);
  border-bottom: 2px solid var(--cyan);
}

.scoreboard td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(94, 240, 255, 0.15);
}

.scoreboard .col-rank {
  width: 3rem;
  color: var(--text-muted);
}

/* The score is on the right, big and magenta, so it is never mixed up
   with the number at the end of a player name. */
.scoreboard th.col-score,
.scoreboard td.col-score {
  text-align: right;
}

.scoreboard td.col-score {
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 900;
  color: var(--magenta);
}

.scoreboard .me td {
  background: rgba(255, 233, 77, 0.12);
}

.scoreboard .me .col-name {
  color: var(--yellow);
  font-weight: 800;
}
