/* ============================================================
   FUN PAGE — Sammy Haidar Hassan
   ============================================================ */

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

:root {
  --bg:       #0a0a0a;
  --surface:  #111111;
  --card:     #161616;
  --border:   #222222;
  --border2:  #2e2e2e;
  --text:     #f0f0f0;
  --muted:    #737373;
  --accent:   #ffffff;
  --gold:     #f5c842;
  --silver:   #a8a8a8;
  --bronze:   #cd7f32;
  --sans:     'Space Grotesk', sans-serif;
  --mono:     'Space Mono', monospace;
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t:        0.35s var(--ease);
  --t-fast:   0.18s ease;
}

html { scroll-behavior: smooth; cursor: none; font-size: 16px; }
*, *::before, *::after { cursor: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.6;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); }
::selection { background: #fff; color: #000; }

/* ============================================================ CURSOR */
#cursor {
  position: fixed; width: 7px; height: 7px; background: #fff; border-radius: 50%;
  pointer-events: none; z-index: 10001; transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, box-shadow 0.25s ease;
}
#cursor-follower {
  position: fixed; width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 50%;
  pointer-events: none; z-index: 10000; transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
body.c-hover #cursor { width: 11px; height: 11px; box-shadow: 0 0 10px 4px rgba(255,255,255,0.55); }
body.c-hover #cursor-follower { width: 48px; height: 48px; border-color: rgba(255,255,255,0.7); }
@media (pointer: coarse) {
  html { cursor: auto; }
  #cursor, #cursor-follower { display: none; }
}

