@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0a0e0f;
  --bg-soft: radial-gradient(circle at 15% -10%, rgba(52, 211, 153, 0.12), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.08), transparent 40%), #0a0e0f;
  --surface: #12191b;
  --surface-2: #172023;
  --border: #223030;
  --border-soft: #1a2426;
  --text: #eef4f1;
  --text-muted: #8fa19d;
  --text-faint: #5d6d69;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --gold: #fbbf24;
  --danger: #fb7185;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-soft);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

/* Header */

header.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 14, 15, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.site-header .brand-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.site-header .brand span {
  color: var(--accent);
}

.site-header .nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-header .nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.site-header .nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.site-header .nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* Hero */

.hero {
  margin-bottom: 36px;
  padding-bottom: 8px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.hero .eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 10px;
}

.hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
  font-size: 1rem;
}

/* Stat cards */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.stat-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}

.stat-card:hover {
  border-color: var(--border-soft);
  transform: translateY(-2px);
}

.stat-card .label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-card .label-row .emoji {
  font-size: 1rem;
}

.stat-card .value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.stat-card .value.pending {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  font-family: "Inter", sans-serif;
}

.stat-card .sub {
  color: var(--text-faint);
  font-size: 0.78rem;
}

section h2 {
  font-size: 1.3rem;
  margin: 44px 0 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* Toolbar */

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar input[type="search"],
.toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
}

.toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
}

.toolbar input[type="search"]:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Auction grid */

.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.auction-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.auction-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.auction-card .item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auction-card img.icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 3px;
}

.auction-card .item-name {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auction-card .bid-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auction-card .bid-row strong {
  color: var(--text);
  font-weight: 600;
}

.auction-card .timer {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

.auction-card .timer.ending-soon {
  color: var(--danger);
}

.state-message {
  color: var(--text-muted);
  padding: 32px 0;
  text-align: center;
}

/* Footer */

footer.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.83rem;
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-links a + a::before {
  content: "·";
  margin: 0 8px;
  color: var(--text-faint);
}

/* Markt-Bereich */

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.category-tabs button:hover {
  color: var(--text);
  border-color: var(--border-soft);
}

.category-tabs button.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.market-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s, transform 0.12s;
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.55;
  padding: 4px;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s;
}

.fav-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

.fav-btn.active {
  opacity: 1;
}

.market-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.market-card .item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-card img.icon {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.market-card .item-name {
  font-weight: 600;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-pair {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.price-pair .buy {
  color: var(--accent);
  font-weight: 600;
}

.price-pair .sell {
  color: var(--danger);
  font-weight: 600;
}

.price-pair .none {
  color: var(--text-faint);
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 6, 0.72);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  padding: 26px;
  position: relative;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.detail-header img.icon {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  background: var(--surface);
  border-radius: 8px;
  padding: 5px;
}

.detail-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.detail-lore {
  white-space: pre-line;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.detail-grid .field .label {
  color: var(--text-faint);
  font-size: 0.78rem;
}

.detail-grid .field .value {
  font-weight: 600;
}

.chart-wrap {
  margin-top: 18px;
}

.chart-wrap .range-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.chart-wrap .range-tabs button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.chart-wrap .range-tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.chart-wrap canvas {
  max-height: 220px;
}

.chart-unavailable {
  color: var(--text-faint);
  font-size: 0.85rem;
  font-style: italic;
}

/* Auktions-Detailseite */

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.back-link:hover {
  color: var(--accent);
}

.detail-page {
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.watch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.watch-row .watch-info {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.watch-btn {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.watch-btn.active {
  background: var(--accent-strong);
  color: #06231a;
}

.watch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.webhook-row {
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.webhook-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.webhook-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 0 10px;
}

.webhook-input-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.webhook-input-group input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
}

.webhook-input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.webhook-input-group button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.webhook-input-group button:hover {
  border-color: var(--accent);
}

.webhook-status {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.webhook-status.ok {
  color: var(--accent);
}

.webhook-status.error {
  color: var(--danger);
}

/* Rechtstexte (Impressum/Datenschutz) */

.legal {
  max-width: 720px;
}

.legal h2 {
  font-size: 1.1rem;
  margin: 32px 0 10px;
}

.legal p {
  color: var(--text-muted);
  margin: 0 0 12px;
}

.legal .placeholder {
  color: var(--gold);
  background: rgba(251, 191, 36, 0.08);
  border: 1px dashed rgba(251, 191, 36, 0.4);
  border-radius: 6px;
  padding: 1px 6px;
}

.legal .notice {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #fde68a;
  font-size: 0.88rem;
  margin-bottom: 28px;
}

.legal ul {
  color: var(--text-muted);
}

/* Mobile */

@media (max-width: 640px) {
  .site-header nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .site-header .nav-links {
    margin-left: 0;
    width: 100%;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-header .nav-links a {
    padding: 7px 10px;
    font-size: 0.87rem;
    white-space: nowrap;
  }

  main {
    padding: 24px 16px 48px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.92rem;
  }

  .stat-grid,
  .auction-grid,
  .market-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
  }

  .toolbar input[type="search"],
  .toolbar select {
    width: 100%;
  }

  .modal-overlay {
    padding: 16px 10px;
  }

  .modal-box {
    padding: 18px;
  }

  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .webhook-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .webhook-input-group input {
    min-width: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
