/* ==========================================================================
   Funzop Cosmic Dark Design System — 100% Custom Bespoke Theme
   ========================================================================== */

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

:root {
  --fz-bg-dark: #070b15;
  --fz-bg-surface: rgba(15, 23, 42, 0.85);
  --fz-bg-card: rgba(26, 35, 62, 0.65);
  --fz-border: rgba(255, 255, 255, 0.12);
  --fz-border-glow: rgba(99, 102, 241, 0.4);

  --fz-primary: #6366f1;
  --fz-primary-hover: #4f46e5;
  --fz-accent: #8b5cf6;
  --fz-cyan: #06b6d4;
  --fz-gold: #f59e0b;
  --fz-pink: #ec4899;
  --fz-green: #10b981;

  --fz-text-main: #f8fafc;
  --fz-text-muted: #94a3b8;
}

* { box-sizing: border-box; }

body.fz-dark-theme, .fz-portal-body {
  background-color: var(--fz-bg-dark) !important;
  color: var(--fz-text-main) !important;
  font-family: 'Inter', sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient Background Orbs ────────────────────────────────────────────── */
.fz-ambient-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.fz-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  animation: orbPulse 10s infinite alternate ease-in-out;
}

.fz-orb-1 { top: -100px; left: -100px; width: 500px; height: 500px; background: #6366f1; }
.fz-orb-2 { top: 40%; right: -150px; width: 600px; height: 600px; background: #8b5cf6; }
.fz-orb-3 { bottom: -100px; left: 30%; width: 550px; height: 550px; background: #06b6d4; }

@keyframes orbPulse {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(30px, 40px); }
}

/* ── Navbar Header ──────────────────────────────────────────────────────── */
.fz-navbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(10, 15, 29, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fz-border);
  padding: 14px 24px;
}

.fz-navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.fz-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.fz-logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.8));
}

.fz-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}

.fz-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fz-nav-links a {
  color: var(--fz-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fz-nav-links a:hover, .fz-nav-links a.active {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.fz-header-reward-badge {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 30px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
  transition: all 0.3s ease;
}

.fz-header-reward-badge:hover {
  border-color: #f59e0b;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.fz-gold-icon { color: #f59e0b; font-size: 1.2rem; }
.fz-arrow-icon { color: var(--fz-text-muted); font-size: 0.8rem; }

.fz-reward-info { display: flex; flex-direction: column; }
.fz-reward-title { font-size: 0.72rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.fz-reward-stats { font-size: 0.85rem; color: #fff; font-weight: 800; }

/* ── Master Canvas & Container ─────────────────────────────────────────── */
.fz-main-container {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 20px;
}

/* ── Text Gradients & Glass Cards ──────────────────────────────────────── */
.fz-text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fz-glass-panel {
  background: var(--fz-bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--fz-border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* ── Hero Banner ────────────────────────────────────────────────────────── */
.fz-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 27, 75, 0.95));
  border: 1px solid var(--fz-border-glow);
  border-radius: 24px;
  padding: 40px;
  margin-bottom: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.fz-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  margin: 12px 0;
  line-height: 1.15;
  color: #fff;
}

.fz-hero-sub {
  color: var(--fz-text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 620px;
  margin-bottom: 24px;
}

.fz-hero-cta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.fz-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.fz-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
}

.fz-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid var(--fz-border);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.fz-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ── Category Filters & Search Bar ──────────────────────────────────────── */
.fz-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.fz-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fz-cat-pill {
  background: rgba(30, 41, 59, 0.7);
  color: var(--fz-text-muted);
  border: 1px solid var(--fz-border);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fz-cat-pill:hover, .fz-cat-pill.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.fz-search-box {
  position: relative;
  min-width: 280px;
}

.fz-search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--fz-border);
  border-radius: 30px;
  padding: 12px 20px 12px 46px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}

.fz-search-box input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.fz-search-box i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

/* ── 3D Game Cards Grid ─────────────────────────────────────────────────── */
.fz-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.fz-game-card {
  background: var(--fz-bg-card);
  border: 1px solid var(--fz-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.fz-game-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #6366f1;
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.fz-card-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.fz-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.fz-game-card:hover .fz-card-thumb img {
  transform: scale(1.1);
}

.fz-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.fz-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.fz-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: #fff;
}

.fz-card-desc {
  font-size: 0.88rem;
  color: var(--fz-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fz-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.fz-card-rating {
  font-size: 0.85rem;
  color: #f59e0b;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fz-btn-play {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fz-btn-play:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

/* ── Game Arena Modal ───────────────────────────────────────────────────── */
.fz-arena-modal-content {
  background: #0f172a;
  border: 1px solid var(--fz-border-glow);
  border-radius: 20px;
  width: 90vw;
  max-width: 1100px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
}

.fz-arena-header {
  background: #070b15;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--fz-border);
}

.fz-arena-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.fz-arena-actions { display: flex; gap: 10px; }
.fz-arena-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}
.fz-arena-btn:hover { background: #6366f1; }

.fz-arena-frame-container {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.fz-arena-frame-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.fz-footer {
  background: #070b15;
  border-top: 1px solid var(--fz-border);
  padding: 40px 24px 24px 24px;
  margin-top: 80px;
}

.fz-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.fz-footer-brand { max-width: 400px; }
.fz-footer-sub { color: var(--fz-text-muted); font-size: 0.92rem; line-height: 1.6; margin-top: 12px; }

.fz-footer-links { display: flex; gap: 24px; }
.fz-footer-links a { color: var(--fz-text-muted); text-decoration: none; font-weight: 600; }
.fz-footer-links a:hover { color: #6366f1; }

.fz-footer-bottom { text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 24px; color: #64748b; font-size: 0.88rem; }