/* ============================================================ CLICKBAIT */
.click-bait { margin-top: 48px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.clickbait-btn {
  background: #fff; border: none; color: #000;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em;
  padding: 8px 18px; border-radius: 100px; cursor: pointer;
  transition: opacity var(--t-fast);
}
.clickbait-btn:hover { opacity: 0.85; }
.clickbait-msg {
  font-size: 0.85rem; color: var(--muted); font-style: italic;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.clickbait-msg.visible { opacity: 1; transform: none; }

/* ============================================================ BACK BANNER */
#back-banner {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 900; pointer-events: none;
}
@media (pointer: coarse) { #back-banner { display: none; } }
.back-banner-inner {
  display: flex; align-items: center; gap: 20px;
  background: rgba(22,22,22,0.92); backdrop-filter: blur(16px);
  border: 1px solid var(--border2); border-radius: 100px;
  padding: 12px 16px 12px 24px;
  font-size: 0.82rem; color: var(--muted); white-space: nowrap;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
#back-banner.visible .back-banner-inner { opacity: 1; transform: none; }
.back-banner-btn {
  background: #fff; color: #000; text-decoration: none;
  font-size: 0.78rem; font-weight: 600; padding: 8px 18px;
  border-radius: 100px; letter-spacing: 0.04em;
  transition: opacity var(--t-fast);
  white-space: nowrap;
}
.back-banner-btn:hover { opacity: 0.85; }

/* ============================================================ NAV */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 24px 48px; display: flex; align-items: center;
  justify-content: space-between;
  transition: padding var(--t), background var(--t), border-color var(--t);
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  padding: 14px 48px;
  background: rgba(10,10,10,0.88);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}
.nav-logo {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  letter-spacing: 0.2em; color: #fff; text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-back {
  font-size: 0.82rem; color: var(--muted); text-decoration: none;
  letter-spacing: 0.04em; transition: color var(--t-fast);
  border: 1px solid var(--border2); padding: 8px 18px; border-radius: 100px;
}
.nav-back:hover { color: #fff; border-color: rgba(255,255,255,0.3); }

.lang-toggle { display: flex; align-items: center; gap: 6px; }
.lang-btn {
  background: none; border: none; font-family: var(--mono); font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.12em; color: var(--muted);
  cursor: pointer; padding: 5px 2px; transition: color var(--t-fast); line-height: 1;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--text); }
.lang-sep { font-family: var(--mono); font-size: 0.65rem; color: var(--border2); }

.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  border-radius: 6px; transition: color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover { color: var(--text); background: rgba(128,128,128,0.1); }
.icon-sun, .icon-moon { display: block; pointer-events: none; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }

/* ============================================================ LIGHT MODE */
[data-theme="light"] {
  --bg:      #f7f7f7;
  --surface: #eeeeee;
  --card:    #ffffff;
  --border:  #dedede;
  --border2: #cccccc;
  --text:    #0f0f0f;
  --muted:   #565656;
  --accent:  #000000;
}

body, #navbar, .section, footer,
.ranking-card, .fact-card, .take-card, .status-card, .moment-item {
  transition: background-color 0.35s ease, color 0.35s ease,
              border-color 0.35s ease, box-shadow 0.35s ease !important;
}

[data-theme="light"] ::selection { background: #000; color: #fff; }
[data-theme="light"] #cursor { background: #000; }
[data-theme="light"] #cursor-follower { border-color: rgba(0,0,0,0.28); }
[data-theme="light"] body.c-hover #cursor { box-shadow: 0 0 10px 4px rgba(0,0,0,0.25); }
[data-theme="light"] body.c-hover #cursor-follower { border-color: rgba(0,0,0,0.65); }

[data-theme="light"] #navbar.scrolled { background: rgba(255,255,255,0.92); }
[data-theme="light"] .nav-logo { color: #000; }
[data-theme="light"] .nav-back:hover { color: #000; border-color: rgba(0,0,0,0.3); }

[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.045) 1px, transparent 1px);
}
[data-theme="light"] .hero-title .outline { -webkit-text-stroke: 2px rgba(0,0,0,0.82); }
[data-theme="light"] .clickbait-btn { background: #000; color: #fff; }
[data-theme="light"] .back-banner-btn { background: #000; color: #fff; }

/* ============================================================ HERO */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding: 140px 48px 100px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 75%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; width: 100%;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border2); padding: 7px 16px; border-radius: 100px;
  font-size: 0.8rem; color: var(--muted); margin-bottom: 36px;
  letter-spacing: 0.04em;
}
.tag-emoji { font-size: 1rem; }
.hero-title {
  font-size: clamp(3.5rem, 8vw, 8rem);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,0.85);
}
.blink-dot { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted);
  margin-bottom: 40px; font-weight: 300; max-width: 580px; line-height: 1.7;
}
.hero-scroll-hint {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.12em; animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================ LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.section { padding: 120px 0; }
.section-dark { background: var(--surface); }
.text-center { text-align: center; }

.section-header { margin-bottom: 72px; }
.section-tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase; display: block;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 0.95rem; color: var(--muted); font-style: italic;
}

/* ============================================================ REVEAL */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================ FUN FACTS */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}
.fact-card {
  padding: 36px 32px; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  position: relative;
}
.fact-card:hover { background: var(--card); }
.fact-num {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  letter-spacing: 0.12em; display: block; margin-bottom: 14px;
}
.fact-card p {
  font-size: 0.98rem; line-height: 1.65; color: var(--text);
}
.fact-card p strong { color: #fff; }
[data-theme="light"] .fact-card p strong { color: #000; }
.fact-link { color: #000; text-decoration: underline; font-weight: 700; }
.fact-link:hover { opacity: 0.65; }

/* ============================================================ PERSONALITY STATS */
.stat-bars { display: flex; flex-direction: column; gap: 28px; max-width: 760px; }
.stat-row { display: flex; flex-direction: column; gap: 10px; }
.stat-info { display: flex; justify-content: space-between; align-items: baseline; }
.stat-label { font-size: 0.9rem; color: var(--text); max-width: 80%; line-height: 1.4; }
.stat-val { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); flex-shrink: 0; }
.stat-bar {
  height: 2px; background: var(--border2); border-radius: 2px; overflow: hidden;
}
.stat-fill {
  height: 100%; width: 0%; background: #fff;
  transition: width 1s var(--ease);
  border-radius: 2px;
}
.stat-fill.danger { background: #ef4444; }
.stat-fill.low    { background: #737373; }
[data-theme="light"] .stat-fill:not(.danger):not(.low) { background: #000; }

.mute-btn {
  background: none; border: 1px solid var(--border2); border-radius: 50%;
  width: 22px; height: 22px; font-size: 0.65rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast);
  vertical-align: middle; margin-left: 6px; line-height: 1;
}
.mute-btn:hover { border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.06); }

.stat-bar.no-clip { overflow: visible; }
.stat-fill.overflow-fill {
  background: linear-gradient(to right, #ff0000, #ff7700, #ffff00, #00cc00, #0000ff, #8b00ff) !important;
  background-size: 200% 100%;
  animation: rainbow-shift 3s linear infinite;
  -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
  mask-image: linear-gradient(to right, black 75%, transparent 100%);
}
@keyframes rainbow-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ============================================================ RANKINGS */
.rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.ranking-card {
  border: 1px solid var(--border); padding: 40px 36px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ranking-card:hover { border-color: var(--border2); background: var(--card); }
.ranking-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 36px;
}
.ranking-icon { display: flex; align-items: center; }
.ranking-icon img { width: 32px; height: 32px; object-fit: contain; display: block; }
.ranking-icon img.icon-light { display: none; }
[data-theme="light"] .ranking-icon img.icon-dark  { display: none; }
[data-theme="light"] .ranking-icon img.icon-light { display: block; }
.ranking-header h3 { font-size: 1.2rem; font-weight: 700; }
.ranking-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.ranking-list li {
  display: flex; align-items: flex-start; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.ranking-list li:last-child { border-bottom: none; padding-bottom: 0; }
.rank-pos {
  font-family: var(--mono); font-size: 0.9rem; font-weight: 700;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid var(--border2);
  color: var(--muted); font-size: 0.72rem;
}
.rank-pos.gold   { border-color: var(--gold);   color: var(--gold); }
.rank-pos.silver { border-color: var(--silver); color: var(--silver); }
.rank-pos.bronze { border-color: var(--bronze); color: var(--bronze); }
.rank-info { display: flex; flex-direction: column; gap: 3px; }
.rank-info strong { font-size: 0.95rem; color: #fff; }
[data-theme="light"] .rank-info strong { color: #000; }
.rank-info small { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }

/* ============================================================ MOMENTS */
.moments-list { display: flex; flex-direction: column; gap: 0; }
.moment-item {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 40px; padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.moment-item:first-child { border-top: 1px solid var(--border); }
.moment-rank { font-size: 2.5rem; padding-top: 4px; }
.moment-content { display: flex; flex-direction: column; gap: 12px; }
.moment-year {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.moment-content h3 {
  font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em;
}
.moment-content p {
  font-size: 0.97rem; color: var(--muted); line-height: 1.75; max-width: 620px;
}
.moment-content p em { color: var(--text); font-style: italic; }
.moment-tag {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  letter-spacing: 0.1em; margin-top: 8px;
}
.moment-placeholder .moment-content h3 { color: var(--muted); }
.moment-placeholder .moment-rank { opacity: 0.4; }

/* ============================================================ HOT TAKES */
.takes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
}
.take-card {
  padding: 36px 32px; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
  transition: background var(--t-fast);
}
.take-card:hover { background: var(--card); }
.take-heat { font-size: 1rem; }
.take-card p {
  font-size: 0.97rem; line-height: 1.65; color: var(--text);
  font-style: italic;
}

/* ============================================================ STATUS DASHBOARD */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.status-card {
  display: flex; align-items: flex-start; gap: 20px;
  border: 1px solid var(--border); padding: 32px 28px;
  transition: border-color var(--t-fast);
}
.status-card:hover { border-color: var(--border2); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px;
  animation: pulse-dot 2.2s ease-in-out infinite;
}
.dot-green  { background: #4ade80; }
.dot-yellow { background: #facc15; }
.dot-red    { background: #f87171; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}
.status-body { display: flex; flex-direction: column; gap: 8px; }
.status-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
}
.status-body p { font-size: 0.93rem; color: var(--text); line-height: 1.6; }

/* ============================================================ BACK SECTION */
.back-section { padding: 100px 0; }
.back-text {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #000; text-decoration: none;
  font-size: 0.88rem; font-weight: 600; padding: 14px 28px;
  border-radius: 100px; letter-spacing: 0.05em;
  transition: opacity var(--t-fast);
  border: none; font-family: var(--sans);
}
.btn-primary:hover { opacity: 0.85; }
.back-footnote {
  font-size: 0.82rem; color: var(--muted); margin-top: 20px;
  font-style: italic;
}

/* ============================================================ FOOTER */
footer {
  border-top: 1px solid var(--border); padding: 32px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.footer-logo {
  font-family: var(--mono); font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.2em; color: var(--muted);
}
footer p { font-size: 0.78rem; color: var(--muted); }
.footer-top {
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted);
  text-decoration: none; transition: color var(--t-fast);
}
.footer-top:hover { color: #fff; }

/* ============================================================ RESPONSIVE */
@media (max-width: 768px) {
  .stat-bar.no-clip { overflow: hidden; }

  #navbar { padding: 18px 24px; }
  #navbar.scrolled { padding: 14px 24px; }
  .container { padding: 0 24px; }
  #hero { padding: 120px 24px 80px; }
  .section { padding: 80px 0; }
  .hero-title { font-size: clamp(2.8rem, 12vw, 5rem); }
  .facts-grid { grid-template-columns: 1fr; }
  .rankings-grid { grid-template-columns: 1fr; }
  .takes-grid { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .moment-item { grid-template-columns: 1fr; gap: 16px; }
  .moment-rank { font-size: 2rem; }
}

/* ============================================================ UNDER CONSTRUCTION */
.uc-section { display: block; }
.uc-container {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 16px; padding: 80px 0;
}
.uc-tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
  border: 1px solid var(--border2); padding: 6px 14px; border-radius: 100px;
}
.uc-msg {
  font-family: var(--sans); font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.02em; color: var(--text);
}
.uc-sub { font-size: 0.95rem; color: var(--muted); }
