:root {
  /* giftmarket.club brand palette, taken from the logo (blue fading into teal) */
  --gm-blue: #2b67e0;
  --gm-blue-dark: #1e4bb8;
  --gm-teal: #13b3a1;
  --gm-teal-dark: #0d9182;
  --gm-bg: #f5f7fa;
  --gm-card-bg: #ffffff;
  --gm-text: #1f2027;
  --gm-text-secondary: #6b6f76;
  --gm-border: #e4e2ea;
  --gm-success: #1f9d55;
  --gm-error: #d64545;
  --gm-radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--gm-bg);
  color: var(--gm-text);
}

a {
  color: var(--gm-blue);
}

/* Top bar */
.topbar {
  background: var(--gm-blue);
  background: linear-gradient(135deg, var(--gm-blue) 0%, var(--gm-blue) 55%, var(--gm-teal) 130%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: #fff;
}

.topbar .brand img {
  height: 34px;
  width: 34px;
  border-radius: 8px;
  display: block;
}

.topbar .brand span {
  color: #eafff9;
  font-weight: 400;
  opacity: 0.9;
}

.topbar .tagline {
  font-size: 14px;
  opacity: 0.85;
}

/* Stepper + countdown row */
.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 0 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  background: #d9d7e3;
  color: #8a8894;
}

.step.active .step-circle {
  background: var(--gm-teal);
  color: #fff;
}

.step.done .step-circle {
  background: var(--gm-teal);
  color: #fff;
}

.step-label {
  font-size: 12px;
  color: var(--gm-text-secondary);
  text-align: center;
}

.step.active .step-label {
  color: var(--gm-text);
  font-weight: 600;
}

.step-line {
  width: 60px;
  height: 2px;
  background: #d9d7e3;
  margin-bottom: 20px;
}

.step-line.done {
  background: var(--gm-teal);
}

.countdown {
  text-align: right;
}

.countdown .label {
  font-size: 12px;
  color: var(--gm-text-secondary);
}

.countdown .time {
  font-size: 26px;
  font-weight: 700;
  color: var(--gm-text);
}

/* Page content */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin: 8px 0 32px;
}

.alert {
  max-width: 600px;
  margin: 0 auto 24px;
  padding: 12px 16px;
  border-radius: var(--gm-radius);
  background: #fdecec;
  color: var(--gm-error);
  border: 1px solid #f5c6c6;
  text-align: center;
}

.empty-state {
  text-align: center;
  color: var(--gm-text-secondary);
  padding: 60px 20px;
}

/* Offer grid */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.offer-card {
  background: var(--gm-card-bg);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.offer-card:hover {
  border-color: var(--gm-teal);
  box-shadow: 0 4px 14px rgba(19, 179, 161, 0.15);
}

.offer-logo-wrap {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 8px;
  overflow: hidden;
}

.offer-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.offer-logo-fallback {
  font-size: 13px;
  color: var(--gm-text-secondary);
}

.offer-title {
  font-weight: 700;
  font-size: 15px;
}

.offer-description {
  font-size: 13px;
  color: var(--gm-text-secondary);
  flex: 1;
  white-space: pre-line;
}

/* Buttons */
.btn {
  display: inline-block;
  text-align: center;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gm-teal-dark);
  color: #fff;
  width: 100%;
}

.btn-primary:hover {
  background: var(--gm-teal);
}

.btn-outline {
  background: transparent;
  color: var(--gm-text);
  border: 1px solid var(--gm-border);
  width: 100%;
}

.btn-outline:hover {
  background: #f0eef7;
}

form.inline {
  margin: 0;
}

/* Reveal page */
.reveal-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 28px;
}

.reveal-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0;
  background: var(--gm-card-bg);
  border: 1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  overflow: hidden;
}

@media (max-width: 760px) {
  .reveal-grid {
    grid-template-columns: 1fr;
  }
}

.reveal-left {
  padding: 32px;
}

.reveal-left h3 {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--gm-text-secondary);
  font-weight: 600;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px dashed var(--gm-teal);
  background: rgba(19, 179, 161, 0.06);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.code-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gm-blue-dark);
}

.code-expiry {
  font-size: 12px;
  color: var(--gm-text-secondary);
  margin-top: 4px;
}

.copy-btn {
  background: none;
  border: 1px solid var(--gm-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn.copied {
  border-color: var(--gm-success);
  color: var(--gm-success);
}

.consent-text {
  font-size: 11px;
  color: var(--gm-text-secondary);
  text-align: center;
  margin: 12px 0 20px;
  line-height: 1.5;
}

.reveal-right {
  background: #fafafa;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reveal-banner {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #eee;
}

.reveal-banner img {
  width: 100%;
  display: block;
}

.reveal-logo-wrap {
  height: 60px;
  display: flex;
  align-items: center;
}

.reveal-logo-wrap img {
  max-height: 100%;
  max-width: 160px;
  object-fit: contain;
}

.terms-list {
  font-size: 13px;
  color: var(--gm-text-secondary);
  white-space: pre-line;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #efeef4;
  border-top: 1px solid var(--gm-border);
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--gm-text-secondary);
}

.footer a {
  color: var(--gm-text-secondary);
  margin-left: 16px;
  text-decoration: underline;
}
