/* Reset en basis styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Black Han Sans', sans-serif;
  background-color: #393939;
  background-image: url('../img/canabis_icon.svg');
  background-repeat: repeat;
  background-size: 100px;
  background-position: center;
  opacity: 1;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding-top: 0;
  gap: 40px;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #393939;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

/* Mobile section */
.mobile-section {
  width: 100%;
  height: 100%;
  display: contents;
}

/* Header container */
.header-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 80px;
}

/* Main container */
.main-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 1400px;
  /* padding: 20px; */
  position: relative;
  z-index: 1;
}

/* Header met logo */
header {
  width: 100%;
  max-width: 1400px;
  text-align: center;
}

.logo {
  max-width: 100%;
  width: 100%;
  height: auto;
  background-color: #414141;
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* Main content */
main {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Schermen (states) */
.screen {
  display: none;
  width: 100%;
  animation: fadeIn 0.3s ease-in;
}

.screen.active {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card (centrale element met schaduw) */
.card {
  background-color: #414141;
  border-radius: 8px;
  padding: 60px 80px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
  width: 100%;
  max-width: 750px;
  position: relative;
}

/* Startscherm */
.title {
  font-size: 48px;
  color: #00AE00;
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  font-family: 'Black Han Sans', sans-serif;
  background-color: #525252;
  color: #00AE00;
  border: none;
  padding: 18px 50px;
  font-size: 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.btn-primary:hover,
.btn-secondary:hover {
  background-color: #5f5f5f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-primary:active,
.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Vraagscherm */
.letter {
  font-size: 72px;
  color: #ffffff;
  margin-bottom: 30px;
  font-weight: bold;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.letter.hidden {
  display: none;
}

.question {
  font-size: 36px;
  color: #cfcfcf;
  margin-bottom: 30px;
  line-height: 1.4;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer {
  margin-bottom: 30px;
  font-size: 42px;
  color: #888888;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.timer.warning {
  color: #ff0000;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Tijd is om scherm */
.card.time-up {
  padding: 50px 80px;
}

.time-up-image {
  max-width: 150px;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  display: none;
}

.time-up-image.visible {
  display: block;
  margin: 0 auto 20px auto;
}

.time-up-text {
  font-size: 56px;
  color: #ff0000;
  margin-bottom: 40px;
  letter-spacing: 2px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

/* Settings button (rechtsonder) */
.settings-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #525252;
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.settings-btn:hover {
  background-color: #5f5f5f;
  transform: rotate(90deg) scale(1.1);
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1001;
}

.overlay.active {
  display: block;
}

/* Settings popup */
.settings-popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #414141;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  z-index: 1002;
  min-width: 400px;
  transition: opacity 0.3s ease;
  opacity: 1;
}

.settings-popup.transparent {
  opacity: 0.3;
}

.settings-popup.active {
  display: block;
}

.settings-popup h3 {
  font-size: 32px;
  color: #00AE00;
  margin-bottom: 30px;
  text-align: center;
}

.close-settings {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #00AE00;
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
  line-height: 1;
}

.close-settings:hover {
  color: #00ff00;
  transform: rotate(90deg);
}

.setting-item {
  margin-bottom: 10px;
}

.setting-item label {
  font-size: 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.setting-item input[type="checkbox"] {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.settings-popup .btn-primary,
.settings-popup .btn-secondary {
  width: 100%;
  margin-top: 0;
  margin-bottom: 10px;
  padding: 18px 40px;
  font-size: 18px;
}

.link-suggestions {
  display: block;
  width: 100%;
  margin-top: 0;
  margin-bottom: 10px;
  padding: 18px 40px;
  background-color: #525252;
  color: #00AE00;
  text-decoration: none;
  font-size: 18px;
  border-radius: 5px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-family: 'Black Han Sans', sans-serif;
  letter-spacing: 1px;
}

.link-suggestions:hover {
  background-color: #5f5f5f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.link-suggestions:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Dark mode (standaard aan) */
body.dark-mode {
  background-color: #393939;
}

/* Light mode */
body:not(.dark-mode) {
  background-color: #e0e0e0;
}

body:not(.dark-mode)::before {
  background-color: #ffffff;
}

body:not(.dark-mode) .card {
  background-color: #f5f5f5;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

body:not(.dark-mode) .settings-popup {
  background-color: #f5f5f5;
}

body:not(.dark-mode) .settings-btn {
  background-color: #d0d0d0;
}

body:not(.dark-mode) .btn-primary,
body:not(.dark-mode) .btn-secondary {
  background-color: #d0d0d0;
}

body:not(.dark-mode) .link-suggestions {
  background-color: #d0d0d0;
}

body:not(.dark-mode) .logo {
  background-color: #f5f5f5;
}

body:not(.dark-mode) .question {
  color: #000000;
}

body:not(.dark-mode) .setting-item label {
  color: #000000;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding-top: 30px;
    justify-content: flex-start;
    height: auto;
    overflow: auto;
  }

  .mobile-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    position: relative;
  }

  .header-container,
  .main-container {
    padding: 0 15px;
  }

  .main-container {
    margin-top: 80px;
    padding-bottom: 15px;
    flex: 1;
    display: flex;
    align-items: center;
  }

  .logo {
    max-width: 100%;
    padding: 20px 30px;
    font-size: 1.3em;
  }

  .card {
    padding: 40px 25px;
    max-width: 100%;
  }

  .letter {
    font-size: 48px;
    margin-bottom: 25px;
  }

  .question {
    font-size: 18px;
    min-height: auto;
    margin-bottom: 25px;
  }

  .timer {
    font-size: 34px;
    margin-bottom: 25px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 20px;
    padding: 15px 40px;
  }

  .settings-popup {
    min-width: 90%;
    max-width: 90%;
    padding: 30px 20px;
  }

  .settings-btn {
    width: 60px;
    height: 60px;
    font-size: 28px;
    bottom: 20px;
    right: 20px;
  }

  /* Verwijder hover animaties op mobiel */
  .btn-primary:hover,
  .btn-secondary:hover,
  .link-suggestions:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .settings-btn:hover {
    transform: none;
  }

  .close-settings:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 20px;
    justify-content: flex-start;
    height: auto;
    overflow: auto;
  }

  .mobile-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    position: relative;
  }

  .main-container {
    margin-top: 80px;
    flex: 1;
    display: flex;
    align-items: center;
  }

  .logo {
    padding: 15px 20px;
    font-size: 1.2em;
  }

  .card {
    padding: 30px 20px;
  }

  .letter {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .question {
    font-size: 14px;
    margin-bottom: 15px;
  }

  .timer {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .time-up-image.visible {
    max-width: 120px;
    margin-bottom: 15px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 18px;
    padding: 12px 30px;
  }

  .settings-btn {
    width: 55px;
    height: 55px;
    font-size: 26px;
    bottom: 15px;
    right: 15px;
  }

  .settings-popup {
    padding: 25px 15px;
  }

  .settings-popup h3 {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .setting-item {
    margin-bottom: 15px;
  }

  .setting-item label {
    font-size: 16px;
  }
}
