/* Rent A Hater — Edgy, confident, creative (inherently funny concept, design that matches) */
:root {
  --accent: #ff3366;
  --accent-hover: #ff4d7a;
  --accent-dim: rgba(255, 51, 102, 0.15);
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-elevated: #1c1c1f;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-text: #f87171;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-text: #4ade80;
  --touch-min: 44px;
  --radius: 6px;
  --radius-sm: 4px;
  --container-max: 1100px;
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  padding-bottom: 3rem;
}

h1, h2, h3, .font-display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }
h1 { letter-spacing: 0.03em; }

/* Top bar — dark, sharp, accent CTA */
nav {
  background: var(--surface);
  color: var(--text);
  padding: 0 1.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  min-height: var(--touch-min);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
nav a:hover { background: var(--surface-elevated); color: var(--text); text-decoration: none; }
nav .logo-link {
  padding: 0.5rem 0;
  margin-right: auto;
}
nav .nav-logo { height: 32px; width: auto; display: block; filter: brightness(1.05); }
@media (min-width: 768px) { nav .nav-logo { height: 36px; } }
nav .nav-cta {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
nav .nav-cta:hover { background: var(--accent-hover); color: #fff; }
nav span {
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}

/* Main content — centered container */
main {
  padding: 1.5rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  max-width: var(--container-max);
  margin: 0 auto;
}
@media (min-width: 640px) {
  main { padding: 2rem 1.5rem 3rem; }
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 0 auto 1.25rem;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
}
.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-success { background: var(--success-bg); color: var(--success-text); }

/* Buttons — RAC red primary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 0 20px var(--accent-dim); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-dim); color: var(--accent); }

/* Forms — dark inputs, elevated surface */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 560px;
}
form label { display: block; margin-top: 1.25rem; font-weight: 600; font-size: 0.9375rem; color: var(--text); }
form label:first-of-type { margin-top: 0; }
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  min-height: 48px;
  margin-top: 0.35rem;
}
form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
form textarea { min-height: 120px; resize: vertical; }
form input[type="date"] { min-height: 48px; }
form input[type="file"] { padding: 0.5rem 0; min-height: auto; border: none; }
form .error { color: var(--error-text); font-size: 0.875rem; margin-top: 0.25rem; }
.form-hint { display: block; font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
form button[type="submit"],
input[type="submit"],
.btn-submit {
  margin-top: 1.5rem;
  min-height: var(--touch-min);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}
form button[type="submit"]:hover,
input[type="submit"]:hover { background: var(--accent-hover); color: #fff; }
@media (min-width: 640px) {
  form input[type="text"],
  form input[type="email"],
  form input[type="password"],
  form textarea { max-width: 100%; }
}

/* Links */
a { color: var(--accent); font-weight: 500; }
a:hover { text-decoration: underline; }
.admin-bypass-link { font-size: 0.9375rem; }

/* Headings — display font, clear hierarchy */
h1, h2, h3 { margin-top: 0; font-weight: 400; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* Landing — hero with banner image, bold display type */
body.landing { padding-bottom: 0; }
body.landing main { padding: 0; max-width: none; }
.landing-hero {
  position: relative;
  min-height: 380px;
  background: var(--bg) url(/banner.jpg) center center no-repeat;
  background-size: cover;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0.7) 0%, rgba(10,10,11,0.85) 100%);
}
.landing-hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem 4rem;
  max-width: 640px;
}
.landing-headline {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.1;
  text-transform: uppercase;
}
.landing-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: rgba(255,255,255,0.95);
}
.landing-teaser {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin: 0 0 2rem;
}
.landing-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.landing-ctas .btn {
  min-width: 220px;
  justify-content: center;
}
.landing-ctas .btn-primary {
  background: var(--accent);
  color: #fff;
}
.landing-ctas .btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 0 24px var(--accent-dim); }
.landing-ctas .btn-secondary {
  color: #fff;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.6);
}
.landing-ctas .btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }
@media (min-width: 640px) {
  .landing-hero { min-height: 440px; }
  .landing-hero-content { padding: 4rem 2rem 5rem; }
  .landing-headline { font-size: 3.25rem; }
  .landing-tagline { font-size: 1.5rem; }
  .landing-ctas { flex-direction: row; justify-content: center; gap: 1rem; }
  .landing-ctas .btn { width: auto; min-width: 200px; }
}

/* Marquee — thin strip of scrolling listing cards above steps */
.landing-marquee {
  overflow: hidden;
  padding: 0.75rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-height: 100px;
  display: flex;
  align-items: center;
}
.landing-marquee-track {
  display: flex;
  gap: 1rem;
  animation: landing-marquee-scroll 45s linear infinite;
  width: max-content;
}
.landing-marquee-track:hover { animation-play-state: paused; }
.landing-marquee-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-width: 200px;
  max-width: 260px;
  height: 60px;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, color 0.2s;
}
.landing-marquee-card:hover { color: var(--accent); border-color: var(--accent); }
.landing-marquee-desc {
  font-size: 0.8125rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.landing-marquee-price {
  font-size: 0.875rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--accent);
}
@keyframes landing-marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.333%); }
}

