/* ==========================================================================
   RONDNEUZEN.NL - GEDEELDE BASISSTIJL (Huisstijl, Navigatie & Game-basis)
   ========================================================================== */

:root {
  --pastel-blue: #cfeaf3;
  --deep-blue: #164354;
  --soft-white: #f8fcfd;
  --accent: #f2b6a0;
  --secondary-text: #356878;
  --success-color: #176b45;
  --success-light: #ccefdc;
  --error-color: #a23737;
  --error-light: #f6d1d1;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../Tekst-Data/OpenDyslexic/OpenDyslexic-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('../Tekst-Data/OpenDyslexic/OpenDyslexic-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:focus-visible,
html.gamepad-active :focus {
  outline: 4px solid var(--deep-blue);
  outline-offset: 4px;
}

html,
body {
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--deep-blue);
  background: var(--pastel-blue);
  font-family: Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ==========================================================================
   Vaste Navigatie & Logo
   ========================================================================== */

.site-logo {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 1;
  width: 58px;
  height: 58px;
  box-sizing: content-box;
  object-fit: cover;
  border: 4px solid rgba(248, 252, 253, 0.9);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(22, 67, 84, 0.12);
}

.games-link {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 2;
  width: 66px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--deep-blue);
  text-decoration: none;
  background: var(--accent);
  border: 2px solid var(--deep-blue);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(22, 67, 84, 0.18);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.games-link img {
  width: 44px;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.games-link:hover {
  background: #f7c7b6;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 12px 28px rgba(22, 67, 84, 0.25);
}

.games-link:active {
  transform: translateY(1px) scale(0.97);
}

.menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.menu-toggle:focus-visible + .menu-button,
html.gamepad-active .menu-toggle:focus + .menu-button {
  outline: 4px solid var(--deep-blue);
  outline-offset: 4px;
}

.menu-button {
  position: fixed;
  top: 105px;
  left: 28px;
  z-index: 5;
  width: 66px;
  height: 66px;
  cursor: pointer;
  background: rgba(248, 252, 253, 0.76);
  border: 1px solid rgba(22, 67, 84, 0.12);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(22, 67, 84, 0.12);
  font-size: 1.8rem;
  color: var(--deep-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease, transform 180ms ease;
  padding: 0;
  line-height: 1;
}

.menu-button::before {
  content: '☰';
  transition: opacity 180ms ease;
}

.menu-toggle:checked + .menu-button::before {
  content: '✕';
}

.menu-button:hover {
  background: var(--soft-white);
  transform: translateY(-2px);
}

.menu-button span {
  display: none;
}

.menu {
  position: fixed;
  top: 171px;
  left: 28px;
  z-index: 2;
  display: grid;
  min-width: 180px;
  padding: 12px;
  background: rgba(248, 252, 253, 0.9);
  border: 1px solid rgba(22, 67, 84, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(22, 67, 84, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.menu a {
  padding: 11px 13px;
  color: var(--deep-blue);
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 9px;
}

.menu a:hover {
  background: var(--pastel-blue);
}

.menu-toggle:checked ~ .menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ==========================================================================
   Algemene Pagina-opbouw (Home, Over mij, Contact, Spelletjes)
   ========================================================================== */

.hero {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(24px, 8vh, 100px) 8vw;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--secondary-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0;
  color: var(--deep-blue);
  font-family: Arial, sans-serif;
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.intro {
  max-width: 430px;
  margin: 28px 0 0;
  color: var(--secondary-text);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
}

.profile-link {
  margin: 24px 0 0;
  text-align: center;
}

.profile-link a {
  color: var(--deep-blue);
  font-weight: 700;
}

.contact-page {
  width: min(100% - 48px, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 88px) 0 clamp(24px, 4vh, 48px);
}

.contact-page h1 {
  margin-bottom: 32px;
  font-size: clamp(3rem, 8vw, 5.5rem);
  text-align: center;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form label {
  margin-top: 12px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px;
  color: var(--deep-blue);
  font: inherit;
  background: rgba(248, 252, 253, 0.8);
  border: 1px solid rgba(22, 67, 84, 0.25);
  border-radius: 8px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  width: fit-content;
  margin-top: 18px;
  padding: 12px 22px;
  color: var(--soft-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
}

.contact-form button:active {
  transform: translateY(-2px) scale(1.10);
}

.games-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 48px, 700px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 64px) 0 clamp(20px, 4vh, 40px);
  text-align: center;
}

.games-page h1 {
  margin-bottom: 36px;
  font-size: clamp(3rem, 8vw, 5.5rem);
}

.games-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.games-menu a {
  padding: 18px 20px;
  color: var(--deep-blue);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(248, 252, 253, 0.8);
  border: 1px solid rgba(22, 67, 84, 0.16);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(22, 67, 84, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.games-menu a:hover {
  background: var(--soft-white);
  transform: translateY(-2px);
}

.games-menu span {
  margin-left: 5px;
}

/* ==========================================================================
   Gedeelde Game-containers, Keuzemenu's, Feedback & Eindscherm
   ========================================================================== */

.math-game,
.memory-game,
.animal-game,
.vakkenspel-game {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100% - 48px, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(16px, 3.5vh, 44px) 0 clamp(12px, 2.5vh, 24px);
  text-align: center;
}

.table-selection,
.player-selection,
.animal-selection,
.memory-setup,
.math-setup {
  padding-top: 0;
}

.table-selection h1,
.player-selection h1,
.animal-selection h1,
.memory-setup h1,
.math-setup h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.15;
  margin-bottom: 24px;
}

.setup-group {
  margin-bottom: 28px;
}

.setup-label {
  margin: 0 0 12px;
  color: var(--secondary-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.table-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.table-options button {
  min-height: 52px;
  padding: 12px 16px;
  color: var(--soft-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
  transition: background 180ms ease, transform 180ms ease;
}

.table-options button:first-child {
  grid-column: 1 / -1;
  color: var(--deep-blue);
  background: rgba(248, 252, 253, 0.9);
  border: 2px solid var(--deep-blue);
}

.table-options button:active {
  background: #245e70;
  transform: translateY(-2px) scale(1.10);
}

.table-options button:first-child:active {
  color: var(--soft-white);
}

.player-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.player-options button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 20px;
  color: var(--soft-white);
  font: inherit;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(22, 67, 84, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.player-options button:active {
  background: #245e70;
  transform: translateY(-2px) scale(1.10);
}

.player-icon {
  margin-bottom: 2px;
  font-size: 2.2rem;
  line-height: 1.2;
}

.player-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.lives-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lives-options button {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 14px 12px;
  color: var(--deep-blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: rgba(248, 252, 253, 0.9);
  border: 2px solid var(--deep-blue);
  border-radius: 8px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.lives-options button.selected {
  color: var(--soft-white);
  background: var(--deep-blue);
  transform: translateY(-2px) scale(1.10);
}

.lives-options button:active {
  color: var(--soft-white);
  background: #245e70;
  transform: translateY(-2px) scale(1.10);
}

.option-icon {
  font-size: 1.35rem;
  line-height: 1.2;
}

.option-title {
  font-size: 0.95rem;
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.avatar-options button {
  display: grid;
  place-items: center;
  padding: 16px 6px;
  font: inherit;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(248, 252, 253, 0.9);
  border: 2px solid var(--deep-blue);
  border-radius: 8px;
  transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.avatar-options button.selected {
  background: var(--deep-blue);
  transform: translateY(-2px) scale(1.10);
}

.avatar-options button:not(:disabled):active {
  background: #245e70;
  transform: translateY(-2px) scale(1.10);
}

.avatar-options button:disabled {
  cursor: default;
  opacity: 0.35;
}

.grid-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.grid-options button {
  padding: 20px 16px;
  color: var(--soft-white);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(22, 67, 84, 0.08);
  transition: background 180ms ease, transform 180ms ease;
}

.grid-options button:active {
  background: #245e70;
  transform: translateY(-2px) scale(1.10);
}

.check-button {
  display: grid;
  width: 54px;
  height: 56px;
  color: var(--soft-white);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(22, 67, 84, 0.2);
  place-items: center;
  transition: background 180ms ease, transform 180ms ease;
}

.check-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.check-button:not(:disabled):hover {
  background: #245e70;
  transform: translateY(-2px);
}

.check-button:not(:disabled):active {
  transform: scale(0.95);
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 16px;
  color: var(--secondary-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-decoration: none;
  transition: color 180ms ease, transform 180ms ease;
}

.back-link:active {
  color: var(--deep-blue);
  transform: translateY(-2px);
}

.answer-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  margin: 24px auto 0;
  padding: 0;
  list-style: none;
}

.answer-progress::before {
  position: absolute;
  top: 50%;
  right: 10px;
  left: 10px;
  z-index: -1;
  height: 3px;
  content: '';
  background: rgba(22, 67, 84, 0.2);
}

.answer-progress li {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  color: var(--deep-blue);
  font-size: 1.05rem;
  line-height: 1;
  background: var(--pastel-blue);
  border: 2px solid rgba(22, 67, 84, 0.35);
  border-radius: 50%;
}

.answer-progress li.correct {
  color: var(--success-color);
  background: var(--success-light);
  border-color: var(--success-color);
}

.answer-progress li.incorrect {
  color: var(--error-color);
  background: var(--error-light);
  border-color: var(--error-color);
}

.game-feedback {
  min-height: 24px;
  margin: 18px 0 0;
  font-weight: 700;
  transition: color 180ms ease;
}

.game-feedback.correct {
  color: var(--success-color);
}

.game-feedback.incorrect {
  color: var(--error-color);
}

.game-result {
  padding: 28px 24px;
  background: rgba(248, 252, 253, 0.8);
  border: 1px solid rgba(22, 67, 84, 0.16);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(22, 67, 84, 0.08);
}

.game-result h2 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.trophy {
  margin: -8px 0 12px;
  font-size: 5rem;
  line-height: 1;
}

.game-result p {
  margin: 0 0 24px;
  font-size: 1.1rem;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.game-result button {
  min-height: 52px;
  padding: 12px 18px;
  color: var(--soft-white);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--deep-blue);
  border: 0;
  border-radius: 8px;
  transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.game-result button:active {
  transform: translateY(-2px) scale(1.10);
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   Responsief & Hover (Basis)
   ========================================================================== */

@media (hover: hover) {
  .table-options button:hover,
  .player-options button:hover,
  .lives-options button:hover,
  .avatar-options button:not(:disabled):hover,
  .grid-options button:hover {
    background: #245e70;
    transform: translateY(-2px) scale(1.10);
  }

  .table-options button:first-child:hover,
  .lives-options button:hover {
    color: var(--soft-white);
  }

  .back-link:hover {
    color: var(--deep-blue);
    transform: translateY(-2px);
  }

  .game-result button:hover,
  .contact-form button:hover {
    transform: translateY(-2px) scale(1.10);
  }
}

@media (max-height: 740px) {
  .math-game,
  .memory-game,
  .animal-game,
  .vakkenspel-game {
    padding: 14px 0 12px;
  }

  .table-selection h1,
  .player-selection h1,
  .animal-selection h1,
  .memory-setup h1,
  .math-setup h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 14px;
  }

  .setup-group {
    margin-bottom: 14px;
  }

  .back-link {
    margin-top: 12px;
  }

  .answer-progress {
    margin-top: 14px;
  }

  .game-feedback {
    margin-top: 10px;
  }
}

@media (max-width: 600px) {
  .games-link {
    top: 18px;
    left: 18px;
    width: 56px;
    height: 56px;
  }

  .games-link img {
    width: 37px;
  }

  .menu-button {
    top: 84px;
    left: 18px;
    width: 56px;
    height: 56px;
    font-size: 1.55rem;
  }

  .site-logo {
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    box-sizing: content-box;
  }

  .menu {
    top: 150px;
    left: 18px;
  }

  .hero {
    padding: 10vh 24px;
  }

  .contact-page,
  .games-page {
    padding-top: 96px;
  }

  .games-menu {
    grid-template-columns: 1fr;
  }

  .math-game,
  .memory-game,
  .animal-game,
  .vakkenspel-game {
    padding: 64px 0 12px;
  }

  .table-selection,
  .player-selection,
  .animal-selection,
  .memory-setup,
  .math-setup {
    padding-top: 0;
  }

  .lives-options {
    gap: 8px;
  }

  .lives-options button {
    padding: 10px 6px;
  }
}
