:root {
  --bg-light: #f7fafc;
  --bg-dark: #162447;
  --text-light: #222;
  --text-dark: #fff;
  --accent: #fff; /* goud */
  --accent-blue: #222; /* zwart voor knoppen */
  --panel-radius: 0rem;
  --panel-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
  --tijdkleur-light: #222;
  --tijdkleur-dark: #fff;
  --icoon-light: #222;
  --icoon-dark: #fff;
}

html.light {
  --bg: #f7fafc;
  --weather-temp: #222;
  --panel-bg: #fff;
  --panel-text: #222;
  --accent: #fff;
  --accent-blue: #f0f0f0;
  --panel-border: #e0e6ed;
  --list-bg: #f7fafc;
  --list-border: #e0e6ed;
  --active-bg: #fffbe6;
  --tijdkleur: var(--tijdkleur-light);
  --icoon-kleur: var(--icoon-light);
  --card-bg: #ffffff;
  --border-color: #e0e6ed;
  --primary-color: #fff;
  --text-color: #222;
  --text-secondary: #666;
}

html.dark, body.dark {
  --bg: #111;
  --text: #fff;
  --panel-bg: #181818cc;
  --panel-text: #fff;
  --accent: #fff;
  --accent-blue: #222;
  --panel-border: #222;
  --list-bg: rgba(255,255,255,0.04);
  --list-border: #222;
  --active-bg: rgba(234, 179, 8, 0.08);
  --tijdkleur: var(--tijdkleur-dark);
  --icoon-kleur: var(--icoon-dark);
  --card-bg: rgba(255, 255, 255, 0.1);
  --border-color: rgba(255, 255, 255, 0.2);
  --primary-color: #fff;
  --text-color: #fff;
  --text-secondary: #bbb;
}

body, html {
  font-family: 'Lato', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Specifieke styling voor settings pagina */
body.settings-page {
  overflow-y: auto;
  height: auto;
  min-height: 100vh;
}

.app {
  display: flex;
  width: 100%;
  height: 100%;
}

.left {
  flex: 1;
  background: url('/static/moskee.png') center/cover no-repeat;
  position: relative;
}

.overlay {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
  position: relative;
}

.tijdstip {
  margin-bottom: 2rem;
}

.tijdstip #current-time {
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 6rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  color: var(--accent);
  text-shadow: 2px 2px 8px #000;
}

.tijdstip .datum {
  font-size: 1.5rem;
  color: #e0e6ed;
}

.datum-sectie {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gregorian-datum {
  font-size: 1.4rem;
  color: #e0e6ed;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 400;
}

.hijri-datum-arabic {
  font-size: 1.3rem;
  color: var(--accent);
  font-family: 'Cairo', Arial, sans-serif;
  font-weight: 600;
  direction: rtl;
  text-align: left;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hijri-datum-dutch {
  font-size: 1.1rem;
  color: #c0c6d0;
  font-family: 'Lato', Arial, sans-serif;
  font-weight: 300;
  font-style: italic;
}

.huidig-gebed {
  margin-top: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 2;
  padding-bottom: 2rem;
}

.huidig-gebed .naam {
  font-family: 'Cairo', Arial, sans-serif;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

#countdown {
  font-size: 6rem;
  font-weight: bold;
  margin-top: 0.5rem;
  color: #fff;
  text-shadow: 2px 2px 8px #000;
}

.right {
  flex: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--panel-bg);
  color: var(--panel-text);
  border-radius: var(--panel-radius) 0 0 var(--panel-radius);
  box-shadow: var(--panel-shadow);
  min-width: 350px;
  /* max-width: 600px; */
  border: 1px solid var(--panel-border);
  position: relative;
}

#hadith-dua-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

blockquote {
  font-style: italic;
  font-size: 2.4rem;
  background: none;
  border: none;
  margin: 2rem 0 0.5rem 0;
  padding: 0;
  color: var(--text);
  text-align: center;
  font-family: 'Cairo', Arial, sans-serif;
  line-height: 1.3;
}

blockquote footer {
  font-size: 1.3rem;
  color: var(--accent);
  margin-top: 1rem;
  text-align: right;
  font-family: 'Lato', Arial, sans-serif;
}

.gebedstijden {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  border-radius: 1rem;
  background: var(--list-bg);
  box-shadow: 0 2px 8px 0 rgba(31, 64, 104, 0.10);
}

.gebedstijden li {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid var(--list-border);
  font-size: 1.3rem;
  font-family: 'Lato', Arial, sans-serif;
}

.gebedstijden li.active {
  font-weight: bold;
  color: var(--accent);
  background: var(--active-bg);
  border-left: 4px solid var(--accent);
}

.icoontjes {
  display: flex;
  gap: 1.5rem;
  font-size: 1.7rem;
  margin-top: auto;
  opacity: 0.8;
}

#themeToggle {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  z-index: 99;
  color: var(--accent);
  text-shadow: 1px 1px 4px #000;
}

