@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --bg:           #383838;
  --card-bg:      #444444;
  --step-bg:      #4a4a4a;
  --border:       #555555;
  --accent:       #e07820;
  --accent-hover: #c46a18;
  --text:         #ffffff;
  --text-sub:     #c0c0c0;
  --text-muted:   #888888;
  --success-bg:   #1c3a1c;
  --success-text: #5cb85c;
  --error-bg:     #3a1c1c;
  --error-text:   #e05555;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Mobile first: card fills the screen ─────────────────── */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  min-height: 100vh;
}

.card {
  background: var(--card-bg);
  width: 100%;
  min-height: 100vh;
}

/* ── Banner ───────────────────────────────────────────────── */

.banner {
  width: 100%;
  display: block;
  /* Crop the banner to a comfortable height on mobile */
  max-height: 120px;
  object-fit: cover;
  object-position: center;
}

/* ── Card body (padding around content) ──────────────────── */

.card-body {
  padding: 28px 20px 40px;
}

/* ── Headings ─────────────────────────────────────────────── */

h1 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── Step hint box ────────────────────────────────────────── */

.step {
  background: var(--step-bg);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

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

/* ── Form ─────────────────────────────────────────────────── */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 8px;
}

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px; /* 16px prevents iOS auto-zoom */
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

input[type="text"]::placeholder { color: var(--text-muted); }
input[type="text"]:focus { border-color: var(--accent); }

/* ── Buttons ──────────────────────────────────────────────── */

button {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: background 0.2s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:hover:not(:disabled)  { background: var(--accent-hover); }
button:active:not(:disabled) { background: var(--accent-hover); }
button:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.download-btn {
  display: none;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin-top: 14px;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:hover,
.download-btn:active { background: var(--accent-hover); }

/* ── Messages ─────────────────────────────────────────────── */

.message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  line-height: 1.5;
}

.message.error   { background: var(--error-bg);   color: var(--error-text); }
.message.success { background: var(--success-bg); color: var(--success-text); }

.counter {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

/* ── Tablet & desktop: float card in the center ──────────── */

@media (min-width: 540px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
  }

  .card {
    max-width: 480px;
    min-height: auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
  }

  .banner {
    max-height: 160px;
  }

  .card-body {
    padding: 32px 36px 40px;
  }

  h1 { font-size: 22px; }
}
