/* RESET (licht) */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: "Source Sans Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  background: #0f172a; /* donker blauw/grijs */
  color: #f8fafc;
}

/* LAYOUT */
#app,
#live {
  max-width: 420px;
  margin: 0 auto;
  padding: 12px;
}

/* HEADER / STATUSBAR */
.statusbar,
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #020617;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  opacity: 1;
}

/* Default hub (running / break) */
.statusbar {
  padding: 22px 12px 0px;
}

/* Live hub */
.statusbar--live {
  padding: 10px 12px;
}

/* Finished / message */
.statusbar--finished {
  padding: 12px 12px;
}

.statusbar--live .statusbar-inner {
  align-items: center;
}

.statusbar-inner {
  display: flex;
  align-items: baseline;      /* lijn teksten onderling uit */
  width: 100%;
  justify-content: space-between;
}

.statusbar--center .statusbar-inner {
  align-items: center;
}

#clock,
#period {
  font-size: 14px;   /* exact gelijk aan statusbar */
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

header h1 {
  font-size: 1.4rem;   /* wat je nu ook gebruikt */
  line-height: 1;
}

header #status .period-live {
  margin-right: 0.40em;
}

#status {
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 0.35em;
  opacity: 0.85;
}

.statusbar .time {
  font-weight: 600;
}

@keyframes score-breathe {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.score-breathe {
  animation: score-breathe 550ms ease-in-out;
}

.score {
  font-size: 60px;
  font-weight: 700;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25em;
  margin-bottom: 24px;
}

/* SECTIONS */
h2, h3 {
  margin: 12px 0 8px;
  font-size: 16px;
  font-weight: 600;
  opacity: 0.9;
}

.last-events,
.goals-list {
  background: #020617;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  margin-top: 8px;
}

.last-events div,
.goals-list div,
.event {
  font-size: 14px;
  margin: 4px 0;
  opacity: 0.95;
}

/* GOAL GRID */
.goal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

/* BUTTONS */
button,
a.primary {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

/* BUTTON VARIANTS */
button.primary,
a.primary {
  background: #2563eb;
  color: white;
}

button.secondary {
  background: #334155;
  color: #e5e7eb;
}

button.danger {
  background: #dc2626;
  color: white;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary:disabled {
  background: #334155;           /* zelfde knop */
  color: #64748b;                /* dichter bij achtergrond */
}

/* GOAL BUTTONS */
.goal-grid button {
  background: #1e293b;
  color: #f8fafc;
  border-radius: 14px;
  font-size: 15px;
}

/* LINKS */
a {
  text-decoration: none;
}

/* LIVE BLOG */
#events {
  margin-top: 12px;
}

.event {
  background: #020617;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Periode-blok */
.period {
  margin-bottom: 1.5rem;
}

/* Periode-header */
.period-header {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  opacity: 0.8;
  margin-bottom: 6px;
}

.period-header span.live {
  font-weight: normal;
  font-size: 0.85em;
  opacity: 0.6;
}

/* Algemene eventregel */
.event {
  padding-left: 0.5rem;
  margin: 0.15rem 0;
}

/* Goal voor */
.event-goal {
  color: #f8fafc;
}

/* Tegengoal */
.event-goal-against {
  color: #f8fafc;
}

/* Afsluiter van periode */
.period-end {
  margin: 0.3rem 0 0.6rem;
  font-size: 0.75em;
  opacity: 0.4;
}

@keyframes livePulse {
  0% {
    opacity: 0.5;
    transform: scale(0.9);
  }
  50% {
    opacity: 1.2;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

.period-live {
  font-size: 1em;              /* zoals jij al deed */
  color: #FF6A2A;            /* pulse kleur */
  line-height: 1;
  animation: livePulse 1.8s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255, 106, 42, 0.35);
}

.period-note {
  font-size: 0.85em;
  opacity: 0.55;
  margin: 0.3rem 0 0.6rem;
  padding-left: 0.5rem;
}