/* 1. CORE VARIABLES & RESET */
:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --border: #eee4d8;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #f59e0b;
  --success: #22c55e;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 100px; 
}

/* 2. HERO & HOW IT WORKS */
.hero {
  max-width: 900px;
  margin: 60px auto 30px;
  padding: 0 20px;
  text-align: center;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1.1;
  margin-bottom: 15px;
}

.hero h1 span { color: var(--accent); display: block; }

.hero p { color: var(--muted); max-width: 600px; margin: 0 auto; }

.how-it-works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
}

/* 3. FILTERS & SEARCH */
.top-filter {
  max-width: 900px;
  margin: 20px auto 10px;
  padding: 0 20px;
  display: flex;
  gap: 8px;
}

.top-btn {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  color: var(--text);
}

/* Target buttons by data-type for specific colors (Border and Text only) */
.top-btn[data-type="Direct Payout"] {
  border-color: var(--success);
  color: var(--success);
}

.top-btn[data-type="Manual Payment"] {
  border-color: var(--danger);
  color: var(--danger);
}

/* Global Active State: Turns button black regardless of data-type */
.top-btn.active { 
  background: black !important; 
  color: white !important; 
  border-color: black !important; 
}

.filter-helper-text {
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.manual-dot { color: var(--danger); }
.direct-dot { color: var(--success); }

.controls {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

#searchInput, .controls select, .controls button {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
  outline: none;
}

#searchInput { flex: 2; min-width: 200px; }
#searchInput:focus { border-color: var(--accent); }
.controls select, .controls button { cursor: pointer; flex: 1; min-width: 140px; }

/* 4. CAMPAIGN CARDS */
.cards {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transform: translateZ(0); 
}

.card-header { display: flex; align-items: center; gap: 12px; }
.card-header img { width: 45px; height: 45px; border-radius: 10px; object-fit: cover; }
.header-text h3 { margin: 0; font-size: 18px; line-height: 1.2; }

.proof-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  display: inline-block;
}

.tag-required { background: #fee2e2; color: var(--danger); }
.tag-direct { background: #dcfce7; color: var(--success); }
.tag-expired { background: #f3f4f6; color: var(--muted); }

.badge {
  margin-left: auto;
  font-size: 11px;
  background: #fff3cd;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.card-body { flex: 1; color: var(--muted); font-size: 14px; }

.card-footer { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.payout { display: flex; justify-content: space-between; align-items: center; }
.payout strong { color: var(--success); font-size: 18px; }

.card a {
  text-align: center;
  padding: 12px;
  background: black;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
}

/* 5. INACTIVE STATE */
.inactive-card {
  border-style: dashed !important;
  background: #fdfdfd !important;
  pointer-events: none;
}

.inactive-card .card-header,
.inactive-card .card-body,
.inactive-card .card-footer {
  filter: grayscale(1) blur(2px);
  -webkit-filter: grayscale(1) blur(2px);
  opacity: 0.35;
}

.inactive-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  color: transparent; 
}

.inactive-overlay::after {
  content: "Campaign Paused";
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  visibility: visible;
}

.btn-disabled { background: #d1d5db !important; color: #9ca3af !important; }

/* 6. FLOATING ACTION BUTTON */
.floating-submit {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: black;
  color: white;
  padding: 14px 24px;
  border-radius: 50px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  z-index: 1000;
}

.floating-submit img { width: 22px; height: 22px; }

/* 7. FOOTER & MOBILE FIXES */
.footer { text-align: center; padding: 40px 20px; font-size: 13px; color: var(--muted); }
.footer a { color: var(--text); font-weight: 500; }

@media (max-width: 600px) {
  .hero h1 { 
    font-size: 36px; 
    white-space: normal; 
    overflow: visible;
    line-height: 1.1;
  }
  
  /* THIS HIDES THE 4 POINTS */
  .how-it-works {
    display: none;
  }

  .top-btn { font-size: 11px; padding: 8px; }
  .floating-submit { bottom: 15px; right: 15px; padding: 12px 20px; font-size: 14px; }
  
  /* THIS HIDES THE BEST FOR FILTER */
  .controls select:last-child {
    display: none;
  }
}