.switch-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.switch-buttons button {
  background: var(--accent-blue);
  color: var(--text);
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 1.2rem 1.2rem 0 0;
  font-size: 1.1rem;
  font-family: 'Cairo', Arial, sans-serif;
  cursor: pointer;
  opacity: 0.8;
  transition: background 0.2s, opacity 0.2s, color 0.2s;
  box-shadow: 0 2px 8px 0 rgba(31, 64, 104, 0.10);
}

.switch-buttons button.active {
  background: var(--accent);
  color: var(--bg);
  opacity: 1;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }
  .right {
    border-radius: var(--panel-radius) var(--panel-radius) 0 0;
    min-width: unset;
    max-width: unset;
    width: 100%;
    padding: 1.2rem;
  }
  .left {
    min-height: 40vh;
  }
}

@media (max-width: 600px) {
  .tijdstip #current-time, #countdown {
    font-size: 2.2rem;
  }
  .huidig-gebed .naam {
    font-size: 1.2rem;
  }
  .right {
    padding: 0.7rem;
  }
  blockquote {
    font-size: 1.2rem;
  }
  
  .gregorian-datum {
    font-size: 1.1rem;
  }
  
  .hijri-datum-arabic {
    font-size: 1rem;
  }
  
  .hijri-datum-dutch {
    font-size: 0.9rem;
  }
}

.right.new-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  background: var(--panel-bg);
  color: var(--panel-text);
  border-radius: var(--panel-radius) 0 0 var(--panel-radius);
  box-shadow: var(--panel-shadow);
  min-width: 350px;
  /* max-width: 600px; */
  border: 1px solid var(--panel-border);
  position: relative;
  padding: 0;
}

.hadith-tijden-row {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
}

.hadith-center {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 2rem 2.5rem 2.5rem;
}

.hadith-center blockquote {
  font-size: 2.2rem;
  text-align: left;
  color: var(--text);
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-family: 'Cairo', Arial, sans-serif;
  line-height: 1.3;
}

.hadith-center blockquote footer {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 1.2rem;
  text-align: left;
  font-family: 'Lato', Arial, sans-serif;
}

.vertical-tijden {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  background: none;
  /* padding: 2.5rem 1.2rem 2.5rem 0; */
  height: 100%;
}

.gebedstijden-verticaal {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem 0;
  width: 100%;
}

.gebedstijden-verticaal li {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0.3rem 0;
  font-size: 1.1rem;
  color: #bbb;
  font-family: 'Lato', Arial, sans-serif;
  transition: color 0.2s, font-weight 0.2s;
}

.gebedstijden-verticaal li.active {
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.gebedstijden-verticaal .naam {
  font-size: 0.95em;
  letter-spacing: 0.05em;
}

.gebedstijden-verticaal .tijd {
  font-size: 0.95em;
  opacity: 0.8;
}

.vertical-icoontjes {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.5rem;
  font-size: 1.6rem;
  opacity: 0.8;
}

@media (max-width: 900px) {
  .hadith-tijden-row {
    flex-direction: column;
  }
  .vertical-tijden {
    flex-direction: row;
    min-width: unset;
    padding: 1.2rem 0 0 0;
    width: 100%;
    justify-content: center;
  }
  .gebedstijden-verticaal {
    flex-direction: row;
    display: flex;
    width: auto;
    margin: 0 1.5rem 0 0;
  }
  .gebedstijden-verticaal li {
    align-items: center;
    padding: 0 0.7rem;
  }
  .vertical-icoontjes {
    flex-direction: row;
    gap: 1.2rem;
    margin-top: 0;
    margin-left: 1rem;
  }
}

.tijden-en-icoontjes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.7rem;
}

