@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

/* ============================================================
   PeopleConnections — shared theme
   ============================================================ */

:root {
  --bg: #080810;
  --bg2: #0f0f1a;
  --bg3: #161628;
  --surface: #1c1c30;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --text: #f0efff;
  --muted: #8d8cab;
  --pink: #ff3d7f;
  --pink-glow: rgba(255,61,127,0.35);
  --violet: #7c3aed;
  --violet-soft: rgba(124,58,237,0.12);
  --pink-soft: rgba(255,61,127,0.12);
  --danger: #ff5c5c;
  --radius: 16px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-headline: 'Space Grotesk', 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: 0.4;
}

.orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; }
.orb-1 { width:600px;height:600px;background:rgba(124,58,237,0.12);top:-200px;left:-200px;animation:orbDrift1 18s ease-in-out infinite; }
.orb-2 { width:500px;height:500px;background:rgba(255,61,127,0.10);top:20%;right:-150px;animation:orbDrift2 22s ease-in-out infinite; }
.orb-3 { width:400px;height:400px;background:rgba(6,182,212,0.08);bottom:10%;left:20%;animation:orbDrift3 16s ease-in-out infinite; }
@keyframes orbDrift1 { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(60px,40px) scale(1.05)} 66%{transform:translate(-30px,70px) scale(0.95)} }
@keyframes orbDrift2 { 0%,100%{transform:translate(0,0) scale(1)} 40%{transform:translate(-80px,50px) scale(1.08)} 70%{transform:translate(40px,-30px) scale(0.96)} }
@keyframes orbDrift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(50px,-60px) scale(1.06)} }

