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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 420px;
}

/* Card */
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
}

/* Cover image - natural aspect ratio, no cropping */
.cover {
  width: 100%;
  display: block;
  border-radius: 12px 12px 0 0;
}

/* Card content */
.card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* Form */
form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8b949e;
}

/* Inputs */
input[type="password"],
textarea#urls {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 1rem; /* 16px - prevents iOS Safari zoom on focus */
  font-family: inherit;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="password"]:focus,
textarea#urls:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

textarea#urls {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

@media (max-width: 480px) {
  textarea#urls { resize: none; }
}

.hint {
  font-size: 0.7rem;
  color: #484f58;
}

/* Feature chips — static pills above textarea */
.feature-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.chip-ig   { background: #2d1b4e; color: #c084fc; border: 1px solid rgba(124,58,237,0.27); }
.chip-url  { background: #0d2a40; color: #58a6ff; border: 1px solid rgba(88,166,255,0.27); }
.chip-text { background: #1a2a1a; color: #3fb950; border: 1px solid #238636; }

/* Live mode badge — dynamic pill below textarea */
.mode-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.mode-ig   { background: #2d1b4e; color: #c084fc; border: 1px solid rgba(124,58,237,0.27); }
.mode-url  { background: #0d2a40; color: #58a6ff; border: 1px solid rgba(88,166,255,0.27); }
.mode-text { background: #0d1e1a; color: #3fb950; border: 1px solid rgba(35,134,54,0.27); }

/* Button row: lock + convert side by side */
.btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

#passphrase-lock {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 0;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s, background 0.15s, border-color 0.15s;
  margin-top: 0;
}
#passphrase-lock.active {
  opacity: 1;
}
#passphrase-lock:hover {
  background: #30363d;
  border-color: #58a6ff;
  opacity: 1;
}

#submit-btn { flex: 1; margin-top: 0; }

/* Button */
button {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem;
  background: #238636;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover:not(:disabled) { background: #2ea043; }
button:disabled { background: #21262d; color: #484f58; cursor: not-allowed; }

/* Status */
.status {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
}
.status.success { background: #0d2a1a; border: 1px solid #238636; color: #3fb950; }
.status.error   { background: #2a0d0d; border: 1px solid #f85149; color: #f85149; }
.hidden { display: none; }
