* { box-sizing: border-box; }

:root {
  --background: #f2f4f7;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --text: #171a21;
  --muted: #5e6673;
  --border: #e3e7ed;
  --accent: #c8102e;
  --accent-dark: #a50e27;
  --accent-soft: #fff3f5;
  --focus: #1d4ed8;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: 24rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(242, 244, 247, 0));
  pointer-events: none;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.75rem) clamp(1rem, 4vw, 2rem) 3rem;
  flex: 1;
}

.hero {
  max-width: 760px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.hero h1 {
  margin: .65rem 0 .75rem;
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  word-break: break-word;
}

.lead {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: currentColor;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 1.5rem;
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(26, 34, 48, .07);
}

.card h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.card > p:not(.eyebrow),
.bid-card form + p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 .7rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auction-summary::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
}

.auction-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.7rem 0;
}

.auction-details div {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.auction-details dt {
  margin-bottom: .25rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.auction-details dd {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  margin: 0;
  font-size: clamp(.95rem, 1.7vw, 1.05rem);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.status-dot {
  width: .55rem;
  height: .55rem;
  flex: 0 0 .55rem;
  border-radius: 50%;
  background: #1f9d55;
  box-shadow: 0 0 0 4px rgba(31, 157, 85, .12);
}

.notice {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid #ffdce2;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: var(--accent-soft);
  color: #4b2930;
  font-size: .93rem;
}

.notice strong { color: var(--text); }

.bid-card {
  border-top: 4px solid var(--text);
}

.bid-card > p:not(.eyebrow) { margin: 0 0 1.5rem; }

form { margin-top: 1.5rem; }

.form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: .4rem;
  font-size: .88rem;
  font-weight: 700;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

input,
textarea {
  width: 100%;
  padding: .78rem .85rem;
  border: 1px solid #cbd1da;
  border-radius: 10px;
  background: #fcfdfe;
  color: var(--text);
  font: inherit;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input::placeholder,
textarea::placeholder { color: #8b93a0; }

input:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 0;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, .12);
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 1.35rem 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 400;
}

.checkbox-field input {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  margin: .15rem 0 0;
  accent-color: var(--accent);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.1rem;
  width: 100%;
  padding: .85rem 1rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
}

button:hover,
.button:hover {
  background: var(--accent-dark);
  box-shadow: 0 8px 18px rgba(200, 16, 46, .18);
  transform: translateY(-1px);
}

button:focus-visible,
.button:focus-visible,
.checkbox-field input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.rules {
  margin-top: 1.5rem;
}

.rules ol {
  max-width: 900px;
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.rules li { padding-left: .3rem; }
.rules li + li { margin-top: .65rem; }

.success-card {
  max-width: 720px;
  margin: 2rem auto 0;
}

.success-card .hero { margin: 0; }
.success-card .button { width: auto; padding-inline: 1.5rem; }

.footer {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) 1.5rem;
  color: #7a828e;
  font-size: .82rem;
  text-align: center;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

@media (max-width: 760px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero { margin-bottom: 1.75rem; }
  .rules { margin-top: 1.25rem; }
}

@media (max-width: 520px) {
  .container { padding-top: 1.5rem; }
  .card { border-radius: 18px; }
  .auction-details,
  .form-fields { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .auction-details { margin: 1.35rem 0; }
  .auction-details div { padding: .85rem; }
  .success-card { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Modal de destaque do último lance */
.bid-modal {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
}

.bid-modal::backdrop {
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 5vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 0%, #fff8f9 100%);
  text-align: center;
}

.modal-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), #f05a70);
}

.modal-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: #f1f2f4;
  color: var(--muted);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
}

.modal-close:hover {
  background: #e3e5e9;
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.modal-kicker {
  margin: .25rem 0 .9rem;
  color: var(--accent);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.modal-content h2 {
  max-width: 380px;
  margin: 0 auto .8rem;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.modal-content h2 strong {
  display: block;
  margin-top: .35rem;
  color: var(--accent);
  font-size: 1.2em;
}

.modal-content > p:not(.modal-kicker):not(.modal-caption) {
  max-width: 370px;
  margin: 0 auto 1.35rem;
  color: var(--muted);
}

.modal-action { width: 100%; }

.modal-caption {
  margin: .9rem 0 0;
  color: #7a828e;
  font-size: .75rem;
}

@media (max-width: 520px) {
  .bid-modal { border-radius: 18px; }
  .modal-content { border-radius: 18px; }
}
