/* =============================================================================
   MRR.lol — stylesheet
   Design direction: black/white foundation, strong typography, minimal
   accent color, large numbers, rounded cards, subtle animation. No
   gradients, no stock imagery, no generic corporate SaaS chrome.
   ============================================================================= */

:root {
  --ink: #0a0a0a;
  --ink-soft: #3a3a3a;
  --paper: #ffffff;
  --paper-soft: #fafafa;
  --line: #e6e6e6;
  --accent: #ff5c00;
  --accent-ink: #ffffff;
  --success: #0a7d3c;
  --danger: #c62828;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
  --max-width: 960px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Belt-and-braces: several elements toggled via the `hidden` attribute
   (modal overlay, confirm/submit buttons, error text) also carry a custom
   `display` value elsewhere in this file, which would otherwise win over
   the UA stylesheet's `[hidden] { display:none }` and make them impossible
   to actually hide. This rule always wins. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  font-size: 15px;
}
.btn-primary:hover { background: #222; }
.btn-lg { padding: 16px 28px; font-size: 17px; width: 100%; border-radius: var(--radius-md); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper-soft); }
.btn-x { background: #000; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.logo-dot { color: var(--accent); }
.main-nav { display: none; gap: 24px; font-size: 14px; font-weight: 600; }
.main-nav a { text-decoration: none; opacity: 0.75; }
.main-nav a:hover { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: none; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.user-avatar { width: 22px; height: 22px; border-radius: 50%; }
.inline-form { display: inline; }

@media (min-width: 720px) {
  .main-nav { display: flex; }
  .user-chip { display: inline-flex; }
}

/* --- Banner ---------------------------------------------------------------- */
.banner { margin: 16px auto 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.banner-error { background: #fdeceb; color: var(--danger); }

/* --- Hero ------------------------------------------------------------------ */
.hero { padding: 56px 0 40px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(40px, 10vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 16px;
}
.highlight { color: var(--accent); }
.hero-subtitle {
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 600;
  color: var(--ink);
  max-width: 640px;
  margin: 0 auto 12px;
}
.hero-copy {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 24px;
}

.hero-no-payment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: 999px;
  margin: 0 auto 32px;
}

/* --- Auction card ------------------------------------------------------------ */
.auction-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px 28px;
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}
.card-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.bid-block { margin-bottom: 28px; }
.current-bid {
  font-size: clamp(56px, 14vw, 84px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: transform 0.25s ease;
}
.current-bid.flash { animation: bidFlash 0.6s ease; }
@keyframes bidFlash {
  0% { transform: scale(1); }
  30% { transform: scale(1.08); color: var(--accent); }
  100% { transform: scale(1); }
}
.current-bidder { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; }

.estimate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 14px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.estimate-badge strong { color: var(--ink); }
.estimate-badge svg { color: #b8860b; flex-shrink: 0; }

.countdown-block { margin-bottom: 24px; padding-top: 20px; border-top: 1px dashed var(--line); }
.countdown { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; min-width: 48px; }
.countdown-num {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.countdown-word { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.extend-flash {
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin: 10px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.extend-flash.show { opacity: 1; }

.btn-bid { margin-bottom: 12px; }
.bid-terms { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; }
.bid-stats { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0; }

.paused-banner {
  background: #fff4e5;
  color: #9a5b00;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.auction-state { padding: 12px 0; }
.state-label { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.state-sub { font-size: 15px; color: var(--ink-soft); margin: 0; }
.sold-amount { font-size: clamp(48px, 12vw, 68px); font-weight: 800; margin: 6px 0; letter-spacing: -0.03em; }
.auction-state--draft .state-label { color: var(--ink-soft); }

/* --- Share row --------------------------------------------------------------- */
.share-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.share-label { font-size: 13px; color: var(--ink-soft); }
.share-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.share-btn:hover { background: var(--paper-soft); }

/* --- How it works ------------------------------------------------------------- */
.how-it-works { padding: 56px 0; background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 28px; text-align: center; }
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.steps strong { font-size: 15px; display: block; margin-bottom: 2px; }
.steps p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* --- Bid history --------------------------------------------------------------- */
.bid-history { padding: 56px 0; }
.bid-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.bid-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
.bid-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 12px 18px;
  background: var(--paper-soft);
  border-bottom: 1px solid var(--line);
}
.bid-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.bid-table tr:last-child td { border-bottom: none; }
.bid-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.bid-time { color: var(--ink-soft); white-space: nowrap; }
.empty-row td { text-align: center; color: var(--ink-soft); padding: 28px; }
.bid-row-new { animation: rowIn 0.5s ease; }
@keyframes rowIn { from { background: #fff3ea; } to { background: transparent; } }

/* --- About -------------------------------------------------------------------- */
.about { padding: 56px 0; border-top: 1px solid var(--line); }
.about-inner { max-width: 640px; text-align: center; }
.about-inner p { color: var(--ink-soft); font-size: 15px; }

/* --- FAQ (native <details>/<summary> — accessible, keyboard-friendly, no JS) --- */
.faq { padding: 56px 0 72px; border-top: 1px solid var(--line); }
.faq-inner { max-width: 640px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 20px;
  background: var(--paper);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* --- Footer --------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0 40px; }
.footer-inner { display: flex; gap: 8px; justify-content: center; font-size: 13px; color: var(--ink-soft); }

/* --- Modal ------------------------------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
  padding: 0;
  animation: fadeIn 0.15s ease;
}
.modal-overlay[hidden] { display: none !important; }
@media (min-width: 560px) { .modal-overlay { align-items: center; padding: 20px; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 24px 24px 0 0;
  padding: 32px 24px calc(28px + env(safe-area-inset-bottom));
  position: relative;
  animation: slideUp 0.22s cubic-bezier(0.16,1,0.3,1);
  max-height: 92vh;
  overflow-y: auto;
}
@media (min-width: 560px) { .modal { border-radius: 24px; padding: 32px; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--paper-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
.modal h3 { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.modal-signin p { color: var(--ink-soft); margin: 0 0 22px; font-size: 14px; }

.modal-bid-info { display: flex; justify-content: space-between; margin: 20px 0 24px; padding: 16px; background: var(--paper-soft); border-radius: var(--radius-sm); }
.modal-bid-info > div { display: flex; flex-direction: column; gap: 4px; }
.modal-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.modal-value { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

.bid-input-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.bid-input-row {
  display: flex; align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 4px 4px 16px;
  margin-bottom: 6px;
  transition: border-color 0.15s ease;
}
.bid-input-row:focus-within { border-color: var(--ink); }
.bid-input-prefix { font-size: 20px; font-weight: 700; color: var(--ink-soft); }
#bid-amount-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 22px;
  font-weight: 700;
  padding: 12px 8px;
  font-family: inherit;
  min-width: 0;
}
.bid-input-error { min-height: 18px; font-size: 13px; color: var(--danger); margin: 4px 0 14px; }

.bid-confirm { background: var(--paper-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.modal-note { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin: 14px 0 0; }

/* --- Toast --------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: var(--danger); }

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  display: none;
}

/* --- Reduced motion --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
