/* ============================================================ Baghound — web theme
 *
 * Same charcoal + loot-gold palette as the desktop app, same Silkscreen +
 * VT323 fonts, with a touch more breathing room and modern motion than the
 * Swing version. Three core surfaces: BG (deepest, page), BG1 (raised
 * cards), BG2 (interactive chips / inputs).
 *
 * Layout is mobile-first; the .container helpers cap to readable widths.
 * Nothing depends on a framework — vanilla CSS, no preprocessor.
 * ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Silkscreen:wght@400;700&display=swap');

:root {
  --bg:        #14121B;
  --bg1:       #1C1925;
  --bg2:       #262232;
  --bg3:       #322D40;
  --line:      #0A0810;
  --line-hi:   #3D3650;
  --ink:       #EFE6D2;
  --ink-dim:   #8A8295;
  --ink-faint: #5A546A;
  --gold:      #FFCC33;
  --gold-2:    #FFE066;
  --gold-d:    #B8861F;
  --red:       #D8423C;
  --blue:      #4AA8E8;
  --green:     #5FD16A;
  --purple:    #B86FDC;

  --font-pixel: 'Silkscreen', 'Courier New', monospace;
  --font-body:  'VT323', 'Courier New', monospace;
  --shadow-lift: 0 6px 24px rgba(0,0,0,.45);
  --shadow-hover: 0 8px 28px rgba(255,204,51,.08);
  --radius: 0; /* the whole design is square-edged on purpose */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255,204,51,.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
  min-height: 100vh;
}
body { display: flex; flex-direction: column; }

.hidden { display: none !important; }
.muted  { color: var(--ink-dim); }
.accent { color: var(--gold); }

a { color: var(--blue); text-decoration: none; transition: color .12s ease; }
a:hover { color: var(--gold-2); }

/* ============================================================ Top bar */

#topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(28, 25, 37, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  height: 36px;
  cursor: pointer;
}
.brand svg { display: block; }
.brand:hover { opacity: 0.85; }

.search {
  position: relative;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
#searchInput {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line-hi);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .12s ease;
}
#searchInput:focus { border-color: var(--gold); }
#searchInput::placeholder { color: var(--ink-faint); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg1);
  border: 1px solid var(--line-hi);
  max-height: 360px;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
}
.search-result {
  display: block;
  padding: 8px 14px;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 16px;
  transition: background .08s ease;
}
.search-result:hover, .search-result.active {
  background: var(--bg2);
  color: var(--gold);
}
.search-empty {
  padding: 10px 14px;
  color: var(--ink-faint);
  font-size: 14px;
}

.topbar-right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.topbar-right .display-name {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
}

/* ============================================================ Buttons */

.btn {
  display: inline-block;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 18px;
  border: 1px solid var(--line-hi);
  border-bottom-width: 2px;
  border-right-width: 2px;
  background: var(--bg2);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .08s ease, background .12s ease, color .12s ease;
}
.btn:hover:not(:disabled) {
  background: var(--bg3);
  color: var(--gold);
  transform: translateY(-1px);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn.primary {
  background: var(--gold);
  color: #000;
  border-color: var(--gold-d);
}
.btn.primary:hover:not(:disabled) {
  background: var(--gold-2);
  color: #000;
}

.btn.default {}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-dim);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--bg2);
  color: var(--ink);
  border-color: var(--line-hi);
}

/* ============================================================ Main + views */

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 64px;
}

.view-card {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.card {
  width: 100%;
  max-width: 460px;
  padding: 28px 28px 24px;
  background: var(--bg1);
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow-lift);
}

h1, h2, h3 {
  font-family: var(--font-pixel);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--ink);
}
h1 { font-size: 20px; }
h2 { font-size: 16px; color: var(--gold); margin-bottom: 24px; }
h3 { font-size: 12px; color: var(--ink); }

label {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin: 12px 0 4px;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[inputmode="numeric"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 18px;
  background: var(--bg2);
  color: var(--ink);
  border: 1px solid var(--line-hi);
  padding: 10px 12px;
  outline: none;
  transition: border-color .12s ease;
}
input:focus { border-color: var(--gold); }

input[inputmode="numeric"] {
  font-size: 28px;
  letter-spacing: 8px;
  font-family: 'Courier New', monospace;
  text-align: center;
}

.row {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; margin-top: 18px;
}
form .btn.primary { margin-top: 18px; }

.error {
  color: var(--red);
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 16px;
}

/* ============================================================ Home — hero */

.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero-mark { display: inline-block; margin-bottom: 32px; }
.hero-tagline {
  font-family: var(--font-pixel);
  font-size: 22px;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 720px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: var(--ink);
}
.hero-sub {
  max-width: 580px;
  margin: 0 auto 32px;
  color: var(--ink-dim);
  font-size: 18px;
}
.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ============================================================ Home — features */

.features { margin-top: 24px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--bg1);
  border: 1px solid var(--line);
  padding: 24px;
  transition: transform .12s ease, box-shadow .15s ease, border-color .12s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: var(--line-hi);
  box-shadow: var(--shadow-hover);
}
.feature-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}
.feature h3 { margin: 0 0 8px; font-size: 13px; }
.feature p  { margin: 0; color: var(--ink-dim); font-size: 17px; line-height: 1.5; }

/* ============================================================ Home — CTA band */

.cta-band {
  margin-top: 64px;
  padding: 48px 24px;
  background: linear-gradient(180deg, var(--bg1), var(--bg));
  border: 1px solid var(--line-hi);
  text-align: center;
}
.cta-band h2 { color: var(--ink); }
.cta-band p { margin: 16px 0 0; font-size: 16px; }

/* ============================================================ Profile */

.profile-header { padding: 56px 0 12px; }
.profile-header h1 {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 4px;
}
.profile-header .muted { font-size: 16px; }

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-hi);
  margin: 24px 0 24px;
}
.tab {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  color: var(--ink-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .12s ease, border-color .12s ease;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.profile-body { min-height: 280px; }

.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 24px;
  color: var(--ink-dim);
  text-align: center;
  background: var(--bg1);
  border: 1px dashed var(--line-hi);
}
.placeholder .ph-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

/* ============================================================ Collection grid */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.collection-tile {
  background: var(--bg1);
  border: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .12s ease, transform .08s ease;
}
.collection-tile:hover { border-color: var(--line-hi); transform: translateY(-1px); }
.collection-tile .id {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 1px;
}
.collection-tile .counts {
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--ink);
}
.collection-tile .live { font-size: 14px; color: var(--ink-dim); }
.collection-tile .live.none { color: var(--ink-faint); }

/* ============================================================ Footer */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg1);
  padding: 24px 28px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--ink-dim); font-size: 15px; }
.footer-links a:hover { color: var(--gold); }

/* ============================================================ Small screens */

@media (max-width: 720px) {
  #topbar { grid-template-columns: auto 1fr; gap: 12px; padding: 12px 16px; }
  .search { grid-column: 1 / -1; order: 3; max-width: none; }
  main { padding: 0 16px 48px; }
  .hero { padding-top: 48px; }
  .hero-tagline { font-size: 18px; }
}
