/* CSS Custom Properties voor consistente theming */
:root {
  --primary-color: #78009d;
  --primary-hover: #9e30bf;
  --secondary-color: #ff6600;
  --secondary-hover: #e55a00;
  --accent-color: #81b61a;
  --text-primary: #222e3b;
  --text-secondary: #666;
  --text-muted: #999;
  --background: #ffffff;
  --surface: #f8f9fa;
  --border: #e9ecef;
  --border-focus: var(--primary-color);
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-small: 4px;
  --transition: all 0.2s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  text-align: center;
  min-height: 100vh;
}

h1 {
  color: var(--text-primary);
  margin: 0 0 24px 0;
  font-size: 28px;
  font-weight: 600;
}

h2 {
  color: var(--text-primary);
  margin: 0 0 20px 0;
  font-size: 22px;
  font-weight: 600;
}

p {
  margin: 12px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Verbeterde input styling */
.input {
  width: 100%;
  padding: 16px;
  margin: 8px 0;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--background);
}

.input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(120, 0, 157, 0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

/* Verbeterde button styling */
.btn {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  border: none;
  padding: 16px 24px;
  width: 100%;
  margin-top: 16px;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--border);
  padding: 16px 24px;
  width: 100%;
  margin: 12px 0;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--border);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

/* Verbeterde logout button */
.logout-btn {
  align-self: flex-start;
  background: none;
  border: none;
  font-size: 16px;
  margin-bottom: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

/* Verbeterde scanner styling */
.scanner {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 24px 0;
  border: 3px solid var(--primary-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}

#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  text-align: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}

#scanhier {
  align-self: center;
  padding-top: 20px;
  font-size: 16px;
  max-width: 320px;
}

/* Logo styling voor login */
img[alt=""] {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 24px;
  border-radius: 12px;
}

/* Footer styling */
.footer {
  margin-top: auto;
  padding: 20px 0 10px 0;
  text-align: center;
  color: #ccc;
  font-size: 12px;
  font-weight: 400;
}

.footer a {
  color: #ccc;
  text-decoration: none;
}

.footer a:hover {
  color: #999;
}

/* Responsive improvements */
@media (max-width: 480px) {
  .screen {
    padding: 20px 16px;
  }

  h1 {
    font-size: 24px;
  }

  .btn,
  .btn-secondary {
    font-size: 16px;
    padding: 14px 20px;
  }

  .input {
    padding: 14px;
  }

  .footer {
    padding: 16px 0 8px 0;
    font-size: 11px;
  }
}
