:root {
  color-scheme: dark;
  background: #10121a;
  color: #e8edf8;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, #2d3a55 0%, #10121a 60%);
}

.container {
  width: min(100%, 980px);
  display: grid;
  gap: 24px;
}

h1,
h2 {
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.7;
  color: #c6d0ff;
}

.card {
  background: rgba(14, 18, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.25);
}

.note ul {
  margin: 0;
  padding-left: 20px;
}

.note li {
  margin-bottom: 10px;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.location-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.right-angle-button {
  border-radius: 8px;
  min-width: 120px;
  padding: 14px 18px;
}

.square-icon-button {
  width: 70px;
  min-width: 70px;
  height: 70px;
  padding: 0;
  border-radius: 18px;
  font-size: 1.5rem;
}

.location-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

#location-input {
  min-width: 0;
}

.square-icon-button.active {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.search-results {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.selected-location {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbe3ff;
  font-size: 0.95rem;
}

.search-result {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.12);
}

#map {
  width: 100%;
  min-height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.map-card {
  margin-top: 18px;
}

#map {
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.map-hint {
  margin: 10px 0 0;
  color: #c1c9ff;
  font-size: 0.95rem;
}

label {
  font-size: 0.9rem;
  color: #a2adff;
}

input,
select,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 16px;
  background: rgba(13, 17, 29, 0.95);
  color: #f8fbff;
  font-size: 1rem;
}

#toggle-map-button {
  background: linear-gradient(135deg, #52c7ff, #4f7bff);
}

#toggle-map-button:hover {
  opacity: 0.94;
}

button {
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #5f7bff, #3bc1ff);
  color: #08102f;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.square-button {
  width: 70px;
  min-width: 70px;
  height: 70px;
  padding: 0;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.hidden {
  display: none;
}

.summary,
.probabilities,
.table-wrapper {
  margin-bottom: 18px;
}

.summary strong,
.probabilities strong {
  display: block;
  margin-bottom: 6px;
  color: #dbe3ff;
}

.probability-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.probability-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
}

.probability-card span {
  display: block;
  font-size: 1.4rem;
  margin-top: 8px;
  font-weight: 700;
}

.verification-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.verification-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}
.verification a {
  color: #7fc1ff;
  text-decoration: underline;
}

.verification a:hover {
  opacity: 0.9;
}
.verification-card.match {
  border-color: #1d8f3c;
  background: rgba(29, 143, 60, 0.08);
}

.verification-card.mismatch {
  border-color: #c42a2a;
  background: rgba(196, 42, 42, 0.08);
}

.verification-card div {
  margin-bottom: 0.35rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 16px;
  overflow: hidden;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
}

th {
  background: rgba(255, 255, 255, 0.05);
  color: #aab8ff;
}

tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.status.sunny-bright {
  background: rgba(255, 210, 50, 0.22);
  color: #ffd84a;
}

.status.sunny {
  background: rgba(255, 189, 32, 0.16);
  color: #ffcf6f;
}

.status.sunny-mostly {
  background: rgba(255, 200, 60, 0.14);
  color: #ffe49a;
}

.status.partly-cloudy {
  background: rgba(255, 220, 100, 0.12);
  color: #ffe08a;
}

.status.mostly-cloudy {
  background: rgba(190, 190, 210, 0.15);
  color: #d0d2e2;
}

.status.cloudy {
  background: rgba(162, 166, 187, 0.16);
  color: #d5d8e7;
}

.status.cloudy-heavy {
  background: rgba(130, 135, 160, 0.2);
  color: #b8bbd0;
}

.status.mist {
  background: rgba(180, 180, 200, 0.14);
  color: #c8c8d8;
}

.status.drizzle-light {
  background: rgba(130, 190, 255, 0.1);
  color: #c0dfff;
}

.status.drizzle {
  background: rgba(100, 170, 255, 0.12);
  color: #b0d4ff;
}

.status.drizzle-heavy {
  background: rgba(80, 150, 240, 0.15);
  color: #a0c8ff;
}

.status.rainy-light {
  background: rgba(90, 160, 255, 0.13);
  color: #a8d0ff;
}

