/* funheap.com — Game Heap Design System */
/* Layout: Left sidebar nav + Right content */
/* Prefix: fh- | Dark gaming aesthetic */

:root {
  --fh-bg: #0a0a14;
  --fh-sidebar: #0d0d1d;
  --fh-surface: #141428;
  --fh-surface-hover: #1a1a35;
  --fh-card: #161630;
  --fh-border: #252545;
  --fh-text: #d8d8e8;
  --fh-text-dim: #7878a0;
  --fh-text-bright: #f0f0ff;
  --fh-accent: #00e0a0;
  --fh-accent-glow: rgba(0, 224, 160, 0.12);
  --fh-card-gold: #e0a800;
  --fh-board-blue: #4090e0;
  --fh-puzzle-purple: #a060e0;
  --fh-arcade-red: #e04060;
  --fh-radius: 12px;
  --fh-radius-sm: 8px;
  --fh-sidebar-w: 200px;
}

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

html {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--fh-bg);
  color: var(--fh-text);
  scroll-behavior: smooth;
}

/* ── Layout: Sidebar + Main ── */
.fh-app {
  display: flex;
  min-height: 100vh;
}
.fh-sidebar {
  width: var(--fh-sidebar-w);
  background: var(--fh-sidebar);
  border-right: 1px solid var(--fh-border);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}
.fh-main {
  margin-left: var(--fh-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Sidebar ── */
.fh-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--fh-accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  padding: 0 20px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--fh-border);
  margin-bottom: 16px;
}
.fh-logo-icon {
  width: 34px; height: 34px;
  background: var(--fh-accent);
  border-radius: var(--fh-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.fh-sidebar-section {
  padding: 8px 20px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fh-text-dim);
  font-weight: 700;
  margin-top: 12px;
}
.fh-sidebar-nav { list-style: none; padding: 0; }
.fh-sidebar-nav li { margin: 2px 0; }
.fh-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  color: var(--fh-text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.fh-sidebar-nav a:hover {
  color: var(--fh-text-bright);
  background: rgba(255,255,255,0.03);
  border-left-color: var(--fh-border);
}
.fh-sidebar-nav a.active {
  color: var(--fh-accent);
  background: var(--fh-accent-glow);
  border-left-color: var(--fh-accent);
}
.fh-nav-count {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--fh-text-dim);
  background: var(--fh-surface);
  padding: 1px 7px;
  border-radius: 10px;
}
.fh-sidebar-nav a .fh-nav-icon { font-size: 1.1rem; width: 22px; text-align: center; }

.fh-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--fh-border);
}
.fh-lang-btn {
  width: 100%;
  background: var(--fh-surface);
  border: 1px solid var(--fh-border);
  color: var(--fh-text);
  padding: 8px 12px;
  border-radius: var(--fh-radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  text-align: center;
}
.fh-lang-btn:hover { border-color: var(--fh-accent); color: var(--fh-accent); }
.fh-sidebar-stats {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--fh-text-dim);
  justify-content: center;
}
.fh-sidebar-stats span { background: var(--fh-surface); padding: 3px 8px; border-radius: 4px; }

/* ── Language Dropdown ── */
.fh-lang-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 8px;
  right: 8px;
  background: var(--fh-surface);
  border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius-sm);
  max-height: 260px;
  overflow-y: auto;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.fh-lang-dropdown.fh-show { display: block; }
.fh-lang-item {
  display: block;
  padding: 8px 14px;
  color: var(--fh-text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.fh-lang-item:hover {
  color: var(--fh-text-bright);
  background: rgba(255,255,255,0.04);
  border-left-color: var(--fh-accent);
}
.fh-lang-item.active {
  color: var(--fh-accent);
  background: var(--fh-accent-glow);
  border-left-color: var(--fh-accent);
}
.fh-sidebar-footer { position: relative; }

/* ── Top bar (inside main) ── */
.fh-topbar {
  background: rgba(10,10,20,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fh-border);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}
.fh-breadcrumb {
  font-size: 0.85rem;
  color: var(--fh-text-dim);
  display: flex;
  gap: 8px;
}
.fh-breadcrumb a { color: var(--fh-text-dim); text-decoration: none; }
.fh-breadcrumb a:hover { color: var(--fh-accent); }
.fh-mobile-menu { display: none; }

/* ── Content Area ── */
.fh-content { padding: 24px 28px 40px; flex: 1; }
.fh-content-inner { max-width: 1100px; }

/* ── Hero (only on homepage) ── */
.fh-hero {
  text-align: center;
  padding: 48px 0 36px;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,224,160,0.05) 0%, transparent 60%);
}
.fh-hero h1 { font-size: 2.4rem; font-weight: 900; color: var(--fh-text-bright); letter-spacing: -0.5px; }
.fh-hero h1 span { color: var(--fh-accent); }
.fh-hero p { font-size: 1rem; color: var(--fh-text-dim); max-width: 500px; margin: 12px auto 0; line-height: 1.6; }
.fh-hero-stats { display: flex; justify-content: center; gap: 36px; margin-top: 24px; }
.fh-stat { text-align: center; }
.fh-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--fh-accent); }
.fh-stat-label { font-size: 0.8rem; color: var(--fh-text-dim); margin-top: 2px; }

/* ── Section Titles ── */
.fh-section-title {
  font-size: 1.3rem; font-weight: 700; color: var(--fh-text-bright);
  margin: 28px 0 16px; display: flex; align-items: center; gap: 10px;
}
.fh-section-title::before {
  content: ''; width: 3px; height: 20px;
  background: var(--fh-accent); border-radius: 2px;
}

