/* =====================================================================
   BonusFinder - main stylesheet (Bonusscout-inspired)
   ===================================================================== */

:root {
  --bg-1: #0f0f1c;
  --bg-2: #16162f;
  --bg-3: #1b1b3a;
  --bg-4: #201C40;
  --bg-card: linear-gradient(180deg, #2a2a55, #232347);
  --bg-card-2: linear-gradient(145deg, #1b1b3a, #16162f);
  --border: #292836;
  --border-strong: #3a3a77;
  --accent: #13FFC3;
  --accent-2: #00ffc3;
  --accent-3: #7dd3fc;
  --gold-1: #E0BD04;
  --gold-2: #FAE79B;
  --gold-3: #E6B018;
  --text: #ffffff;
  --text-muted: #cbd1e2;
  --text-dim: #d7d7ff;
  --danger: #ff6b6b;
  --success: #13FFC3;
  --radius: 14px;
  --maxw: 1280px;
}

/* -------- Base reset -------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(125, 211, 252, 0.10), transparent 70%),
    radial-gradient(700px 700px at 0% 10%, rgba(19, 255, 195, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent-3); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.container { width: 92%; max-width: var(--maxw); margin: 0 auto; }

/* -------- Header -------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 11, 26, 0.85);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 22px; letter-spacing: -.02em;
  color: var(--text); text-decoration: none;
}
.brand .logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #000; border-radius: 10px;
  font-weight: 900; font-size: 18px;
}
.brand .b-name b { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--text); padding: 9px 14px; border-radius: 8px;
  font-weight: 600; font-size: 14px; opacity: .85;
}
.main-nav a:hover { background: rgba(255,255,255,.05); opacity: 1; }
.main-nav a.active { background: rgba(19, 255, 195, .12); color: var(--accent); }
.country-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  font-weight: 600; font-size: 13px; cursor: pointer;
}
.country-pill:hover { border-color: var(--accent); }

.region-selector {
  position: absolute; top: 100%; right: 4%;
  margin-top: 8px;
  min-width: 240px; max-height: 360px; overflow-y: auto;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px;
  display: none; z-index: 50;
  box-shadow: 0 18px 30px rgba(0,0,0,.45);
}
.region-selector.open { display: block; }
.region-selector a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; color: var(--text);
  font-size: 14px;
}
.region-selector a:hover { background: rgba(19,255,195,.10); color: var(--accent); }

.burger { display: none; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.burger:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 880px) {
  .main-nav { display: none; }
  .burger { display: inline-block; }
}

/* -------- Mobile menu -------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.65); display: none;
}
.mobile-menu.open { display: block; }
.mobile-menu .panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 80%; max-width: 320px;
  background: var(--bg-2); border-left: 1px solid var(--border); padding: 18px;
  overflow-y: auto; animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.mobile-menu .panel a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 12px; border-bottom: 1px solid var(--border);
  color: var(--text); font-weight: 600;
}
.mobile-menu .panel a:hover { color: var(--accent); }
.mobile-menu .panel .close-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text); padding: 8px 12px; border-radius: 8px; margin-bottom: 14px; cursor: pointer;
}

/* -------- Hero -------- */
.hero {
  position: relative; margin: 28px 4vw 0;
  border-radius: 22px; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(13,12,26,.85), rgba(45,18,80,.45)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><defs><pattern id='p' width='24' height='24' patternUnits='userSpaceOnUse'><circle cx='12' cy='12' r='1.2' fill='%2313FFC3' opacity='.25'/></pattern></defs><rect width='200' height='200' fill='url(%23p)'/></svg>"),
    linear-gradient(135deg, #1b1b3a, #2a2a55);
  border: 1px solid var(--border);
}
.hero-inner {
  position: relative; padding: 56px clamp(20px, 6vw, 64px);
  display: flex; flex-direction: column; gap: 28px;
}
.hero-top { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; opacity: .9; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.hero-top span {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: 6px 12px; border-radius: 999px;
}
.hero-title { font-size: clamp(28px, 4vw, 56px); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.02em; max-width: 760px; }
.hero-title b { color: var(--accent); }
.hero-sub { color: var(--text-muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-radius: 12px;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.10);
  color: var(--text); font-weight: 600; text-decoration: none;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.hero-card:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(0,0,0,.7); color: var(--text); }
.hero-card .ico { font-size: 22px; }
.hero .btn-main {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 12px;
  background: var(--accent); color: #001a14; font-weight: 800;
  text-decoration: none; transition: transform .2s;
}
.hero .btn-main:hover { transform: translateY(-2px); background: #5dffe1; color: #001a14; }

/* -------- Section headings -------- */
.section { margin: 60px auto; padding: 0 4vw; max-width: var(--maxw); }
.section h2 {
  font-size: clamp(24px, 3vw, 40px);
  margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em;
}
.section .lead { color: var(--text-muted); margin: 0 0 26px; max-width: 720px; }

/* -------- Filter pills -------- */
.filter-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 28px;
  padding: 6px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  backdrop-filter: blur(8px);
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .15s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text); background: rgba(255,255,255,.05); }
.filter-pill .ico { font-size: 16px; line-height: 1; filter: grayscale(40%); transition: filter .2s ease, transform .2s ease; }
.filter-pill:hover .ico { filter: grayscale(0%); transform: scale(1.1); }
.filter-pill .count {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: rgba(255,255,255,.08); color: var(--text-muted);
  transition: background .2s ease, color .2s ease;
}
.filter-pill:hover .count { background: rgba(255,255,255,.14); color: var(--text); }
.filter-pill.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  color: #001018;
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 6px 18px rgba(19, 255, 195, .25), inset 0 1px 0 rgba(255,255,255,.25);
}
.filter-pill.active .ico { filter: none; transform: scale(1.05); }
.filter-pill.active .count { background: rgba(0,16,24,.18); color: #001018; }
.filter-pill.active:hover { color: #001018; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%); }

@media (max-width: 540px) {
  .filter-bar { width: 100%; justify-content: flex-start; }
  .filter-pill { padding: 8px 14px; font-size: 13px; }
}

/* -------- Casino cards -------- */
.cards-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 980px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-grid { grid-template-columns: 1fr; } }

.casino-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.casino-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(19,255,195,.35);
}
.casino-card .logo {
  display: grid; place-items: center;
  height: 130px; padding: 22px;
  background: linear-gradient(180deg, #3a3a77, #2f2f66);
}
.casino-card .logo img { max-width: 180px; max-height: 80px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.casino-card .body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.casino-card .rating {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13,13,26,.7); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; font-weight: 700; color: var(--accent);
  font-size: 14px; align-self: flex-start;
}
.casino-card .offer { font-weight: 700; font-size: 17px; line-height: 1.3; color: #fff; margin: 0; }
.casino-card .meta { font-size: 13px; color: var(--text-muted); }
.casino-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.casino-card .tag {
  font-size: 11px; padding: 4px 9px; border-radius: 999px;
  background: rgba(125,211,252,.12); color: var(--accent-3); border: 1px solid rgba(125,211,252,.3);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
}
.casino-card .cta { padding: 14px 18px 18px; display: flex; gap: 10px; }
.casino-card .cta .btn-visit {
  flex: 1; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  color: #001018; border: none; font-weight: 800; letter-spacing: .04em; font-size: 13px;
  text-decoration: none; text-align: center;
  transition: filter .2s;
}
.casino-card .cta .btn-visit:hover { filter: brightness(1.06); color: #001018; }
.casino-card .cta .btn-detail {
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 700;
  text-decoration: none;
}
.casino-card .cta .btn-detail:hover { border-color: var(--accent); color: var(--accent); }

/* Rank badge */
.rank-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-1) 24%, var(--gold-2) 50%, var(--gold-3) 70%);
  color: #000; font-weight: 800; font-size: 12px;
  border: 1px solid #47370C;
  box-shadow: 0 6px 18px rgba(224, 189, 4, .35);
  letter-spacing: .04em;
  z-index: 2;
}
.rank-badge.sponsored { background: rgba(19,255,195,.15); color: var(--accent); border: 1px solid var(--accent); box-shadow: none; }
.rank-badge.top { background: rgba(125,211,252,.15); color: var(--accent-3); border: 1px solid var(--accent-3); box-shadow: none; }

.casino-card.best-of-month { border-color: rgba(224,189,4,.4); }
.casino-card.best-of-month .body .rating { background: rgba(13,13,26,.6); }

/* -------- Compare table -------- */
.compare-table-wrap { background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 18px; padding: 18px; overflow-x: auto; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.compare-table th, .compare-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.05); text-align: left; font-size: 14px; }
.compare-table thead th {
  color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 12px;
}
.compare-table tbody tr:hover { background: rgba(255,255,255,.025); }
.compare-table .logo-cell img { max-height: 36px; max-width: 130px; object-fit: contain; }
.compare-table .visit-link {
  padding: 8px 16px; background: linear-gradient(90deg, var(--accent), var(--accent-3));
  color: #001a14; border-radius: 8px; font-weight: 800; font-size: 12px; text-decoration: none;
  display: inline-block;
}

/* -------- Trust section / reviews -------- */
.reviews-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 980px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .reviews-grid { grid-template-columns: 1fr; } }
.review {
  background: rgba(22,20,44,.85); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.review p { font-size: 14px; color: var(--text); margin: 0 0 12px; }
.review .name { font-weight: 800; }
.review .stars { color: #FFD700; letter-spacing: 2px; }

/* -------- Trust stats -------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; text-align: center;
}
.stat b { display: block; font-size: 36px; color: var(--accent); font-weight: 800; line-height: 1; }
.stat span { color: var(--text-muted); font-size: 14px; }

/* -------- Safe gambling banner -------- */
.safe-banner {
  margin: 60px 4vw;
  background: linear-gradient(135deg, rgba(255,107,107,.12), rgba(19,255,195,.08));
  border: 1px solid rgba(255,107,107,.35);
  border-radius: 18px; padding: 28px;
  display: flex; align-items: center; gap: 22px;
  box-shadow: 0 0 0 1px rgba(255,107,107,.15);
}
.safe-banner h3 { margin: 0 0 6px; }
.safe-banner p { margin: 0; color: var(--text-muted); }
.safe-banner .icon { font-size: 40px; }

/* -------- Country selects (grouped) -------- */
.country-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .country-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .country-grid { grid-template-columns: 1fr; } }
.country-group {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
}
.country-group h4 { margin: 0 0 10px; font-size: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.country-group ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.country-group li { padding: 5px 0; }
.country-group a { color: var(--text-muted); font-size: 14px; }
.country-group a:hover { color: var(--accent); }

/* -------- Casino detail (single casino page) -------- */
.casino-detail-hero {
  position: relative;
  background: linear-gradient(135deg, #1b1b3a, #2a2a55);
  border: 1px solid var(--border);
  border-radius: 22px;
  margin: 28px 4vw; padding: 32px;
  display: grid; grid-template-columns: 180px 1fr auto; gap: 24px; align-items: center;
}
@media (max-width: 760px) { .casino-detail-hero { grid-template-columns: 1fr; } }
.casino-detail-hero .logo-big {
  width: 180px; height: 120px; border-radius: 14px;
  background: linear-gradient(180deg, #3a3a77, #2f2f66);
  display: grid; place-items: center; padding: 16px;
}
.casino-detail-hero .logo-big img { max-width: 160px; max-height: 90px; object-fit: contain; }
.casino-detail-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 3vw, 40px); }
.casino-detail-hero .sub { color: var(--text-muted); margin: 0 0 10px; }
.casino-detail-hero .visit-cta {
  background: linear-gradient(90deg, var(--accent), var(--accent-3)); color: #001018;
  padding: 14px 26px; border-radius: 12px; font-weight: 800; text-decoration: none;
}
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card {
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
}
.detail-card h3 { margin: 0 0 12px; font-size: 18px; color: var(--accent); }
.offer-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(0,0,0,.18); margin-bottom: 10px;
}
.offer-row .title { font-weight: 800; }
.offer-row .desc { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.offer-row .meta { color: var(--accent-3); font-size: 12px; margin-top: 6px; }
.offer-row .cta {
  align-self: center; padding: 10px 16px; border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  color: #001018; font-weight: 800; text-decoration: none; font-size: 13px;
}

/* -------- Footer -------- */
.site-footer {
  margin-top: 80px; padding: 50px 4vw 30px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,.35);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; max-width: var(--maxw); margin: 0 auto;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { margin: 0 0 12px; font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.footer-grid a { display: block; padding: 5px 0; color: var(--text-muted); font-size: 14px; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--text-muted); font-size: 14px; }
.footer-bottom {
  max-width: var(--maxw); margin: 30px auto 0; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  color: var(--text-muted); font-size: 13px;
}

/* -------- Popup (bonus ready) -------- */
.popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none;
  align-items: center; justify-content: center; z-index: 300;
}
.popup-overlay.show { display: flex; }
.popup-content {
  width: min(440px, 92vw);
  background: linear-gradient(160deg, #2a2a55, #1b1b3a);
  border: 1px solid var(--border); border-radius: 22px; padding: 28px;
  text-align: center; position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.popup-content .close-popup {
  position: absolute; top: 8px; right: 10px; background: transparent; border: none; color: var(--text); font-size: 22px; cursor: pointer;
}
.popup-content h4 { margin: 0 0 6px; color: var(--accent); }
.popup-content p { color: var(--text-muted); margin: 0 0 18px; }
.popup-content .btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  color: #001018; font-weight: 800; text-decoration: none;
}

/* -------- Utility -------- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.section-divider { height: 1px; background: var(--border); margin: 50px auto; max-width: var(--maxw); }

.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.alert.success { background: rgba(19,255,195,.12); border: 1px solid var(--accent); color: var(--accent); }
.alert.error   { background: rgba(255,107,107,.12); border: 1px solid var(--danger); color: var(--danger); }
