:root {
  --primary-color: #2563eb;
  --danger-color: #dc2626;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --border-radius: 16px;
}

/* DARK MODE STYLES */
body.dark-mode {
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-color: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #374151;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header & Dropdown Menu */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.menu-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  min-width: 160px;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.menu-item:active {
  background-color: var(--border-color);
}

/* Buttons */
.btn {
  border: none;
  border-radius: 24px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.btn:active {
  opacity: 0.8;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: 24px;
  margin-top: auto;
}

/* Views */
.view {
  display: none;
  flex-direction: column;
  flex: 1;
}

.view.active {
  display: flex;
}

/* Login Form Styles */
.login-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  margin-top: 40px;
  border: 1px solid var(--border-color);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
  border-radius: 10px;
  font-size: 16px;
}

/* REMEMBER ME STYLES */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.remember-me label {
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

/* FOTO PREVIEW GALLERY */
.preview-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 12px;
}

.preview-thumb {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.preview-thumb .btn-remove-image {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* MODAL FÜR VOLLBILD VORSCHAU */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.image-modal.active {
  display: flex;
}

.image-modal img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 12px;
  object-fit: contain;
}