/* Base CSS */
:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-color: #0f172a;
  --text: #f8fafc;
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Outfit", sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text);
  overflow: hidden;
}

.traveler-body {
  overflow-y: auto;
  padding: 2rem;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  min-height: 100vh;
}

/* Glassmorphism */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Overlays */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Login Card */
.login-card {
  padding: 3rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.login-card h1 {
  margin-bottom: 1rem;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.login-card button {
  width: 100%;
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s;
}

.login-card button:hover {
  background: var(--primary-hover);
}

.error-msg {
  color: #ef4444;
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

/* Maps */
#mapContainer {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Lightbox */
.lightbox-content {
  position: relative;
  padding: 1rem;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #ef4444;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.meta-box {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Traveler Dashboard */
.dashboard {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard h2 {
  margin-bottom: 1rem;
  font-weight: 500;
}

.dashboard hr {
  border-color: var(--glass-border);
  margin: 2rem 0;
}

.subtext {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

/* Toggle Switch */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Upload */
input[type="file"] {
  margin-bottom: 1rem;
}
.dashboard button {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.dashboard button:disabled {
  background: #475569;
  cursor: not-allowed;
}
.feedback-msg {
  margin-top: 1rem;
  font-weight: bold;
}
.feedback-msg.warning {
  color: #eab308;
}
.feedback-msg.success {
  color: #10b981;
}
.feedback-msg.error {
  color: #ef4444;
}