/* Steps — dark band, accent-highlight text */
.landing-steps {
  background: var(--surface);
  border-top: 2px solid var(--accent);
  padding: 2.5rem 1.5rem;
}
.landing-steps-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}
.landing-step {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}
.landing-step:last-child { margin-bottom: 0; }
@media (min-width: 640px) {
  .landing-steps { padding: 3rem 1.5rem; }
  .landing-step { font-size: 1.25rem; margin: 0 0 1rem; }
}

/* Page headers */
.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}
.page-header h1 { margin-bottom: 0.35rem; }
.page-header p { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }

/* Cards / listing feed — RAC-style product cards */
.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-list li:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card-list li a { text-decoration: none; color: var(--text); }
.card-list li a:hover { text-decoration: underline; color: var(--accent); }
.card-list .card-title { font-weight: 700; font-size: 1.125rem; }
.card-list .card-meta { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.35rem; }
.card-list .card-desc { color: var(--text); margin: 0.5rem 0 0; font-size: 0.9375rem; line-height: 1.5; }

/* Listing detail */
.listing-detail {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.listing-detail .listing-meta { color: var(--text-muted); font-size: 0.9375rem; margin: 0.25rem 0 1rem; }
.listing-detail .listing-body { margin-bottom: 1.5rem; line-height: 1.6; }
.listing-actions { margin-top: 1.5rem; }
.listing-actions a, .listing-actions .btn { margin-right: 0.75rem; margin-bottom: 0.5rem; }

/* Auth pages */
.auth-page {
  max-width: 420px;
  margin: 0 auto;
  padding-top: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2rem;
}
.auth-page h1 { margin-bottom: 1rem; }
.auth-page .auth-swap { margin-top: 1.5rem; text-align: center; font-size: 0.9375rem; color: var(--text-muted); }
.auth-page .auth-swap a { font-weight: 600; }

/* Dashboard */
.dash-actions { margin: 1rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dash-actions a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.dash-actions a:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

/* Reputation section */
.reputation-section { margin-bottom: 2rem; }
.reputation-section h2 { margin-bottom: 1rem; }
.reputation-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .reputation-grid { grid-template-columns: 1fr 1fr; } }
.reputation-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
}
.reputation-card h3 { margin-top: 0; font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.reputation-card p { margin: 0.35rem 0; font-size: 0.9375rem; }

/* Feed guest prompt */
.feed-guest-prompt {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.feed-guest-prompt p { margin: 0 0 0.75rem; font-size: 0.9375rem; color: var(--text); }
.feed-guest-prompt .btn { margin: 0 0.25rem 0.25rem 0; }

/* Amounts (create listing) */
.amounts { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0.35rem 0 0; }
.amounts label, .amount-option {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  font-weight: 500;
}
.amounts input, .amount-option input { width: auto; margin: 0 0.5rem 0 0; min-height: auto; }

/* Stripe element */
#card-element {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.5rem 0 1rem;
  max-width: 100%;
  background: var(--bg);
  color: var(--text);
}
#card-errors { margin-bottom: 0.5rem; }

/* Applicants / submission blocks */
.applicant-card, .submission-block {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.applicant-card form { margin-top: 0.75rem; }
.applicant-card .btn, .submission-block .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }
.revision-notice { background: rgba(251, 191, 36, 0.12); border-left: 4px solid #eab308; color: var(--text); padding: 0.75rem 1rem; margin: 0.5rem 0; border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.9375rem; }
.muted { color: var(--text-muted); font-size: 0.875rem; }

/* Back link */
.back-link { display: inline-block; margin-top: 1.5rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.back-link:hover { color: var(--accent-hover); }

/* Checkbox label */
form label.checkbox-label { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0.75rem; cursor: pointer; font-weight: 500; }
form label.checkbox-label input { width: auto; min-height: auto; margin: 0.25rem 0 0; flex-shrink: 0; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th, .admin-table td { padding: 0.6rem 0.75rem; text-align: left; }
.admin-table th { background: var(--surface-elevated); font-weight: 600; color: var(--text); }
.admin-table form { display: inline; }
.admin-table .btn { margin: 0 0.25rem 0.25rem 0; padding: 0.35rem 0.6rem; font-size: 0.875rem; min-height: auto; }
@media (max-width: 640px) {
  .admin-table th, .admin-table td { padding: 0.4rem 0.5rem; font-size: 0.8125rem; }
}

.pagination { text-align: center; margin: 1rem 0; font-size: 0.9375rem; color: var(--text-muted); }
.pagination a { margin: 0 0.5rem; }
