/* Landing page styles.
 *
 * Lives at /, has no game state. Two big buttons + a hidden file input
 * for the custom-deck flow. Designed for both phone and laptop; the
 * actions stack vertically on narrow screens, side-by-side on wider.
 */

.landing {
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.landing h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
}

.landing .subtitle {
  color: var(--text-dim);
  margin: 0;
  font-size: 15px;
}

.landing .actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.1s, transform 0.05s;
}

.action-btn:active {
  transform: scale(0.99);
}

.action-btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.action-btn.primary:active {
  opacity: 0.9;
}

.action-btn .hint {
  font-size: 12px;
  font-weight: 400;
  color: inherit;
  opacity: 0.7;
}

.error {
  color: #d33;
  font-size: 14px;
  margin: 0;
}

.error.hidden {
  display: none;
}

/* ---- Upload row + format-help button ----------------------------------- */

.upload-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.upload-row .action-btn {
  flex: 1;
}

.format-help-btn {
  flex: 0 0 auto;
  width: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.format-help-btn:active {
  opacity: 0.85;
}

/* ---- Format help modal ------------------------------------------------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px;
  max-width: 320px; width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.modal.modal-wide { max-width: 560px; }

.modal-title { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.modal-text { font-size: 14px; color: var(--text-dim); margin: 0 0 14px; line-height: 1.5; }
.modal-text code {
  font-family: ui-monospace, "SF Mono", monospace;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
  color: var(--text);
}

.format-example {
  margin: 0 0 14px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}

.modal-actions { display: flex; gap: 8px; }
.modal-actions button {
  flex: 1; padding: 12px; border-radius: 10px; border: none;
  font-size: 16px; font-weight: 500; cursor: pointer;
}
.btn-confirm {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-confirm:active { opacity: 0.85; }
