/* --- THEMA VARIABELEN --- */
:root {
  --font-subtle: 'Inter', sans-serif;
  --font-impact: 'Bangers', cursive;

  /* Centrale kleurenpaletten */
  --palette-dark: #1a252f;
  --palette-light: #ffffff;

  /* Standaardwaarden die door JS overschreven kunnen worden */
  --question-color: var(--palette-dark);
  --weather-color: var(--palette-light);
  --weather-bg: rgba(0, 0, 0, 0.1);
  --disclaimer-color: rgba(255, 255, 255, 0.5);
  --answer-color: #d13d00;
}

.theme-ja {
  --bg-gradient: linear-gradient(
    135deg,
    #fadbd8 0%,
    #e67e22 100%
  ); /* linear-gradient(135deg, #fceabb 0%, #f8b500 100%) */
  --text-question: var(--question-color);
  --text-light: var(--weather-color);
  --text-answer: var(--answer-color);
  --shadow-answer: 4px 4px 0px rgba(255, 255, 255, 0.4);
  --placeholder-border: rgba(255, 255, 255, 0.4);
  --footer-text: var(--disclaimer-color);
  --image-shadow: 0 15px 35px rgba(209, 61, 0, 0.3);
  --btn-text-color: #e67e22; /* #fceabb; */
  --btn-bg-color: #1a252f; /* #fceabb; */
  --modal-text-color: #1a252f;
}

.theme-nee {
  --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  --text-question: #9cb4d8;
  --text-light: rgba(255, 255, 255, 0.8);
  --text-answer: #ffffff;
  --shadow-answer: 4px 4px 0px rgba(0, 0, 0, 0.5);
  --placeholder-border: rgba(255, 255, 255, 0.1);
  --footer-text: rgba(255, 255, 255, 0.5);
  --image-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  --btn-text-color: #1a252f;
  --btn-bg-color: #9cb4d8; /* #fceabb; */
  --modal-text-color: #9cb4d8;
}

.theme-onbekend {
  --bg-gradient: linear-gradient(135deg, #6b7b8c 0%, #3a4a5a 100%);
  --text-question: #cbd5e1;
  --text-light: rgba(255, 255, 255, 0.8);
  --text-answer: #ffffff;
  --shadow-answer: 4px 4px 0px rgba(0, 0, 0, 0.4);
  --placeholder-border: rgba(255, 255, 255, 0.2);
  --footer-text: rgba(255, 255, 255, 0.3);
  --image-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  --btn-text-color: #3a4a5a;
  --btn-bg-color: #cbd5e1; /* #fceabb; */
  --modal-text-color: #cbd5e1;
}

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

body {
  font-family: var(--font-subtle);
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.6s ease;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem 1rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.question {
  color: var(--text-question);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  transition: color 0.6s ease;
}

/* Nieuwe class specifiek voor de hoofdtekst */
.app-title-font {
  font-family: 'Oleo Script', cursive;
  font-size: 1.2em;
  display: inline-block;
  text-shadow:
    1px 1px 1px rgba(0, 0, 0, 0.3),
    1px 2px 2px rgba(255, 255, 255, 0.5);
}

.answer {
  font-family: var(--font-impact);
  color: var(--text-answer);
  font-size: clamp(4rem, 12vw, 8rem);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: 4px;
  text-shadow: var(--shadow-answer);
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease;
}

/* Nieuwe class voor de ondertitel */
.subanswer {
  font-family: var(--font-impact);
  color: var(--text-answer);
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  margin-bottom: 2rem;
  letter-spacing: 2px;
  text-shadow: var(--shadow-answer);
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease;
}

/* --- STYLING VOOR DE DEFINITIEVE AFBEELDING --- */
#app-image {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--image-shadow);
  border: 2px solid var(--placeholder-border);

  opacity: 1;
  transform: scale(1);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    box-shadow 0.6s ease,
    border-color 0.6s ease;
}

#app-image.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

#weather-info {
  margin-top: 1.5rem;
  padding: 0.5rem 1rem;
  background: var(--weather-bg);
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: pre-wrap;
  transition:
    color 0.6s ease,
    background 0.6s ease;
}

.disclaimer {
  width: 100%;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--footer-text);
  opacity: 0.65; /* Bewust wat subtieler gemaakt met vaste transparantie */
  transition:
    color 0.6s ease,
    opacity 0.6s ease;
}

/* --- UI & MENU STYLING --- */
.settings-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-question);
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-btn:hover {
  transform: scale(1.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
  padding: 1rem;
}
.modal.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-content {
  background: var(--bg-gradient);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  color: var(--modal-text-color);
  border: 1px solid var(--placeholder-border);
  text-align: left;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-question);
  cursor: pointer;
}
.modal-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}
.toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  transition: 0.4s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #129e00;
}
input:checked + .slider:before {
  transform: translateX(24px);
}

/* Aangepaste Locatie Input Row */
.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.input-with-clear {
  position: relative;
}
.input-with-clear input {
  width: 100%;
  padding: 0.8rem 2.8rem 0.8rem 0.8rem;
  border: 1px solid var(--placeholder-border);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-question);
  font-size: 1rem;
}
.input-with-clear input::placeholder {
  color: var(--text-question);
  opacity: 0.6;
}
.input-row > button {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 5px;
  background: var(--btn-bg-color);
  color: var(--btn-text-color);
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}
.input-row .input-with-clear .input-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-light);
  font-size: 1.05rem;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  display: none; /* shown dynamically */
  z-index: 5;
}
.text-btn {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 1rem;
  opacity: 0.8;
  display: block;
  width: 100%;
  text-align: left;
}

/* --- DRANKEN SELECTIE GRID & SPEELSE BUTTONS --- */
.section-label {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--modal-text-color);
}

.drinks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 400px) {
  .drinks-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.drink-btn {
  aspect-ratio: 1 / 1;
  width: 100%;
  border: 2px solid var(--placeholder-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-answer);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.drink-btn:hover,
.drink-btn.is-active:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.drink-btn.is-active {
  /*border: 3px solid #ffffff;*/
  box-shadow: 0px 0px 10px rgba(255, 255, 255, 1);
  transform: scale(1.025);
}

.drink-btn.is-active span {
  color: var(--text-answer);
  text-shadow:
    1px 1px 1px rgba(0, 0, 0, 0.3),
    1px 2px 4px rgba(255, 255, 255, 0.8),
    0px 1px 2px rgba(255, 255, 255, 0.5);
}

.drink-btn span {
  font-family: 'Oleo Script', cursive;
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
  transform: rotate(-15deg);
  display: inline-block;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 110%;
  color: #ffffff;
  text-shadow:
    1px 2px 4px rgba(26, 37, 47, 0.8),
    0px 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- ACCENT OP DE DRANKNAAM IN DE VRAAG --- */
.drink-accent {
  font-size: 1.25em;
  color: inherit;
  font-weight: 700;
  /* text-shadow: 0 0 6px rgba(255, 255, 255, 0.35);*/
  text-shadow:
    1px 1px 1px rgba(0, 0, 0, 0.3),
    1px 2px 2px rgba(255, 255, 255, 0.5);
  display: inline-block;
  transition:
    color 0.6s ease,
    text-shadow 0.6s ease;
}
