:root {
  --accent: #007aff;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --card: #2c2c2e;
    --text: #fff;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.app {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

h1 { text-align: center; margin: 0; }

input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
input:focus { border-color: var(--accent); }

.segmented-control {
  display: flex;
  background: #e5e5ea;
  border-radius: 8px;
  padding: 2px;
}
.segmented-control button {
  flex: 1;
  border: none;
  background: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}
.segmented-control button.active {
  background: var(--card);
}

#qrContainer {
  width: 280px;
  height: 280px;
  align-self: center;
}
#qrContainer canvas,
#qrContainer img {
  width: 100%;
  height: 100%;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
button {
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
}
button.primary {
  background: var(--accent);
  color: white;
}
button.primary:hover { background: #005ecb; }
