/* ===== GOTCHA MARKETPLACE — GLOBAL STYLES ===== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg: #06060f;
  --bg-card: #0d0d1a;
  --bg-card-hover: #111124;
  --bg-input: #0a0a18;
  --accent: #4338CA;
  --accent-mid: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border: rgba(99, 102, 241, 0.18);
  --border-hover: rgba(99, 102, 241, 0.45);
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #55557a;
  --white: #ffffff;
  --green: #10b981;
  --green-dim: rgba(16, 185, 129, 0.12);
  --orange: #f59e0b;
  --orange-dim: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --pro-gold: #f59e0b;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 24px rgba(99, 102, 241, 0.2);
  --font-title: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.2s ease;
}

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

@keyframes pageLoad { from { opacity: 0; } to { opacity: 1; } }

html { scroll-behavior: smooth; font-size: 16px; background: #06060f; }

body {
  animation: pageLoad .35s ease both;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== UTILS ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== TYPOGRAPHY ===== */
.font-title { font-family: var(--font-title); }
.font-mono { font-family: var(--font-mono); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent-mid);
}
.btn-primary:hover {
  background: var(--accent-mid);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-tested {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-tested-plus {
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(129,140,248,0.1));
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.4);
  box-shadow: 0 0 10px rgba(99,102,241,0.15);
}

.badge-untested {
  background: var(--orange-dim);
  color: var(--orange);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-pro {
  background: rgba(245, 158, 11, 0.12);
  color: var(--pro-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-boosted {
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  color: var(--white);
  border: none;
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-logo {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.navbar-logo span { color: #4338CA; }

.navbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 16px 10px 42px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.navbar-search input:focus { border-color: var(--accent-mid); }
.navbar-search input::placeholder { color: var(--text-dim); }

.navbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navbar-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.navbar-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.navbar-nav a.active { color: var(--accent-light); }

.navbar-actions { display: flex; align-items: center; gap: 10px; }

/* ===== TICKER ===== */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  padding: .7rem 0;
  font-family: var(--font-mono);
  font-size: .63rem;
  color: var(--text-muted);
  letter-spacing: .08em;
}
.ticker-t {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: tickScroll 28s linear infinite;
}
.ticker-t:hover { animation-play-state: paused; }
@keyframes tickScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 120px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-logo span { color: #4338CA; }

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 260px;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--accent-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ===== CARDS ===== */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}

.listing-card.boosted {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.2), 0 8px 32px rgba(99,102,241,0.12);
}

.card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.listing-card:hover .card-img img { transform: scale(1.04); }

.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 2.5rem;
}

.card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.card-category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.card-price {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.card-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.seller-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ===== SECTION TITLES ===== */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

/* ===== GRID ===== */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 64px 0;
}

/* ===== TAG CHIPS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.tag:hover, .tag.active {
  border-color: var(--accent-mid);
  color: var(--accent-light);
  background: var(--accent-glow);
}

/* ===== ADMIN ===== */
.card-admin-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(6,6,15,0.88);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(99,102,241,0.3);
  padding: 6px 8px;
  gap: 6px;
  justify-content: flex-end;
  z-index: 10;
}
.card-admin-btn {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all var(--transition);
}
.card-admin-btn:hover { color: var(--white); border-color: var(--border-hover); }
.card-admin-del:hover { color: var(--red); border-color: var(--red); }
.card-admin-edit:hover { color: var(--accent-light); border-color: var(--accent-mid); }
.card-admin-boost:hover { color: var(--orange); border-color: var(--orange); }

.admin-bar {
  background: rgba(67,56,202,0.12);
  border-bottom: 1px solid rgba(99,102,241,0.3);
  padding: 10px 0;
  position: sticky;
  top: 57px;
  z-index: 90;
  backdrop-filter: blur(8px);
}
.admin-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-bar-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.admin-bar-label::before { content: '// '; color: var(--accent); }
.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}
.admin-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.admin-bar-btn:hover { color: var(--white); border-color: var(--border-hover); background: var(--bg-card-hover); }
.admin-bar-btn.danger:hover { color: var(--red); border-color: var(--red); }
.admin-bar-btn.success:hover { color: var(--green); border-color: var(--green); }
.admin-bar-state {
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-bar-state select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  outline: none;
  cursor: pointer;
}
.admin-bar-state select:focus { border-color: var(--accent-mid); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar-search { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .section-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar-actions .btn-secondary { display: none; }
}