nav { position:fixed;top:0;left:0;right:0;z-index:100;padding:16px 0; }
.nav-inner { width:min(95%,1200px);margin:0 auto;display:flex;align-items:center;justify-content:space-between;background:rgba(8,8,16,0.7);backdrop-filter:blur(20px);border:1px solid var(--border2);border-radius:999px;padding:10px 8px 10px 24px;gap:8px; }
.logo { font-family:var(--font-display);font-weight:800;font-size:1.1rem;letter-spacing:-0.5px;flex-shrink:0; }
.logo .dot { color:var(--pink); }
.nav-links { display:flex;gap:2px;font-size:0.82rem;font-weight:500; }
.nav-links a { padding:7px 11px;border-radius:999px;color:var(--muted);transition:color 0.2s,background 0.2s;white-space:nowrap; }
.nav-links a:hover { color:var(--text);background:rgba(255,255,255,0.06); }
.nav-cta { display:inline-flex;align-items:center;gap:8px;background:var(--pink);color:#fff;font-weight:600;font-size:0.85rem;padding:9px 18px;border-radius:999px;transition:transform 0.2s,box-shadow 0.2s;white-space:nowrap;flex-shrink:0; }
.nav-cta:hover { transform:translateY(-2px);box-shadow:0 6px 24px var(--pink-glow); }
.nav-donate { display:inline-flex;align-items:center;gap:6px;font-size:0.82rem;font-weight:500;color:var(--muted);padding:7px 10px;border-radius:999px;transition:color 0.2s;white-space:nowrap;flex-shrink:0; }
.nav-donate:hover { color:var(--text); }
.nav-login { font-size:0.85rem;font-weight:500;color:var(--muted);padding:9px 12px;transition:color 0.2s;white-space:nowrap;flex-shrink:0; }
.nav-login:hover { color:#fff; }
@media (max-width:1050px) { .nav-links { display:none; } }

.btn-primary, .btn-hero { display:inline-flex;align-items:center;gap:8px;background:var(--pink);color:#fff;font-weight:600;font-size:1rem;padding:15px 30px;border-radius:14px;transition:transform 0.2s,box-shadow 0.2s;box-shadow:0 4px 30px var(--pink-glow); }
.btn-primary:hover, .btn-hero:hover { transform:translateY(-3px) scale(1.02);box-shadow:0 12px 48px rgba(255,61,127,0.6); }
.btn-ghost { display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);border:1px solid var(--border2);color:var(--text);font-weight:500;font-size:1rem;padding:15px 30px;border-radius:14px;transition:transform 0.15s,background 0.15s; }
.btn-ghost:hover { transform:translateY(-2px);background:rgba(255,255,255,0.09); }
.btn-danger { display:inline-flex;align-items:center;gap:8px;background:transparent;color:var(--danger);border:1px solid rgba(255,92,92,0.25);font-weight:500;font-size:0.85rem;padding:9px 18px;border-radius:10px;transition:background 0.2s,border-color 0.2s; }
.btn-danger:hover { background:rgba(255,92,92,0.08);border-color:rgba(255,92,92,0.5); }

.wrap { width:min(92%,1100px);margin:0 auto; }
.section-eyebrow { font-size:0.75rem;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--pink);margin-bottom:12px; }
.section-title { font-family:var(--font-headline);font-size:clamp(2rem,4vw,3.2rem);font-weight:700;letter-spacing:-1px;line-height:1.08;margin-bottom:16px; }
.section-sub { color:var(--muted);font-size:1.05rem;line-height:1.75;max-width:520px;margin-bottom:60px;font-weight:300; }

@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.reveal { opacity:0;transform:translateY(24px);transition:opacity 0.6s ease,transform 0.6s ease; }
.reveal.visible { opacity:1;transform:translateY(0); }

footer { position:relative;z-index:1;padding:36px 0 28px;border-top:1px solid var(--border); }
.footer-inner { width:min(92%,1100px);margin:0 auto;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap; }
.footer-logo { font-family:var(--font-display);font-weight:800;font-size:1rem; }
.footer-logo .dot { color:var(--pink); }
.footer-links { display:flex;gap:20px;font-size:0.85rem;color:var(--muted); }
.footer-links a { transition:color 0.2s; }
.footer-links a:hover { color:var(--text); }
.footer-copy { font-size:0.82rem;color:var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   LIGHT THEME
   ============================================================ */

[data-theme="light"] .stat-text strong { color: var(--text); }

html[data-theme="light"] {
  --bg: #f6f5fb;
  --bg2: #efedf7;
  --bg3: #ffffff;
  --surface: #ffffff;
  --border: rgba(24,22,58,0.08);
  --border2: rgba(24,22,58,0.16);
  --text: #1b1a2e;
  --muted: #605e7d;
  --pink: #e8256f;
  --pink-glow: rgba(232,37,111,0.28);
  --pink-soft: rgba(232,37,111,0.10);
  --violet: #6d28d9;
  --violet-soft: rgba(109,40,217,0.10);
  --danger: #d92d3f;
}

html[data-theme="light"] body::before { opacity: 0.18; }
html[data-theme="light"] .orb-1 { background: rgba(109,40,217,0.10); }
html[data-theme="light"] .orb-2 { background: rgba(232,37,111,0.09); }
html[data-theme="light"] .orb-3 { background: rgba(6,182,212,0.08); }

html[data-theme="light"] .nav-inner,
html[data-theme="light"] .site-nav .nav-inner { background: rgba(255,255,255,0.8); border-color: var(--border2); }
html[data-theme="light"] .nav-links a:hover { background: rgba(24,22,58,0.06); }
html[data-theme="light"] .nav-login:hover,
html[data-theme="light"] .nav-donate:hover { color: var(--text); }
html[data-theme="light"] .nav-logo,
html[data-theme="light"] .logo { color: var(--text); }
html[data-theme="light"] .nav-links a { color: var(--muted); }
html[data-theme="light"] .nav-links a:hover { color: var(--text); }

html[data-theme="light"] .btn-ghost { background: rgba(24,22,58,0.05); }
html[data-theme="light"] .btn-ghost:hover { background: rgba(24,22,58,0.09); }

/* Frosted panels — hardcoded-dark surfaces get a light equivalent here */
html[data-theme="light"] .dash-wrap,
html[data-theme="light"] .profile-header,
html[data-theme="light"] .comments-section,
html[data-theme="light"] .post-box,
html[data-theme="light"] .auth-wrap,
html[data-theme="light"] .shoutout-card,
html[data-theme="light"] .add-video-box {
  background: rgba(255,255,255,0.82);
  border-color: var(--border2);
}

/* Solid cards */
html[data-theme="light"] .support-card,
html[data-theme="light"] .game-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .feat-card,
html[data-theme="light"] .priv-card,
html[data-theme="light"] .sf-item,
html[data-theme="light"] .demo-card,
html[data-theme="light"] .cta-box,
html[data-theme="light"] .cta-inner,
html[data-theme="light"] .stats-card,
html[data-theme="light"] .login-prompt,
html[data-theme="light"] .activity-bar,
html[data-theme="light"] .event-banner,
html[data-theme="light"] .showcase-canvas,
html[data-theme="light"] .hd-label {
  background: #ffffff;
  border-color: var(--border2);
  box-shadow: 0 4px 20px rgba(24,22,58,0.06);
}

html[data-theme="light"] .dash-btn-quiet,
html[data-theme="light"] .card-btn,
html[data-theme="light"] .demo-btn,
html[data-theme="light"] .action-quiet,
html[data-theme="light"] .follow-btn-unfollow,
html[data-theme="light"] .tool-chip,
html[data-theme="light"] .comment-item,
html[data-theme="light"] .stat,
html[data-theme="light"] .search-input,
html[data-theme="light"] .comment-form textarea,
html[data-theme="light"] .post-box textarea,
html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="password"] {
  background: rgba(24,22,58,0.04);
  border-color: var(--border2);
  color: var(--text);
}
html[data-theme="light"] .dash-btn-quiet:hover,
html[data-theme="light"] .action-quiet:hover { background: rgba(24,22,58,0.08); }

html[data-theme="light"] .stats-bar { background: rgba(24,22,58,0.03); }
html[data-theme="light"] .stat-num { background: none; -webkit-text-fill-color: var(--text); color: var(--text); }

html[data-theme="light"] .canvas-frame,
html[data-theme="light"] .card-preview,
html[data-theme="light"] .demo-thumb,
html[data-theme="light"] .potd-bg { background: #111119; }

html[data-theme="light"] .love-btn-unloved,
html[data-theme="light"] .love-btn-loved,
html[data-theme="light"] .love-btn-owner,
html[data-theme="light"] .potd-content {
  background: rgba(255,255,255,0.92);
  color: var(--text);
  border-color: var(--border2);
}
html[data-theme="light"] .potd-username { color: var(--text); }
html[data-theme="light"] .share-toast { background: #ffffff; color: var(--text); }

/* ============================================================
   LIGHT MODE — second pass (legacy selectors kept for compatibility)
   ============================================================ */

[data-theme="light"] {
  --bg: #f4f3f9;
  --bg2: #ffffff;
  --bg3: #ffffff;
  --surface: #ffffff;
  --border: rgba(24,24,48,0.08);
  --border2: rgba(24,24,48,0.15);
  --text: #1c1b2e;
  --muted: #63627e;
  --pink: #e6316f;
  --pink-glow: rgba(230,49,111,0.25);
  --pink-soft: rgba(230,49,111,0.10);
  --violet: #6d28d9;
  --violet-soft: rgba(109,40,217,0.10);
  --danger: #d93636;
}

[data-theme="light"] body::before { opacity: 0.18; }
[data-theme="light"] .orb { opacity: 0.55; }
[data-theme="light"] .hero h1 .line1,
[data-theme="light"] .hero h1 .line3 { color: #2b2151; }

[data-theme="light"] .nav-inner { background: rgba(255,255,255,0.8); border-color: var(--border2); }
[data-theme="light"] .nav-logo, [data-theme="light"] .logo { color: var(--text); }
[data-theme="light"] .nav-links a, [data-theme="light"] .nav-login, [data-theme="light"] .nav-donate { color: var(--muted); }
[data-theme="light"] .nav-links a:hover { color: var(--text); background: rgba(24,24,48,0.06); }
[data-theme="light"] .nav-login:hover, [data-theme="light"] .nav-donate:hover { color: var(--text); }

[data-theme="light"] .dash-wrap,
[data-theme="light"] .stats-card,
[data-theme="light"] .post-box,
[data-theme="light"] .shoutout-card,
[data-theme="light"] .comments-section,
[data-theme="light"] .profile-header,
[data-theme="light"] .support-card,
[data-theme="light"] .login-prompt,
[data-theme="light"] .profile-card,
[data-theme="light"] .game-card,
[data-theme="light"] .potd-content,
[data-theme="light"] .cta-inner,
[data-theme="light"] .cta-box,
[data-theme="light"] .feat-card,
[data-theme="light"] .priv-card,
[data-theme="light"] .sf-item,
[data-theme="light"] .demo-card,
[data-theme="light"] .hd-label,
[data-theme="light"] .hero-demo-card,
[data-theme="light"] .comment-item,
[data-theme="light"] .event-banner,
[data-theme="light"] .activity-bar,
[data-theme="light"] .auth-wrap,
[data-theme="light"] .add-video-box {
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(24,24,48,0.08);
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] textarea,
[data-theme="light"] .search-input {
  background: rgba(24,24,48,0.04);
  color: var(--text);
}
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .search-input:focus { background: var(--pink-soft); }

[data-theme="light"] .btn-ghost,
[data-theme="light"] .dash-btn-quiet,
[data-theme="light"] .action-quiet,
[data-theme="light"] .card-btn,
[data-theme="light"] .demo-btn,
[data-theme="light"] .tool-chip,
[data-theme="light"] .follow-btn-unfollow {
  background: rgba(24,24,48,0.05);
  color: var(--text);
}
[data-theme="light"] .btn-ghost:hover,
[data-theme="light"] .dash-btn-quiet:hover,
[data-theme="light"] .action-quiet:hover { background: rgba(24,24,48,0.09); }

[data-theme="light"] .stat-num {
  background: linear-gradient(135deg, #1c1b2e, rgba(28,27,46,0.6));
  -webkit-background-clip: text; background-clip: text;
}

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.13);
  background: transparent; color: inherit;
  font-size: 0.95rem; cursor: pointer; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { transform: translateY(-1px); background: rgba(255,255,255,0.08); }
[data-theme="light"] .theme-toggle { border-color: var(--border2); }
[data-theme="light"] .theme-toggle:hover { background: rgba(24,24,48,0.06); }

body { transition: background 0.3s ease, color 0.3s ease; }

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 720px) {
  .orb { filter: blur(60px); opacity: 0.6; }
  .orb-1 { width: 320px; height: 320px; }
  .orb-2 { width: 300px; height: 300px; }
  .orb-3 { width: 260px; height: 260px; }
  .section-sub { font-size: 0.98rem; margin-bottom: 36px; line-height: 1.65; }
  .section-title { line-height: 1.12; }
  .btn-primary, .btn-hero, .btn-ghost { width: 100%; justify-content: center; padding: 15px 24px; font-size: 1rem; }
  .footer-inner { flex-direction: column; text-align: center; gap: 14px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }
}

@media (max-width: 400px) {
  .section-title { font-size: 1.7rem; }
  .wrap { width: 92%; }
}
