/*
Theme Name: ChinaSide
Theme URI: https://chinaside.gg
Author: ChinaSide Team
Author URI: https://chinaside.gg
Description: Your ultimate China finds resource. Guides, spreadsheets, and agent links.
Version: 7.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chinaside
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #080608;
  --bg-card:      #0f0c14;
  --bg-card2:     #141020;
  --border:       #1e1530;
  --border-hover: #2e2248;
  --text:         #eee8f5;
  --text-muted:   #7b6a9a;
  --text-light:   #4a3a6a;
  --accent:       #9b5cf6;
  --accent-dim:   rgba(155,92,246,0.10);
  --accent-glow:  rgba(155,92,246,0.25);
  --accent-dark:  #7c3aed;
  --cta-bg:       #ffffff;
  --cta-text:     #1a0a3a;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow:       0 2px 16px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 40px rgba(0,0,0,0.7);
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; line-height: 1.65; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.cf-wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── HEADER ─────────────────────────────────────────────── */
.cf-header { position: sticky; top: 0; z-index: 100; background: rgba(8,6,8,0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.cf-header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.cf-logo { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.cf-logo .dot-gg { color: var(--accent); }
.cf-nav { display: flex; align-items: center; gap: 2px; }
.cf-nav a { font-size: 14px; font-weight: 500; color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius); transition: var(--transition); }
.cf-nav a:hover { color: var(--accent); background: var(--accent-dim); }

/* ── HERO ───────────────────────────────────────────────── */
.cf-hero { padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden; }
.cf-hero::before {
  content: ''; position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(155,92,246,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.cf-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); border: 1px solid rgba(155,92,246,0.25);
  border-radius: 20px; padding: 6px 16px;
  font-size: 12px; font-weight: 500; color: var(--accent); margin-bottom: 28px;
}
.cf-hero-badge::before { content: '●'; font-size: 7px; }

.cf-hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 7.5vw, 86px);
  font-weight: 800; line-height: 1.04;
  letter-spacing: -2px; color: var(--text); margin-bottom: 22px;
  animation: fadeUp 0.5s cubic-bezier(0.4,0,0.2,1) both;
}
.cf-hero-title .highlight { color: var(--accent); font-weight: 900; }
.cf-hero-title em { font-style: normal; color: var(--text-muted); font-weight: 300; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cf-hero-sub {
  font-size: 17px; color: var(--text-muted);
  max-width: 500px; margin: 0 auto 40px;
  font-weight: 400; line-height: 1.72;
  animation: fadeUp 0.5s 0.08s cubic-bezier(0.4,0,0.2,1) both;
}
.cf-hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.5s 0.16s cubic-bezier(0.4,0,0.2,1) both;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.cf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: var(--radius-lg); font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; white-space: nowrap; }
.cf-btn-primary { background: var(--cta-bg); color: var(--cta-text); box-shadow: 0 2px 14px rgba(255,255,255,0.15); }
.cf-btn-primary:hover { background: #f0e8ff; transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255,255,255,0.2); color: var(--cta-text); }
.cf-btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.cf-btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ── STATS ──────────────────────────────────────────────── */
.cf-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-card); padding: 28px 0; }
.cf-stats-inner { display: flex; justify-content: center; gap: 72px; flex-wrap: wrap; }
.cf-stat { text-align: center; }
.cf-stat-num { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--accent); letter-spacing: -1px; display: block; }
.cf-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 3px; }

/* ── SECTION ────────────────────────────────────────────── */
.cf-section { padding: 80px 0; }
.cf-section-label { font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.cf-section-title { font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -1px; color: var(--text); margin-bottom: 10px; line-height: 1.1; }
.cf-section-title strong { font-weight: 800; color: var(--accent); }
.cf-section-sub { font-size: 15px; color: var(--text-muted); max-width: 480px; line-height: 1.7; }
.cf-section-header { margin-bottom: 48px; }

/* ── FEATURES ───────────────────────────────────────────── */
.cf-features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.cf-feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px 28px; transition: var(--transition); cursor: pointer; }
.cf-feature-card:hover { border-color: var(--accent); background: var(--bg-card2); transform: translateY(-2px); box-shadow: 0 4px 24px var(--accent-glow); }
.cf-feature-icon { font-size: 26px; margin-bottom: 14px; display: block; }
.cf-feature-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.cf-feature-desc { font-size: 14px; color: var(--text-muted); line-height: 1.65; }
.cf-feature-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--accent); transition: gap var(--transition); }
.cf-feature-link:hover { gap: 8px; }

/* ── DIVIDER ────────────────────────────────────────────── */
.cf-divider { height: 1px; background: var(--border); }

/* ── CTA BANNER ─────────────────────────────────────────── */
.cf-cta-banner { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 64px 48px; text-align: center; margin: 0 0 80px; position: relative; overflow: hidden; }
.cf-cta-banner::before { content: ''; position: absolute; top: -80px; left: 50%; transform: translateX(-50%); width: 700px; height: 400px; background: radial-gradient(ellipse, rgba(155,92,246,0.10) 0%, transparent 65%); pointer-events: none; }
.cf-cta-title { font-family: var(--font-display); font-size: clamp(28px,5vw,50px); font-weight: 700; color: var(--text); letter-spacing: -1.5px; margin-bottom: 12px; position: relative; line-height: 1.1; }
.cf-cta-title .highlight { color: var(--accent); font-weight: 800; }
.cf-cta-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 40px; position: relative; }
.cf-cta-agents { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; position: relative; }
.cf-cta-agent-btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: var(--radius-lg); background: var(--bg-card2); border: 1px solid var(--border); font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text-muted); transition: var(--transition); text-decoration: none; white-space: nowrap; min-width: 140px; justify-content: center; }
.cf-cta-agent-btn img { width: 24px; height: 24px; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; flex-shrink: 0; }
.cf-cta-agent-btn:hover { border-color: var(--accent); color: var(--text); background: var(--accent-dim); transform: translateY(-3px); box-shadow: 0 6px 20px var(--accent-glow); text-decoration: none; }
.cf-cta-agent-btn.primary { background: var(--cta-bg); color: var(--cta-text); border-color: var(--cta-bg); font-weight: 700; box-shadow: 0 2px 14px rgba(255,255,255,0.2); }
.cf-cta-agent-btn.primary:hover { background: #f0e8ff; color: var(--cta-text); box-shadow: 0 6px 24px rgba(255,255,255,0.25); }
.cf-cta-recommended-label { display: block; font-size: 9px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── FOOTER ─────────────────────────────────────────────── */
.cf-footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 56px 0 32px; }

.cf-footer-inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  align-items: start;
}

