* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Navigation */
.nav {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 12px 20px;
}

.nav-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.nav-links a {
  color: #4a90d9;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  text-decoration: underline;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.8rem;
}

h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.alert {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0 32px;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.hero-sub {
  color: #666;
  font-size: 1rem;
  margin-bottom: 24px;
}

.hero-cta {
  display: inline-block;
  width: auto;
  padding: 12px 32px;
  text-decoration: none;
}

/* Section title */
.section-title {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

/* Steps */
.steps {
  padding: 24px 0;
  border-top: 1px solid #e0e0e0;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4a90d9;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 8px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.step p {
  color: #666;
  font-size: 0.9rem;
}

/* Create section */
.create-section {
  padding: 24px 0;
  border-top: 1px solid #e0e0e0;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item summary {
  padding: 14px 16px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: #888;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: "-";
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 16px 14px;
  color: #555;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  border-top: 1px solid #ddd;
  padding: 16px 20px;
  margin-top: 32px;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

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

.footer-inner a:hover {
  text-decoration: underline;
}

.footer-links {
  margin-bottom: 4px;
}

.footer-links:last-child {
  margin-bottom: 0;
}

/* Policy pages */
.policy {
  font-size: 0.95rem;
}

.policy-section {
  margin-bottom: 24px;
}

.policy-section h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.policy-section p {
  margin-bottom: 8px;
}

.policy-section ul {
  margin-left: 20px;
  margin-bottom: 8px;
}

.policy-section li {
  margin-bottom: 4px;
}

.policy-date {
  text-align: right;
  color: #888;
  font-size: 0.85rem;
  margin-top: 32px;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
}

.form-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: #4a90d9;
  color: #fff;
  width: 100%;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
  width: 100%;
}

.btn-correct {
  background: #28a745;
  color: #fff;
}

.btn-incorrect {
  background: #6c757d;
  color: #fff;
}

/* Judge buttons */
.judge-buttons {
  display: flex;
  gap: 12px;
}

.judge-buttons form {
  flex: 1;
}

.judge-buttons .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1.1rem;
}

/* Buzzer button */
.buzzer-container {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.buzzer-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  border: 6px solid #a71d2a;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  transition: transform 0.1s, box-shadow 0.1s;
}

.buzzer-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Pressed status */
.pressed-status {
  text-align: center;
  padding: 40px 0;
}

.pressed-message {
  font-size: 2rem;
  color: #28a745;
  font-weight: bold;
}

.pressed-order {
  font-size: 1.2rem;
  margin-top: 8px;
}

/* Results list */
.no-results {
  text-align: center;
  color: #888;
  padding: 20px;
}

.results-list {
  list-style: none;
  padding: 0;
}

.results-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.results-item:first-child {
  border-radius: 8px 8px 0 0;
}

.results-item:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}

.results-item:only-child {
  border-radius: 8px;
}

.results-order {
  font-weight: bold;
  font-size: 1.1rem;
  min-width: 40px;
}

.results-name {
  flex: 1;
  font-size: 1.1rem;
}

.results-time {
  color: #888;
  font-size: 0.85rem;
  font-family: monospace;
}

.results-count {
  text-align: right;
  margin-top: 8px;
  color: #666;
}

/* Admin section */
.admin-section {
  margin-bottom: 24px;
}

.url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.url-row .url-input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.url-row .btn {
  flex-shrink: 0;
  width: auto;
}

.url-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

/* Share buttons */
.share-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-share {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  width: auto;
}

.btn-share--native {
  background: #4a90d9;
  color: #fff;
}

.btn-share--line {
  background: #06c755;
  color: #fff;
}

.btn-share--x {
  background: #000;
  color: #fff;
}

.qr-code {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.qr-code svg {
  width: 300px;
  height: 300px;
}