/* ── Game Grid ── */
.fh-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.fh-game-card {
  background: var(--fh-card);
  border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius);
  padding: 18px;
  text-decoration: none;
  color: var(--fh-text);
  transition: all 0.25s;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; overflow: hidden;
}
.fh-game-card:hover {
  border-color: var(--fh-accent);
  background: var(--fh-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0,224,160,0.08);
}
.fh-game-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--fh-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.fh-game-card-icon.card { background: rgba(224,168,0,0.15); }
.fh-game-card-icon.board { background: rgba(64,144,224,0.15); }
.fh-game-card-icon.puzzle { background: rgba(160,96,224,0.15); }
.fh-game-card-icon.arcade { background: rgba(224,64,96,0.15); }
.fh-game-card-name { font-weight: 700; font-size: 0.95rem; color: var(--fh-text-bright); }
.fh-game-card-desc { font-size: 0.78rem; color: var(--fh-text-dim); line-height: 1.4; }
.fh-game-card-tag {
  display: inline-block; padding: 2px 9px; border-radius: 50px;
  font-size: 0.7rem; font-weight: 600; align-self: flex-start;
}
.fh-game-card-tag.card { background: rgba(224,168,0,0.18); color: var(--fh-card-gold); }
.fh-game-card-tag.board { background: rgba(64,144,224,0.18); color: var(--fh-board-blue); }
.fh-game-card-tag.puzzle { background: rgba(160,96,224,0.18); color: var(--fh-puzzle-purple); }
.fh-game-card-tag.arcade { background: rgba(224,64,96,0.18); color: var(--fh-arcade-red); }

/* ── Game Play Page ── */
.fh-game-page { padding: 24px 0; max-width: 800px; }
.fh-game-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.fh-game-console {
  background: var(--fh-card); border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius); padding: 6px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.3);
}
.fh-game-console canvas { display: block; width: 100%; border-radius: 6px; background: #0a6e3e; }
.fh-game-tabs {
  display: flex; gap: 4px; margin-top: 16px;
  border-bottom: 1px solid var(--fh-border); padding-bottom: 8px;
}
.fh-game-tab {
  padding: 7px 16px; border-radius: 6px 6px 0 0;
  color: var(--fh-text-dim); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
}
.fh-game-tab:hover, .fh-game-tab.active { color: var(--fh-accent); background: var(--fh-accent-glow); }

/* ── Footer ── */
.fh-footer {
  padding: 20px 32px; border-top: 1px solid var(--fh-border);
  color: var(--fh-text-dim); font-size: 0.78rem;
  display: flex; gap: 20px;
}
.fh-footer a { color: var(--fh-text-dim); text-decoration: none; }
.fh-footer a:hover { color: var(--fh-accent); }

/* ── Responsive ── */
@media (max-width: 700px) {
  .fh-sidebar { display: none; position: fixed; z-index: 200; }
  .fh-sidebar.open { display: flex; }
  .fh-main { margin-left: 0; }
  .fh-mobile-menu { display: block; background: none; border: none; color: var(--fh-text); font-size: 1.3rem; cursor: pointer; }
  .fh-content { padding: 20px 16px; }
  .fh-hero h1 { font-size: 1.6rem; }
  .fh-game-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ── Breadcrumb ── */
.fh-breadcrumb { margin-bottom:12px; }
.fh-breadcrumb ol { list-style:none; padding:0; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.fh-breadcrumb li { color:var(--fh-text-dim); font-size:0.8rem; }
.fh-breadcrumb li:not(:last-child)::after { content:'/'; margin-left:6px; color:var(--fh-border); }
.fh-breadcrumb a { color:var(--fh-accent,#0e0); text-decoration:none; }
.fh-breadcrumb a:hover { text-decoration:underline; }
.fh-breadcrumb li[aria-current] { color:var(--fh-text-bright); font-weight:600; }

/* ── FAQ ── */
.fh-faq { margin-top:32px; padding:20px; background:var(--fh-surface,#1a1a2e); border-radius:8px; border:1px solid var(--fh-border,#333); }
.fh-faq h2 { color:var(--fh-text-bright); font-size:1.2rem; margin-bottom:16px; }
.fh-faq-item { margin-bottom:16px; }
.fh-faq-item h3 { color:var(--fh-accent,#0e0); font-size:0.95rem; margin-bottom:4px; }
.fh-faq-item p { color:var(--fh-text-dim); font-size:0.9rem; line-height:1.6; margin:0; }

/* ── Related Games ── */
.fh-related { margin-top:40px; padding-top:24px; border-top:1px solid var(--fh-border,#333); }
.fh-related h2 { margin-left:0; padding-left:0; }

/* ── SEO Content ── */
.fh-seo-content { margin-top:32px; padding-top:24px; border-top:1px solid var(--fh-border,#333); color:var(--fh-text-dim); font-size:0.9rem; line-height:1.8; max-width:720px; }
.fh-seo-content h2 { color:var(--fh-text-bright); font-size:1.15rem; margin:24px 0 12px; }
.fh-seo-content h3 { color:var(--fh-accent,#0e0); font-size:1rem; margin:20px 0 8px; }
.fh-seo-content p { margin:0 0 12px; }
.fh-seo-content ul, .fh-seo-content ol { margin:0 0 16px; padding-left:20px; }
.fh-seo-content li { margin:4px 0; }
.fh-seo-content a { color:var(--fh-accent,#0e0); text-decoration:underline; }
.fh-seo-content strong { color:var(--fh-text-bright); }