.tijden-en-icoontjes li {
  font-size: 1.25rem;
  color: #fff;
  opacity: 0.85;
  font-family: 'Lato', Arial, sans-serif;
  letter-spacing: 0.04em;
  transition: color 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tijden-en-icoontjes .tijd {
  font-size: 1.25rem;
  font-family: 'Lato', Arial, sans-serif;
  color: #fff;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  opacity: 0.85;
}

.tijden-en-icoontjes .icoon-link {
  font-size: 1.35rem;
  color: #fff;
  text-decoration: none;
  background: none;
  border: none;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tijden-en-icoontjes .icoon-link:hover {
  color: var(--accent);
  opacity: 1;
}

.tijden-rij {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  gap: 0.1rem;
}

.tijden-rij .naam {
  font-size: 1.05rem;
  color: var(--tijdkleur) !important;
  font-family: 'Lato', Arial, sans-serif;
  opacity: 0.85;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 0.1rem;
}

.tijden-rij .tijd {
  font-size: 1.15rem;
  color: var(--tijdkleur) !important;
  font-family: 'Lato', Arial, sans-serif;
  opacity: 0.85;
  text-align: center;
}

.icoon-link .material-icons {
  font-size: 1.7rem;
  color: var(--icoon-kleur) !important;
  vertical-align: middle;
  display: inline-block;
  line-height: 1;
  transition: color 0.2s, opacity 0.2s;
}

.icoon-link:hover .material-icons {
  color: #1e7d4d;
}

#themeToggle .material-icons {
  color: var(--icoon-kleur) !important;
  transition: color 0.2s;
}

/* Weer sectie styling */
.weather-section {
  margin-top: auto;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-family: 'Cairo', Arial, sans-serif;
}

.weather-info {
  text-align: left;
}

.weather-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.weather-temp {
  font-size: 2rem;
  font-weight: 700;
  color: var(--tijdkleur);
  font-family: 'Cairo', sans-serif;
  opacity: 0.9;
}

.weather-desc {
  font-size: 1rem;
  color: var(--tijdkleur);
  opacity: 0.7;
  font-family: 'Lato', sans-serif;
  text-transform: capitalize;
}

.weather-details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.8rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.8rem;
}

.weather-detail {
  font-size: 0.9rem;
  color: var(--tijdkleur);
  opacity: 0.7;
  flex: 1;
  text-align: center;
  font-family: 'Lato', sans-serif;
}

/* Responsive aanpassingen voor weer */
@media (max-width: 768px) {
  .weather-section {
    margin-top: 1rem;
    padding: 1rem;
  }
  
  .weather-temp {
    font-size: 1.8rem;
  }
  
  .weather-details {
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* Instellingen pagina styling */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--panel-bg);
  border-radius: var(--panel-radius);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  min-height: auto;
  max-height: 100vh;
  overflow-y: auto;
}

.settings-header {
  margin-bottom: 1.5rem;
}

.settings-header h1 {
  font-family: 'Cairo', sans-serif;
  font-size: 2rem;
  color: var(--primary-color);
  text-align: center;
  margin: 0.5rem 0;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-5px);
}

.back-link .material-icons {
  font-size: 1.2rem;
}

.settings-form {
  width: 100%;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.form-group label .material-icons {
  font-size: 1.3rem;
  color: var(--accent);
}

.form-group input[type="number"],
.form-group input[type="time"],
.form-group select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-group input[type="number"]:focus,
.form-group input[type="time"]:focus,
.form-group select:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.audio-section {
  background: var(--list-bg);
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  height: fit-content;
}

.audio-preview-section {
  background: var(--list-bg);
  padding: 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  height: fit-content;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.audio-row {
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.audio-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.6rem;
}

.preview-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: var(--accent-blue);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.preview-btn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.preview-btn .material-icons {
  font-size: 1.1rem;
}

.checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem;
  background: var(--card-bg);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 40px;
}

.checkbox-item:hover {
  background: var(--active-bg);
  border-color: var(--accent);
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-color);
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-blue);
}

.btn-primary:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--active-bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-primary .material-icons,
.btn-secondary .material-icons {
  font-size: 1.1rem;
}

/* Responsive design voor instellingen */
@media (max-width: 768px) {
  .settings-container {
    margin: 0.5rem;
    padding: 1rem;
    min-height: auto;
    max-height: 100vh;
    overflow-y: auto;
  }

  .settings-header h1 {
    font-size: 1.8rem;
  }

  .settings-section {
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .audio-row {
    margin-bottom: 1rem;
  }

  .audio-section,
  .audio-preview-section {
    padding: 1rem;
  }

  .checkboxes {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}
