/* ============================================================
   FlipSignal — Clean Dark Theme
   ============================================================ */

:root {
  --bg:           #0b0f19;
  --bg-card:      #111827;
  --bg-elevated:  #1a2235;
  --bg-hover:     #1f2a3e;
  --border:       #1e293b;
  --border-light: #253147;
  --text:         #e8edf5;
  --text-dim:     #94a3b8;
  --text-muted:   #5a6a82;
  --green:        #00d26a;
  --blue:         #3b82f6;
  --yellow:       #f59e0b;
  --red:          #ef4444;
  --radius:       10px;
  --radius-sm:    6px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --ease:         0.2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ─────────── HEADER ─────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,25,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.15rem; letter-spacing: -.3px;
  flex-shrink: 0;
}
.logo-text { color: var(--text-dim); font-weight: 300; }
.logo-text strong { color: var(--text); font-weight: 700; }

.header-nav {
  display: flex; gap: 4px; margin-left: 8px;
}
.nav-link {
  padding: 6px 14px; border-radius: 6px;
  font-size: .82rem; font-weight: 500; color: var(--text-dim);
  transition: all var(--ease);
}
.nav-link:hover, .nav-link.active {
  color: var(--text); background: rgba(255,255,255,.05);
}

.header-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.stat-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(17,24,39,.7);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px;
  font-size: .78rem; color: var(--text-dim);
}
.stat-label { font-size: .74rem; }
#stat-total-value { font-weight: 700; color: var(--green); }
.live-pill { border-color: rgba(0,210,106,.15); }

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); display: inline-block;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(0,210,106,.5);
}
.pulse-dot.connecting { background: var(--yellow); animation: none; }
.pulse-dot.error      { background: var(--red); animation: none; }
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%     { opacity:.4; transform:scale(.7); }
}

/* ─────────── LANGUAGE SWITCHER ─────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.lang-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s;
  line-height: 0;
}
.lang-btn img {
  width: 24px;
  height: 17px;
  border-radius: 2px;
  object-fit: cover;
  display: block;
}
.lang-btn:hover {
  opacity: 0.85;
  border-color: rgba(255,255,255,0.2);
}
.lang-btn.lang-active {
  opacity: 1;
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(0,210,106,0.3);
}

/* ─────────── HERO ─────────── */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,210,106,.03) 0%, transparent 100%);
}
.hero-inner { max-width: 600px; margin: 0 auto; }
.hero h1 {
  font-size: 1.8rem; font-weight: 800;
  letter-spacing: -.5px; line-height: 1.25;
  color: var(--text);
}
.hero-accent { color: var(--green); }
.hero-sub {
  margin-top: 12px;
  font-size: .95rem; color: var(--text-dim);
  line-height: 1.55;
}

/* ─────────── FILTER BAR ─────────── */
.filters-bar {
  background: rgba(17,24,39,.5);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 53px; z-index: 90;
}
.filters-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
}
.filter-group { display: flex; flex-direction: column; gap: 3px; }
.filter-group label {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); font-weight: 600;
}
.filter-group input,
.filter-group select {
  background: rgba(26,34,53,.7);
  border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 7px 10px;
  font-size: .82rem; font-family: inherit;
  min-width: 90px; outline: none;
  transition: border-color var(--ease);
}
.filter-group input:focus,
.filter-group select:focus { border-color: var(--blue); }
.filter-group input::placeholder { color: var(--text-muted); }
.filter-group select option { background: var(--bg-card); }

