/* Basic mobile-first styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  line-height: 1.5;
  padding-bottom: 2rem;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  color: #2563eb;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #6b7280;
  font-size: 0.95rem;
}

.mode-selector {
  margin-bottom: 1.5rem;
}

.mode-selector h2 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.modes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mode-btn {
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.mode-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-section input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.form-section input:focus {
  outline: none;
  border-color: #2563eb;
}

.hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.primary-btn {
  width: 100%;
  padding: 1rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
}

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

.btn-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  text-align: center;
}

.status.success {
  background: #d1fae5;
  color: #065f46;
}

.status.error {
  background: #fee2e2;
  color: #991b1b;
}

.info {
  margin-top: 2rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.info h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.info ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.info li {
  margin-bottom: 0.35rem;
}

.note {
  font-size: 0.85rem;
  color: #6b7280;
}

.hidden {
  display: none !important;
}

/* Receiver / Silent pages */
.receiver-page, .silent-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.receiver-page h1, .silent-page h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.receiver-page p, .silent-page p {
  color: #6b7280;
  margin-bottom: 1rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

.result-box {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 400px;
  text-align: left;
  font-family: monospace;
  font-size: 0.85rem;
  overflow-wrap: break-word;
}

.error-box {
  background: #fee2e2;
  color: #991b1b;
}

.success-box {
  background: #d1fae5;
  color: #065f46;
}