.status.rainy {
  background: rgba(69, 150, 255, 0.16);
  color: #9cccff;
}

.status.rainy-heavy {
  background: rgba(30, 100, 220, 0.2);
  color: #7eb8ff;
}

.status.rainy-extreme {
  background: rgba(20, 70, 190, 0.25);
  color: #6aa8ff;
}

.status.snowy {
  background: rgba(194, 240, 255, 0.18);
  color: #d9f3ff;
}

.status.snowy-heavy {
  background: rgba(170, 220, 250, 0.22);
  color: #c5e8ff;
}

.status.thunder {
  background: rgba(180, 155, 255, 0.16);
  color: #d7caff;
}

.status.thunder-heavy {
  background: rgba(150, 120, 240, 0.22);
  color: #c4b2ff;
}

.status.night {
  background: rgba(40, 50, 80, 0.3);
  color: #8892b0;
}

.status.unknown {
  background: rgba(120, 120, 140, 0.12);
  color: #aaa;
}

.error {
  color: #ff7f7f;
}

.weather-details {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.weather-periods {
  display: grid;
  gap: 4px;
}

.period {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.period-label {
  color: #a2adff;
  font-weight: 600;
  min-width: 70px;
}

.weather-source {
  color: #a2adff;
  font-size: 0.85rem;
}

.source-link {
  color: #7fc1ff;
  text-decoration: underline;
  font-size: 0.9rem;
}

.source-link:hover {
  opacity: 0.9;
}

@media (min-width: 680px) {
  .container {
    gap: 32px;
  }

  form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  form > button {
    grid-column: span 2;
  }
}

.hidden {
  display: none;
}

.weather-cell {
  position: relative;
}

.expand-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #e8edf8;
  cursor: pointer;
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sub-periods {
  margin-left: 20px;
  margin-top: 4px;
}

.sub-period {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 13px;
}

/* Uitgebreide info sectie */
.detail-section {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
}

.detail-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #a2adff;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 6px 12px;
  width: auto;
  transition: background-color 0.15s ease;
}

.detail-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.detail-content {
  margin-top: 10px;
  gap: 12px;
}

.detail-content:not(.hidden) {
  display: grid;
}

.detail-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.detail-header {
  font-weight: 600;
  color: #a2adff;
  font-size: 0.82rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 16px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding: 3px 0;
}

.detail-label {
  color: #8892b0;
}

.detail-item span:last-child {
  color: #e8edf8;
  font-weight: 500;
}

.detail-stations {
  font-size: 0.82rem;
  color: #8892b0;
  line-height: 1.5;
}

.weather-score-card {
  border-width: 2px;
  border-style: solid;
}

.ranking-nr {
  color: #8892b0;
  font-size: 0.75rem;
  margin-right: 2px;
}

/* === Auth & Account === */
.auth-bar {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.lang-selector {
  display: flex;
  align-items: center;
  z-index: 1;
}

.lang-select {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 110px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c6d0ff;
  text-align: center;
  text-align-last: center;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.lang-select:hover,
.lang-select:focus {
  border-color: rgba(95, 123, 255, 0.5);
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.auth-user {
  color: #a2adff;
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: auto;
  z-index: 1;
}

.auth-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: linear-gradient(135deg, #5f7bff, #3bc1ff);
  color: #08102f;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.auth-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c8d0e8;
  font-weight: 500;
}

.auth-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
  opacity: 1;
}

.save-fav-btn {
  margin-top: 10px;
  width: 100%;
}

/* Modal */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal {
  background: #1a1d2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.auth-modal h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: #e8edf8;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #8892b0;
  font-size: 1.2rem;
  cursor: pointer;
}

.auth-modal-close:hover {
  color: #e8edf8;
}

.auth-error {
  color: #ff7f7f;
  font-size: 0.85rem;
  margin: 8px 0;
}

.auth-switch {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #8892b0;
  text-align: center;
}

.auth-switch a {
  color: #a2adff;
  text-decoration: underline;
  cursor: pointer;
}

/* Account panel */
.account-panel {
  max-height: 60vh;
  overflow-y: auto;
}

.panel-section {
  margin-bottom: 20px;
}

.panel-section h3 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: #a2adff;
}

.panel-empty {
  color: #8892b0;
  font-size: 0.85rem;
  font-style: italic;
}

.panel-list {
  display: grid;
  gap: 8px;
}

.panel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.panel-item-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.panel-item-info strong {
  font-size: 0.9rem;
  color: #e8edf8;
}

.panel-item-info span {
  font-size: 0.78rem;
  color: #8892b0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-note-text {
  font-style: italic;
  color: #a0a8c4 !important;
}

.panel-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.panel-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e8edf8;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 4px 8px;
}

.panel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.panel-btn-load {
  color: #a2adff;
  border-color: rgba(162, 173, 255, 0.3);
}

.panel-btn-delete {
  color: #ff7f7f;
  border-color: rgba(255, 127, 127, 0.3);
}

/* Toast */
.wz-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2a2e42;
  color: #e8edf8;
  border: 1px solid rgba(162, 173, 255, 0.3);
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.9rem;
  z-index: 2000;
  animation: toast-in 0.3s ease;
}