.cf-footer-brand { }
.cf-footer-logo { display: inline-block; margin-bottom: 14px; }
.cf-footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.65; max-width: 240px; }

.cf-footer-col h4 {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  color: var(--text); margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.cf-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cf-footer-col ul a { font-size: 13px; color: var(--text-muted); transition: color var(--transition); }
.cf-footer-col ul a:hover { color: var(--accent); }

.cf-footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
}
.cf-footer-bottom p { font-size: 12px; color: var(--text-light); }
.cf-disclaimer { font-size: 11px; color: var(--text-light); max-width: 480px; text-align: right; }

/* ── PAGE TEMPLATES ─────────────────────────────────────── */
.cf-page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--border); margin-bottom: 56px; }
.cf-page-hero h1 { font-family: var(--font-display); font-size: clamp(32px,5vw,56px); font-weight: 700; letter-spacing: -1.5px; color: var(--text); margin-bottom: 12px; line-height: 1.1; }
.cf-page-hero h1 strong { font-weight: 800; color: var(--accent); }
.cf-page-hero p { font-size: 16px; color: var(--text-muted); max-width: 520px; line-height: 1.7; }

/* ── LINK CONVERTER ─────────────────────────────────────── */
.cf-converter-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px; margin-bottom: 48px; }
.cf-converter-form { display: flex; gap: 12px; align-items: stretch; }
.cf-input { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; font-family: var(--font-body); font-size: 14px; color: var(--text); outline: none; transition: var(--transition); min-width: 0; }
.cf-input::placeholder { color: var(--text-light); }
.cf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.cf-converter-results { display: none; }
.cf-converter-results.active { display: block; }
.cf-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 32px; }
.cf-result-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; transition: var(--transition); text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cf-result-card:hover { border-color: var(--accent); background: var(--bg-card2); transform: translateY(-3px); text-decoration: none; }
.cf-result-logo-wrap { width: 48px; height: 48px; border-radius: var(--radius); background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cf-result-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cf-result-logo-placeholder { width: 48px; height: 48px; border-radius: var(--radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cf-result-logo-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.cf-result-name { font-family: var(--font-display); font-size: 13px; font-weight: 500; color: var(--text); }
.cf-result-cta { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(155,92,246,0.2); padding: 4px 10px; border-radius: 20px; }
.cf-converter-hint { font-size: 12px; color: var(--text-light); margin-top: 12px; text-align: center; }
.cf-converter-hint code { color: var(--accent); background: var(--accent-dim); padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.cf-source-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-dim); border: 1px solid rgba(155,92,246,0.2); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 16px; }

/* ── AGENT CARDS ────────────────────────────────────────── */
.cf-agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cf-agent-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px 20px 20px; text-align: center; transition: var(--transition); text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cf-agent-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--accent); background: var(--bg-card2); text-decoration: none; }
.cf-agent-logo-wrap { width: 80px; height: 80px; border-radius: var(--radius-lg); background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.cf-agent-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cf-agent-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--text); }
.cf-agent-badge { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--bg-card2); color: var(--text-muted); border: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.5px; }
.cf-agent-badge.recommended { background: var(--accent-dim); color: var(--accent); border-color: rgba(155,92,246,0.25); }
.cf-agent-badge.hot { background: rgba(245,158,11,0.1); color: #F59E0B; border-color: rgba(245,158,11,0.25); }
.cf-agent-badge.reliable { background: rgba(255,255,255,0.04); color: var(--text-muted); border-color: var(--border); }
.cf-agent-cta { margin-top: 4px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.cf-agent-card:hover .cf-agent-cta { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cf-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .cf-footer-brand { grid-column: 1 / -1; }
  .cf-footer-brand p { max-width: 100%; }
  .cf-features-grid { grid-template-columns: repeat(2,1fr); }
  .cf-cta-agent-btn { min-width: 120px; }
}

@media (max-width: 640px) {
  .cf-hero { padding: 60px 0 48px; }
  .cf-hero-title { letter-spacing: -1.5px; }
  .cf-features-grid { grid-template-columns: 1fr; }
  .cf-agents-grid { grid-template-columns: repeat(2,1fr); }
  .cf-stats-inner { gap: 32px; }
  .cf-nav { display: none; }
  .cf-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cf-footer-brand { grid-column: 1 / -1; }
  .cf-footer-bottom { flex-direction: column; text-align: center; }
  .cf-disclaimer { text-align: center; max-width: 100%; }
  .cf-cta-banner { padding: 40px 20px; }
  .cf-cta-agent-btn { min-width: calc(50% - 6px); font-size: 13px; padding: 11px 12px; }
  .cf-converter-box { padding: 24px 16px; }
  .cf-converter-form { flex-direction: column; }
  .cf-results-grid { grid-template-columns: repeat(2,1fr); }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .cf-wrap { padding: 0 32px; }
  .cf-hero { padding: 80px 0 64px; }
}
