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

body {
  background: radial-gradient(circle at top, rgba(202,138,4,0.08), transparent 30%), #0b0d0f;
  color: #d6d6d6;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

nav {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-bottom: 1px solid #191c20; font-size: 0.82rem;
  position: sticky; top: 0; background: rgba(11,13,15,0.96);
  backdrop-filter: blur(10px); z-index: 50;
}
nav a { color: #5b6470; text-decoration: none; transition: color 0.2s; }
nav a:hover { color: #f0f0f0; }
nav .sep { color: #2f353d; }
nav .current { color: #e3e3e3; }
nav .spacer { flex: 1; }
.nav-updated { font-size: 0.72rem; color: #37404a; }
#nav-auth { position: relative; }
#nav-auth-btn {
  background: none; border: 1px solid #252b31; border-radius: 6px;
  color: #75808c; font-size: 0.75rem; padding: 4px 10px; cursor: pointer;
  font-family: inherit; transition: color 0.2s, border-color 0.2s;
  text-decoration: none; display: inline-block; line-height: 1.6;
}
#nav-auth-btn:hover { color: #dde4ea; border-color: #38404a; }
#nav-auth-btn.authed { color: #6ee7b7; border-color: rgba(110,231,183,0.25); }
#nav-auth-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #0f1317; border: 1px solid #1e242a; border-radius: 8px;
  min-width: 160px; z-index: 200; overflow: hidden;
}
#nav-auth-dropdown.open { display: block; }
.nav-dd-item {
  display: block; padding: 9px 14px; font-size: 0.8rem; color: #8b96a3;
  text-decoration: none; cursor: pointer; background: none; border: none;
  font-family: inherit; width: 100%; text-align: left; transition: background .15s, color .15s;
}
.nav-dd-item:hover { background: #171d23; color: #d2d8dd; }
.nav-dd-item.danger:hover { color: #f87171; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  padding: 28px;
  border: 1px solid #1c2026;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(19,23,28,0.96), rgba(12,15,18,0.96));
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  margin-bottom: 24px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fbbf24;
  margin-bottom: 8px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #f5f5f5;
  margin-bottom: 12px;
}
.hero p {
  color: #98a2ad;
  max-width: 60ch;
  font-size: 1rem;
}
.hero-side {
  display: grid;
  gap: 12px;
}
.hero-stat {
  padding: 16px 18px;
  border: 1px solid #232931;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}
.hero-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5d6874;
  margin-bottom: 4px;
}
.hero-stat strong {
  color: #e6ebef;
  font-size: 0.95rem;
}

.toolbar {
  border: 1px solid #1a1f24;
  border-radius: 18px;
  padding: 18px;
  background: rgba(14,17,21,0.92);
  margin-bottom: 24px;
}
.toolbar-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.segment {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: #10151a;
  border: 1px solid #1d232b;
  flex-wrap: wrap;
}
.segment-btn {
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  background: transparent;
  color: #8b95a1;
  font: inherit;
  cursor: pointer;
}
.segment-btn.active {
  background: #f59e0b;
  color: #14171b;
  font-weight: 700;
}
.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
  color: #66707b;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.search-field input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #242a31;
  background: #0f1317;
  color: #e6e6e6;
  font: inherit;
}
.search-field input:focus {
  outline: none;
  border-color: #f59e0b;
}
.category-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.chip {
  border: 1px solid #272d35;
  background: #10151a;
  color: #8d97a3;
  padding: 7px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.chip.active {
  border-color: rgba(110,231,183,0.35);
  color: #d7fff0;
  background: rgba(16,185,129,0.12);
}
.toolbar-meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #69737f;
  font-size: 0.86rem;
}

.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}
.device-card {
  border: 1px solid #1d2329;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18,22,27,0.98), rgba(11,14,17,0.98));
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.device-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.device-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbbf24;
}
.device-score {
  font-size: 0.76rem;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb923c);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  white-space: nowrap;
}
.device-card h2 {
  font-size: 1.25rem;
  line-height: 1.15;
  color: #f5f7f8;
  margin-bottom: 4px;
}
.device-model {
  color: #7b8794;
  font-size: 0.84rem;
}
.device-copy {
  color: #96a0ab;
  font-size: 0.92rem;
}
.device-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.device-label {
  font-size: 0.7rem;
  color: #616c78;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.device-value {
  color: #d8dde2;
  font-size: 0.9rem;
}
.device-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.device-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #11171d;
  border: 1px solid #212831;
  color: #86919d;
  font-size: 0.76rem;
}
.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.device-btn {
  border: 1px solid #272e36;
  background: #10151a;
  color: #c3cbd2;
  border-radius: 12px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.device-btn.primary {
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.32);
  color: #ffd78a;
}
.device-btn.muted {
  color: #85919d;
}
.device-btn.active-not {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.28);
  color: #fca5a5;
}
.device-source {
  margin-top: 2px;
}
.device-source a {
  color: #7dd3fc;
  text-decoration: none;
  font-size: 0.84rem;
}
.device-source a:hover {
  text-decoration: underline;
}
.device-buy-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.device-buy-price {
  color: #e8edf2;
  font-size: 0.92rem;
  font-weight: 700;
}
.device-buy-links a {
  color: #fbbf24;
  text-decoration: none;
  font-size: 0.84rem;
}
.device-buy-links a:hover {
  text-decoration: underline;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 6px 10px;
}
.status-pill.wishlist {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.28);
}
.status-pill.not_interested {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.28);
}
.empty-state {
  border: 1px dashed #242a31;
  border-radius: 18px;
  padding: 48px 24px;
  text-align: center;
  color: #67727e;
  background: rgba(14,17,21,0.72);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .toolbar-top {
    flex-direction: column;
  }
  .search-field {
    min-width: 0;
    width: 100%;
  }
}
