:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #1a1d24;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #0ea5e9;
  --gold: #f59e0b;
  --green: #10b981;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; cursor: pointer; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 18px;
}
nav.main { display: flex; align-items: center; gap: 22px; }
nav.main a, nav.main button {
  font-size: 15px; font-weight: 500; color: var(--muted);
  background: none; border: none; cursor: pointer;
  transition: color .15s;
}
nav.main a:hover, nav.main button:hover { color: var(--ink); }
.lang-btn {
  border: 1px solid var(--brand) !important;
  color: var(--brand) !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #fff !important;
}
.lang-btn:hover { background: var(--brand) !important; color: #fff !important; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cbd5e1; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #d97706; }
.btn-gold span { font-weight: 800; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.vip-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f; font-weight: 700; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff; padding: 72px 0 80px;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 16px; }
.hero h1 .grad { background: linear-gradient(90deg, #60a5fa, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { font-size: 18px; color: rgba(255,255,255,.82); max-width: 620px; margin-bottom: 28px; }
.hero .stats { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.hero .stat b { font-size: 30px; font-weight: 800; display: block; }
.hero .stat span { font-size: 14px; color: rgba(255,255,255,.7); }
.hero .deco { position: absolute; right: -100px; top: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(96,165,250,.15); filter: blur(60px); }

/* Search bar */
.searchbar { margin-top: -28px; position: relative; z-index: 3; }
.searchbar .inner {
  background: var(--card); border-radius: 14px; padding: 14px;
  box-shadow: var(--shadow); display: flex; gap: 10px;
}
.searchbar input {
  flex: 1; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; font-size: 15px; outline: none;
}
.searchbar input:focus { border-color: var(--brand); }

/* Category pills */
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0 8px; }
.cat-pill {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: all .15s;
  color: var(--muted);
}
.cat-pill:hover { border-color: var(--brand); color: var(--brand); }
.cat-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Section */
section.sec { padding: 44px 0; }
.sec .sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sec .sec-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.sec .sec-head .more { font-size: 14px; color: var(--brand); font-weight: 600; cursor: pointer; }

/* Report grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card .cover { height: 160px; background: linear-gradient(135deg, #e0e7ff, #f0f4ff); display: grid; place-items: center; position: relative; overflow: hidden; }
.card .cover .cat-tag {
  position: absolute; top: 12px; left: 12px; background: rgba(15,23,42,.8); color: #fff;
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px;
}
.card .cover .big { font-size: 46px; font-weight: 800; color: rgba(59,130,246,.35); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .body .title { font-weight: 700; font-size: 16px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .body .desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); margin-top: auto; }
.card .meta .free { color: var(--green); font-weight: 600; }
.card .meta .lock { color: var(--gold); font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 60px 20px; }

/* Detail */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.detail-main { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 32px; }
.detail-main h1 { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.detail-main .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-main .tag { background: #eef2ff; color: var(--brand); font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 6px; }
.detail-main .summary { font-size: 16px; color: #374151; margin-bottom: 24px; padding: 16px; background: #f9fafb; border-left: 3px solid var(--brand); border-radius: 8px; }
.detail-main .desc { font-size: 15px; color: #4b5563; white-space: pre-wrap; }
.detail-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.side-box { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px; }
.side-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.locked-note {
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: #92400e;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px;
  margin-bottom: 12px;
}
.price-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.price-row .p { font-size: 32px; font-weight: 800; color: var(--brand); }
.price-row .cur { font-size: 16px; font-weight: 600; color: var(--muted); }
.meta-list { font-size: 13px; color: var(--muted); }
.meta-list div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.meta-list div:last-child { border-bottom: none; }

/* Auth modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; display: grid; place-items: center; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.modal .hint { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; font-size: 15px; outline: none; }
.field input:focus { border-color: var(--brand); }
.form-err { color: #dc2626; font-size: 13px; margin-bottom: 10px; }
.form-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }
.form-switch a { color: var(--brand); font-weight: 600; cursor: pointer; }

/* Paypage / pricing */
.pricing { display: flex; justify-content: center; }
.price-card { background: #fff; border-radius: 18px; border: 2px solid var(--brand); box-shadow: 0 10px 40px rgba(37,99,235,.15); max-width: 460px; width: 100%; padding: 36px; text-align: center; }
.price-card .p-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.price-card .p-amount { font-size: 56px; font-weight: 800; color: var(--ink); margin: 8px 0 2px; }
.price-card .p-amount small { font-size: 20px; color: var(--muted); font-weight: 600; }
.price-card .p-desc { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.feat-list { text-align: left; margin: 0 auto 24px; max-width: 320px; }
.feat-list li { list-style: none; padding: 8px 0; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.feat-list li::before { content: '✓'; color: var(--green); font-weight: 800; }

/* Admin */
.admin-page { padding: 40px 0; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tab { padding: 9px 18px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; }
.admin-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--line); }
.admin-table th { background: #f9fafb; font-weight: 700; color: var(--muted); }
.admin-table tr:hover td { background: #fafbfc; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-box { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 20px; box-shadow: var(--shadow); }
.stat-box .n { font-size: 30px; font-weight: 800; color: var(--brand); }
.stat-box .l { font-size: 13px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; font-size: 14px; font-family: inherit; outline: none; min-height: 90px; resize: vertical; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1a1d24; color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s;
}
.toast.show { opacity: 1; }

footer.site { background: #0f172a; color: #94a3b8; padding: 40px 0; margin-top: 40px; }
footer.site .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
footer.site a { display: block; font-size: 13px; margin: 5px 0; color: #94a3b8; }
footer.site a:hover { color: #fff; }
.copyright { text-align: center; padding-top: 24px; font-size: 12px; color: #64748b; border-top: 1px solid #1e293b; margin-top: 24px; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  nav.main a.hide-m { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
}
