* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.container.mobile {
  max-width: 480px;
}

h1 {
  text-align: center;
  margin-bottom: 4px;
}

.subtitle {
  text-align: center;
  color: #94a3b8;
  margin-bottom: 30px;
}

.option-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 700px) {
  .option-cards { grid-template-columns: 1fr; }
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card p {
  color: #94a3b8;
  font-size: 0.9rem;
}

.btn {
  background: #334155;
  color: #e2e8f0;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  margin: 6px 4px;
}

.btn:hover { background: #475569; }

.btn.primary { background: #2563eb; }
.btn.primary:hover { background: #1d4ed8; }

.btn.success { background: #16a34a; }
.btn.success:hover { background: #15803d; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.hidden { display: none !important; }

video, canvas, #previewImg, #resultImage {
  width: 100%;
  max-width: 480px;
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid #334155;
}

#qrImage {
  width: 220px;
  height: 220px;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  margin-top: 14px;
}

.hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-top: 10px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #334155;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 10px auto 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#resultBox {
  margin-top: 30px;
  text-align: center;
  background: #1e293b;
  border: 1px solid #16a34a;
  border-radius: 12px;
  padding: 24px;
}

input[type="file"] {
  width: 100%;
  padding: 10px;
  background: #0f172a;
  border: 1px dashed #475569;
  border-radius: 8px;
  color: #e2e8f0;
}