.btn-apply {
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 7px 18px;
  font-size: .82rem; font-weight: 600;
  transition: background var(--ease);
  align-self: flex-end;
}
.btn-apply:hover { background: #2563eb; }

.btn-reset {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px;
  font-size: .82rem; font-weight: 500;
  transition: all var(--ease);
  align-self: flex-end;
}
.btn-reset:hover { color: var(--text); border-color: var(--text-muted); }

/* ─────────── MAIN ─────────── */
.main-content {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 24px 56px;
  min-height: 50vh;
}

/* Toast */
.new-deal-toast {
  position: fixed; top: 72px; right: 20px; z-index: 200;
  background: rgba(17,24,39,.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,210,106,.25);
  border-radius: 8px; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
  font-size: .84rem; font-weight: 500; color: var(--text);
  animation: slideIn .35s ease-out;
}
.new-deal-toast.hidden { display: none; }
.new-deal-toast button {
  background: var(--green); color: #000; border: none;
  border-radius: 4px; padding: 4px 12px;
  font-weight: 700; font-size: .75rem;
}
@keyframes slideIn {
  from { opacity:0; transform:translateX(40px); }
  to   { opacity:1; transform:translateX(0); }
}

/* ─────────── DEAL GRID ─────────── */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ─────────── DEAL CARD ─────────── */
.deal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  animation: fadeCard .4s ease both;
}
.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  border-color: rgba(59,130,246,.3);
}
@keyframes fadeCard {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
.deal-card.new-deal { animation: newPulse 2s ease both; }
@keyframes newPulse {
  0%   { box-shadow: 0 0 0 2px var(--green), 0 0 20px rgba(0,210,106,.15); }
  100% { box-shadow: 0 2px 12px rgba(0,0,0,.3); }
}

/* ROI color accent top border */
.deal-card[data-roi-color="fire"]   { border-top: 2px solid var(--yellow); }
.deal-card[data-roi-color="green"]  { border-top: 2px solid var(--green); }
.deal-card[data-roi-color="yellow"] { border-top: 2px solid var(--yellow); }
.deal-card[data-roi-color="red"]    { border-top: 2px solid var(--red); }

/* ── Card Header ── */
.card-header {
  display:flex; gap:12px; padding:14px 14px 12px;
  border-bottom:1px solid var(--border);
}
.product-image {
  width:72px; height:72px; flex-shrink:0;
  background:#fff; border-radius:8px;
  overflow:hidden; padding:6px;
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.product-image img { width:100%; height:100%; object-fit:contain; }
.product-image .img-fallback {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:2rem; color:#555; background:#fff;
}
.product-info { flex:1; min-width:0; }
.product-title {
  font-size:.92rem; font-weight:600; line-height:1.4; color:var(--text);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  margin-bottom:8px;
}
.product-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.meta-badge {
  display:inline-flex; align-items:center; gap:4px;
  padding:3px 10px; border-radius:20px;
  font-size:.72rem; font-weight:600; letter-spacing:.02em;
}
.badge-brand    { background:rgba(59,130,246,.1);  color:var(--blue);   border:1px solid rgba(59,130,246,.2); }
.badge-category { background:rgba(139,92,246,.1);  color:#a78bfa;       border:1px solid rgba(139,92,246,.2); }
.badge-asin     { background:rgba(90,106,130,.1);  color:var(--text-muted); border:1px solid rgba(90,106,130,.2); font-family:monospace; font-size:.62rem; }
.badge-roi.green  { background:rgba(0,210,106,.1);  color:var(--green);  border:1px solid rgba(0,210,106,.2); }
.badge-roi.yellow { background:rgba(245,158,11,.1); color:var(--yellow); border:1px solid rgba(245,158,11,.2); }
.badge-roi.fire   { background:rgba(245,158,11,.1); color:var(--yellow); border:1px solid rgba(245,158,11,.3); }
.badge-roi.red    { background:rgba(239,68,68,.1);  color:var(--red);    border:1px solid rgba(239,68,68,.2); }

/* Info bar (coupon etc.) */
.card-info-bar {
  padding:6px 16px; font-size:.72rem; color:var(--blue);
  background:rgba(59,130,246,.05); border-bottom:1px solid rgba(59,130,246,.1);
}

/* ── EU Sales Bar ── */
.eu-sales-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 14px; font-size:.74rem;
  background:rgba(0,210,106,.04); border-bottom:1px solid var(--border);
}
.eu-sales-label { color:var(--text-muted); font-weight:600; white-space:nowrap; }
.eu-sales-total { font-weight:800; color:var(--green); font-size:.88rem; white-space:nowrap; }
.eu-sales-breakdown { display:flex; gap:10px; flex-wrap:wrap; }
.eu-country-sales { display:inline-flex; align-items:center; gap:4px; color:var(--text-muted); font-size:.72rem; }
.eu-flag { width:20px; height:15px; border-radius:2px; object-fit:cover; vertical-align:middle; }
.eu-sales-count { font-weight:600; color:var(--text); }

/* ── Supplier Bar (DealWatch: Alle Einkaufsquellen) ── */
.supplier-bar {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 14px; font-size:.74rem;
  background:rgba(245,158,11,.04); border-bottom:1px solid var(--border);
}
.supplier-label {
  color:var(--text-muted); font-weight:600; white-space:nowrap;
  font-size:.72rem; text-transform:uppercase; letter-spacing:.05em;
}
.supplier-list { display:flex; gap:8px; flex-wrap:wrap; }
.supplier-chip {
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:6px;
  background:rgba(90,106,130,.08); border:1px solid rgba(90,106,130,.2);
  color:var(--text); text-decoration:none;
  transition:all var(--ease); font-size:.75rem;
}
.supplier-chip:hover {
  background:rgba(59,130,246,.1); border-color:rgba(59,130,246,.4);
  transform:translateY(-1px);
}
.supplier-chip.supplier-best {
  background:rgba(0,210,106,.1); border-color:rgba(0,210,106,.3);
}
.supplier-chip.supplier-best .supplier-price { color:var(--green); font-weight:800; }
.supplier-flag { width:20px; height:15px; border-radius:2px; object-fit:cover; }
.supplier-price { font-weight:700; font-size:.8rem; }

/* ── Flow Rows ── */
.flows-container { padding:4px 0; }
.flow-row {
  display:grid; grid-template-columns:minmax(120px,1.2fr) 1fr minmax(80px,auto) 36px;
  align-items:center; gap:6px;
  padding:10px 14px;
  border-bottom:1px solid rgba(30,41,59,.6);
  transition:background var(--ease);
}
.flow-row:last-child { border-bottom:none; }
.flow-row.flow-primary { padding:12px 14px; }
.flow-row.flow-secondary { opacity:.75; }
.flow-row:hover { background:rgba(59,130,246,.03); opacity:1; }

/* Route + prices */
.flow-route { display:flex; align-items:center; gap:5px; }
.flow-flag  { width:22px; height:16px; border-radius:2px; object-fit:cover; box-shadow:0 1px 3px rgba(0,0,0,.3); flex-shrink:0; }
.flow-arrow { color:var(--text-muted); font-size:.65rem; font-weight:700; margin:0 2px; }
.flow-prices { display:flex; flex-direction:column; gap:1px; margin-left:4px; }
.flow-price-buy  { font-size:.68rem; color:var(--text-muted); }
.flow-price-sell { font-size:.76rem; font-weight:700; color:var(--text); }

/* Profit block */
.flow-profit-wrap { display:flex; justify-content:center; }
.flow-profit-block {
  display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:6px 14px; border-radius:8px;
  background:rgba(0,210,106,.08); border:1px solid rgba(0,210,106,.2);
}
.flow-roi-label     { font-size:.6rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; }
.flow-margin        { font-size:.88rem; font-weight:800; color:var(--green); }
.flow-profit-amount { font-size:.72rem; font-weight:600; }
.profit-pos { color:rgba(0,210,106,.8); }
.profit-neg { color:var(--red); }

/* Sales block */
.flow-sales { display:flex; flex-direction:column; align-items:flex-end; gap:1px; }
.flow-sales-count { font-size:.92rem; font-weight:700; color:var(--text); }
.flow-sales-label { font-size:.62rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }

/* Geschätzte Flows (aus Supplier-Offers, nicht von DealWatch bestätigt) */
.flow-row.flow-estimate { opacity:.7; border-left:2px solid rgba(245,158,11,.3); }
.flow-row.flow-estimate:hover { opacity:1; }
.flow-profit-block.flow-profit-est {
  background:rgba(245,158,11,.07);
  border-color:rgba(245,158,11,.25);
}
.flow-profit-block.flow-profit-est .flow-margin { color:var(--yellow); }

/* Per-row buy button */
.flow-buy-btn {
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:8px;
  background:rgba(59,130,246,.1); border:1px solid rgba(59,130,246,.25);
  color:var(--blue); font-size:1rem; text-decoration:none;
  transition:all var(--ease);
  justify-self:end;
}
.flow-buy-btn:hover {
  background:rgba(59,130,246,.2); border-color:var(--blue);
  transform:scale(1.1); box-shadow:0 0 12px rgba(59,130,246,.3);
}

/* ── Main Buy CTA ── */
.buy-cta {
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-top:1px solid var(--border);
  flex-wrap:wrap;
}
.buy-cta-btn {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 16px; border-radius:8px;
  background:linear-gradient(135deg,#f59e0b,#f97316);
  color:#000; font-size:.82rem; font-weight:700; letter-spacing:.02em;
  text-decoration:none; transition:all var(--ease);
  box-shadow:0 2px 12px rgba(245,158,11,.3);
}
.buy-cta-btn:hover { transform:translateY(-1px); box-shadow:0 4px 20px rgba(245,158,11,.45); filter:brightness(1.1); }
.buy-cta-price { font-size:.75rem; color:var(--text-muted); display:flex; align-items:center; gap:4px; margin-left:8px; }
.buy-cta-flag  { width:18px; height:13px; border-radius:2px; object-fit:cover; }

/* ── Keepa chart ── */
.keepa-section { padding:8px 14px 12px; border-top:1px solid var(--border); }
.keepa-chart-img {
  width:100%; height:auto; display:block;
  border-radius:8px; background:var(--bg-elevated);
}

/* ── Hint box ── */
.hint-box { padding:6px 14px; border-top:1px solid var(--border); background:rgba(251,191,36,.03); }
.hint-text { font-size:.68rem; color:var(--text-muted); line-height:1.5; }

/* ── Card Footer (tools + time) ── */
.card-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 14px; border-top:1px solid var(--border);
  background:rgba(11,15,25,.4);
}
.tool-links { display:flex; gap:6px; flex-wrap:wrap; }
.tool-link {
  display:inline-flex; align-items:center; gap:4px;
  padding:5px 12px; border-radius:6px; font-size:.7rem; font-weight:600;
  text-decoration:none; color:var(--text-muted);
  background:rgba(90,106,130,.08); border:1px solid rgba(90,106,130,.15);
  transition:all var(--ease);
}
.tool-link:hover { background:rgba(59,130,246,.1); color:var(--blue); border-color:rgba(59,130,246,.3); }
.card-time { font-size:.65rem; color:var(--text-muted); white-space:nowrap; }

/* ─────────── LOADING / EMPTY ─────────── */
.loading-spinner {
  display:flex; flex-direction:column; align-items:center;
  gap:12px; padding:80px 24px; color:var(--text-muted);
}
.loading-spinner.hidden { display:none; }
.spinner {
  width:36px; height:36px;
  border:3px solid var(--border); border-top-color:var(--green);
  border-radius:50%; animation:spin .7s linear infinite;
}
@keyframes spin { to { transform:rotate(360deg); } }

.empty-state { text-align:center; padding:80px 24px; }
.empty-state.hidden { display:none; }
.empty-icon { margin-bottom:16px; }
.empty-state h2 { font-size:1.15rem; margin-bottom:6px; color:var(--text-dim); font-weight:600; }
.empty-state p  { color:var(--text-muted); font-size:.88rem; }

/* Pagination (hidden) */
.pagination { display:none; }

/* ─────────── FAQ ─────────── */
.faq-section {
  border-top: 1px solid var(--border);
  padding: 56px 24px;
  background: rgba(17,24,39,.3);
}
.faq-inner {
  max-width: 700px; margin: 0 auto;
}
.faq-inner h2 {
  font-size: 1.3rem; font-weight: 700;
  margin-bottom: 24px; text-align: center;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--bg-card);
  overflow: hidden;
}
.faq-item summary {
  padding: 14px 16px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer; color: var(--text);
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::after {
  content: '+'; font-size: 1.1rem; color: var(--text-muted);
  transition: transform var(--ease);
}
.faq-item[open] summary::after {
  content: '-';
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 16px 14px;
  font-size: .85rem; color: var(--text-dim);
  line-height: 1.6;
}

/* ─────────── FOOTER ─────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(11,15,25,.95);
  padding: 40px 24px 32px;
}
.footer-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600;
}
.footer-brand-text { color: var(--text); }
.footer-copy { color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.footer-links {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.footer-links a {
  font-size: .82rem; color: var(--text-dim);
  transition: color var(--ease);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover {
  color: var(--text);
  border-bottom-color: var(--green);
}

.footer-legal {
  max-width: 600px; text-align: center;
}
.footer-legal p {
  font-size: .72rem; color: var(--text-muted);
  line-height: 1.55; margin-bottom: 8px;
}
.footer-legal p:last-child { margin-bottom: 0; }

/* ─────────── LEGAL PAGES ─────────── */
.legal-page {
  max-width: 700px; margin: 0 auto;
  padding: 48px 24px 64px;
}
.legal-page h1 {
  font-size: 1.6rem; font-weight: 800;
  margin-bottom: 24px; color: var(--text);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.legal-page h2 {
  font-size: 1rem; font-weight: 700;
  margin-top: 28px; margin-bottom: 8px;
  color: var(--text);
}
.legal-page p {
  font-size: .88rem; color: var(--text-dim);
  line-height: 1.7; margin-bottom: 12px;
}
.legal-page a {
  color: var(--blue);
  border-bottom: 1px solid rgba(59,130,246,.3);
  transition: border-color var(--ease);
}
.legal-page a:hover { border-bottom-color: var(--blue); }
.legal-date {
  margin-top: 32px; font-size: .78rem;
  color: var(--text-muted); font-style: italic;
}

/* ─────────── SCROLLBAR ─────────── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--text-muted); }

::selection { background:rgba(0,210,106,.2); color:var(--text); }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width:1100px) {
  .deal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:768px) {
  .header-inner { padding:10px 16px; gap:12px; }
  .header-nav { display:none; }
  .hero { padding:32px 16px 28px; }
  .hero h1 { font-size:1.35rem; }
  .hero-sub { font-size:.85rem; }
  .filters-bar { top:49px; }
  .filters-inner { padding:8px 16px; gap:8px; }
  .filter-group input, .filter-group select { min-width:75px; padding:6px 8px; font-size:.8rem; }
  .main-content { padding:16px 12px 40px; }
  .deal-grid { grid-template-columns:1fr; gap:12px; }
  .new-deal-toast { left:10px; right:10px; top:auto; bottom:10px; }
  .footer-links { gap:14px; }
}
@media (max-width:600px) {
  .card-header { flex-direction:column; }
  .product-image { width:100%; height:120px; }
  .flow-row { grid-template-columns:1fr auto 36px; gap:6px; }
}
@media (max-width:480px) {
  .logo-text { display:none; }
  .stat-pill { padding:4px 8px; font-size:.72rem; }
}
