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

:root {
  --bg: #0F1117;
  --card: #1C1C1E;
  --border: #2C2C2E;
  --input-bg: #0F1117;
  --input-border: #3A3A3C;
  --accent: #00D4C8;
  --text: #FFFFFF;
  --muted: #8A8A8E;
  --placeholder: #636366;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}

/* Status bar (cosmetic, matches the mockup) */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.3px;
}
.status-bar .battery {
  font-weight: 500;
  font-size: 12px;
  opacity: 0.9;
}

/* App header */
.app-header {
  height: 52px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}
.close-btn,
.menu-btn {
  font-size: 18px;
  line-height: 1;
  color: var(--text);
  opacity: 0.9;
}
.app-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

/* Brand block */
.brand {
  text-align: center;
  padding: 20px 16px 12px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
}
.brand-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.brand-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 6px;
}
.brand-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* Tabs */
nav.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  background: var(--bg);
}
nav.tabs .tab {
  flex: 1 1 auto;
  padding: 14px 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
nav.tabs .tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Main */
main {
  max-width: 390px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tab-panel {
  display: none;
  animation: fade 0.2s;
}
.tab-panel.active {
  display: block;
}
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

/* Input group (single check) */
.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.input-group input {
  flex: 1;
}
.btn-paste {
  width: 48px;
  padding: 0;
  font-size: 20px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-paste:active { background: #1A1C23; }

/* Inputs & selects */
input, select {
  width: 100%;
  padding: 14px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
input::placeholder { color: var(--placeholder); }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A8E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* Row of fields (multi-select cards) */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn:active { background: #00b8a3; }

/* Result area */
.result {
  margin-top: 12px;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.5;
}
.result.empty {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 20px;
}
.err { color: #e5484d; }
.muted { color: var(--muted); }

/* Single result (check one) */
.single-result {
  text-align: center;
  margin-top: 10px;
}
.status {
  display: inline-block;
  margin-left: 6px;
  font-weight: 600;
}
.buy-link {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.buy-link a {
  color: var(--accent);
  text-decoration: none;
}
.buy-link a:hover { text-decoration: underline; }

/* Result summary */
.result-summary {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Username rows */
.username-list { display: flex; flex-direction: column; gap: 6px; }
.username-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.username-row.free { border-color: var(--accent); }
.username-row.sale { border-color: var(--accent); }
.username-row.taken { opacity: 0.6; }
.username {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}
.username .name { color: var(--accent); }

/* Copy button */
.btn.copy {
  width: auto;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.btn.copy.copied { background: var(--accent); color: var(--bg); }
.btn.copy:active { background: #1A1C23; }

/* Fragment link */
.fragment-link {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 6px;
}
.fragment-link:hover { border-color: var(--accent); color: var(--accent); }

.more { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Footer */
.app-footer {
  text-align: center;
  padding: 24px 16px;
  color: #636366;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.app-footer a { color: var(--muted); text-decoration: none; }
