/*!
 * HedeQuest — Stylesheet
 * © 2026 Hededam · Alle rettigheder forbeholdes
 *
 * Bygget af Hededam. Uautoriseret kopiering eller distribution er ikke tilladt.
 */

@import url('/css/theme.css');

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--rf-bg-1);
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(229, 0, 125, 0.18), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(244, 123, 32, 0.15), transparent 55%),
    linear-gradient(135deg, var(--rf-bg-1) 0%, var(--rf-bg-2) 100%);
  background-attachment: fixed;
  color: var(--rf-text);
  min-height: 100vh;
  padding: 1.5rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 480px;
  margin: 0 auto;
}

.card {
  background: var(--rf-surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rf-border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
}

.label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.player-name {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--rf-primary), var(--rf-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-badge {
  display: inline-block;
  background: var(--rf-primary-soft);
  color: var(--rf-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.points-display {
  text-align: center;
  padding: 0.5rem 0 0.75rem;
}

.points-number {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--rf-primary);
  text-shadow: 0 0 30px var(--rf-primary-glow);
}

.points-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  opacity: 0.55;
  margin-top: 0.25rem;
}

.transactions {
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
}
.transactions > summary {
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  list-style: none;
}
.transactions > summary::-webkit-details-marker { display: none; }
.tx-count { font-size: 0.78rem; font-weight: 400; opacity: 0.7; }
.tx-body { padding: 0 0.5rem 0.7rem 0.5rem; }

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tx {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  font-size: 0.95rem;
}

.tx-reason {
  flex: 1;
  opacity: 0.9;
}

.tx-time {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-top: 0.15rem;
}

.tx-points {
  font-weight: 700;
  color: #2ecc71;
  font-size: 1.05rem;
}

.tx-points.negative { color: #e74c3c; }

.error {
  text-align: center;
  padding: 3rem 1rem;
  color: #e74c3c;
}

.loading {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.6;
}

.empty {
  text-align: center;
  padding: 1.5rem;
  opacity: 0.5;
  font-size: 0.9rem;
  font-style: italic;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--rf-primary);
  color: var(--rf-on-primary);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s;
  text-decoration: none;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--rf-primary-2); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #eee;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }

.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Form inputs */
input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #eee;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 0.75rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--rf-primary);
}

/* Undtag checkbox/radio fra default form-input-stylet (ellers bliver de gigantiske bokse). */
input[type="checkbox"], input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}
input[type="color"] {
  width: auto;
  padding: 0.15rem;
  height: 2.4rem;
}

/* Option-elementer i select-dropdowns arver ikke parent-CSS i de fleste browsere — */
/* eksplicit styling er nødvendig så teksten ikke bliver hvid på hvid baggrund */
select option {
  background-color: #1a1a1a;
  color: #eee;
}

label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

/* Leaderboard */
.lb-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.lb-row.first { background: var(--rf-primary-soft); }
.lb-row.second { background: rgba(189, 195, 199, 0.1); }
.lb-row.third { background: rgba(205, 127, 50, 0.1); }

.lb-rank {
  font-size: 1.5rem;
  font-weight: 800;
  width: 2.5rem;
  text-align: center;
  opacity: 0.7;
}

.lb-row.first .lb-rank { opacity: 1; color: var(--rf-primary); }

.lb-name { font-weight: 600; }
.lb-team { font-size: 0.8rem; opacity: 0.6; }

.lb-points {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--rf-primary);
}

/* Nav */
.nav {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  opacity: 0.5;
}

.nav a {
  color: var(--rf-primary);
  text-decoration: none;
  margin: 0 0.5rem;
}

/* Hededam attribution-footer — diskret men utvetydig */
.hededam-footer {
  display: block;
  width: 100%;
  text-align: center;
  margin: 2rem auto 1.1rem;
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
}

.hededam-footer__text {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--rf-text);
}

.hededam-footer__text strong {
  font-weight: 600;
}