.wz-toast-error {
  border-color: rgba(255, 127, 127, 0.4);
  color: #ff7f7f;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Textarea in modal */
.auth-modal textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e8edf8;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

.auth-modal textarea:focus {
  outline: none;
  border-color: #a2adff;
}

/* === Admin Dashboard === */
.admin-dashboard {
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.dash-stat {
  background: rgba(162, 173, 255, 0.08);
  border: 1px solid rgba(162, 173, 255, 0.15);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #a2adff;
  line-height: 1.2;
}

.dash-stat-label {
  font-size: 0.78rem;
  color: #8892b0;
}

.dash-stat-sub {
  font-size: 0.72rem;
  color: #6b7394;
}

.dash-section {
  margin-bottom: 18px;
}

.dash-section h3 {
  font-size: 0.9rem;
  color: #a2adff;
  margin: 0 0 8px;
}

.dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 500px) {
  .dash-row {
    grid-template-columns: 1fr;
  }
}

/* Bar chart */
.dash-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-bottom: 4px;
}

.dash-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.dash-bar-wrap {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dash-bar {
  width: 70%;
  max-width: 30px;
  min-height: 3px;
  background: linear-gradient(180deg, #5f7bff, #3bc1ff);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.dash-bar-label {
  font-size: 0.62rem;
  color: #6b7394;
  white-space: nowrap;
}

.dash-bar-value {
  font-size: 0.68rem;
  color: #8892b0;
  font-weight: 600;
}

/* Dashboard table */
.dash-table {
  display: grid;
  gap: 4px;
}

.dash-table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #c8d0e8;
}

.dash-table-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.dash-table-count {
  color: #a2adff;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 8px;
}

/* === Timeline === */
.timeline-section h2 {
  margin-bottom: 16px;
}

.tl-form {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.tl-form input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edf8;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.tl-form input:focus {
  border-color: rgba(95, 123, 255, 0.5);
}

.tl-submit {
  flex-shrink: 0;
  height: 42px;
  padding: 0 22px;
}

.tl-login-prompt {
  text-align: center;
  color: #6b7394;
  font-size: 0.88rem;
  padding: 10px 0;
  margin-bottom: 12px;
}

#timeline-comments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}

.tl-comment {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 16px;
  transition: background 0.2s;
}

.tl-comment:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tl-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tl-username {
  color: #a2adff;
  font-size: 0.85rem;
}

.tl-time {
  color: #5a6280;
  font-size: 0.75rem;
  margin-left: auto;
}

.tl-delete {
  all: unset;
  cursor: pointer;
  color: #5a6280;
  font-size: 1.1rem;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.tl-delete:hover {
  color: #ff5f5f;
}

.tl-message {
  margin: 0;
  color: #c6d0ff;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-word;
}

.tl-empty {
  text-align: center;
  color: #5a6280;
  font-size: 0.88rem;
  padding: 20px 0;
}

.timeline-load-more {
  margin-top: 14px;
  width: 100%;
}
