/* ============================================================
   ZenusHub 2.0 — Design System Central
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --accent:        #D4AF37;
  --accent-soft:   #F0CC55;
  --accent-dim:    #8A6F22;
  --accent-glow:   rgba(212, 175, 55, 0.18);
  --accent-glow-sm:rgba(212, 175, 55, 0.08);
  --surface:       rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --border:        rgba(255, 255, 255, 0.06);
  --border-accent: rgba(212, 175, 55, 0.18);
  --border-accent-hover: rgba(212, 175, 55, 0.4);
  --call:  #22c55e;
  --put:   #ef4444;
  --text-muted: rgba(255, 255, 255, 0.35);
}

/* ── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #000;
  color: #F5F5F7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.5); }

/* ── Background Grid ────────────────────────────────────────── */
.zn-grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── Ambient Orbs ───────────────────────────────────────────── */
.zn-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
}
.zn-orb-gold { background: radial-gradient(circle, rgba(212,175,55,0.35), transparent 70%); }
.zn-orb-blue { background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%); }
.zn-orb-purple { background: radial-gradient(circle, rgba(139,92,246,0.12), transparent 70%); }

/* ── Cards ──────────────────────────────────────────────────── */
.zn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.zn-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 1px var(--accent-glow-sm), 0 20px 60px rgba(0,0,0,0.4);
}
.zn-card-accent {
  background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, rgba(0,0,0,0) 60%);
  border: 1px solid var(--border-accent);
}
.zn-card-lift:hover { transform: translateY(-4px); }

/* ── Gradient Border Card ───────────────────────────────────── */
.zn-card-glow {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
}
.zn-card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(212,175,55,0.3), rgba(255,255,255,0.04) 50%, rgba(212,175,55,0.1));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.zn-card-glow:hover::before { opacity: 1; }

/* ── Buttons ────────────────────────────────────────────────── */
.zn-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  border-radius: 14px;
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 0 24px var(--accent-glow);
  text-decoration: none;
}
.zn-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.zn-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 40px var(--accent-glow); }
.zn-btn:hover::after { left: 150%; }
.zn-btn:active { transform: scale(0.97); }

.zn-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 14px;
  padding: 13px 24px;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.zn-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow-sm);
}

.zn-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  font-size: 13px;
  border-radius: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.zn-btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  background: var(--surface-hover);
}

/* ── Inputs ─────────────────────────────────────────────────── */
.zn-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
.zn-input:focus {
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
  background: rgba(255,255,255,0.06);
}
.zn-input::placeholder { color: rgba(255,255,255,0.2); }

/* ── Badges ─────────────────────────────────────────────────── */
.zn-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.zn-badge-gold    { background: rgba(212,175,55,0.12); color: #D4AF37; border: 1px solid rgba(212,175,55,0.25); }
.zn-badge-green   { background: rgba(34,197,94,0.1);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.zn-badge-red     { background: rgba(239,68,68,0.1);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.zn-badge-blue    { background: rgba(59,130,246,0.1); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.zn-badge-gray    { background: rgba(255,255,255,0.06); color: #9ca3af; border: 1px solid rgba(255,255,255,0.1); }

/* ── Stat Card ──────────────────────────────────────────────── */
.zn-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.zn-stat:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

/* ── Page Header ────────────────────────────────────────────── */
.zn-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Sidebar Link ───────────────────────────────────────────── */
.zn-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.zn-nav-link:hover {
  color: #fff;
  background: var(--surface-hover);
}
.zn-nav-link.active {
  color: #fff;
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.12);
}
.zn-nav-link.active .zn-nav-icon { color: var(--accent); }
.zn-nav-link .zn-nav-indicator {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Progress Bar ───────────────────────────────────────────── */
.zn-progress {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.zn-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--accent-soft));
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes znFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
@keyframes znPulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(212,175,55,0); }
}
@keyframes znShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes znScan {
  from { top: -10%; }
  to   { top: 110%; }
}
@keyframes znFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes znFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes znSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes znRotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes znGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes znLivePulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}
@keyframes znBorderGlow {
  0%, 100% { border-color: rgba(212,175,55,0.15); }
  50%       { border-color: rgba(212,175,55,0.45); }
}

/* ── Utility Classes ────────────────────────────────────────── */
.zn-float      { animation: znFloat 6s ease-in-out infinite; }
.zn-pulse-gold { animation: znPulseGold 2s ease-in-out infinite; }
.zn-fade-up    { animation: znFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) both; }
.zn-fade-in    { animation: znFadeIn 0.5s ease both; }
.zn-slide-in   { animation: znSlideIn 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.zn-live-dot   { animation: znLivePulse 1.5s ease-in-out infinite; }
.zn-border-glow{ animation: znBorderGlow 3s ease-in-out infinite; }

.zn-gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft), #fff, var(--accent-soft));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: znGradientShift 5s ease infinite;
}

.zn-shimmer-text {
  background: linear-gradient(90deg, var(--accent-dim) 0%, var(--accent) 40%, var(--accent-soft) 60%, var(--accent-dim) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: znShimmer 3s linear infinite;
}

/* ── Glass ──────────────────────────────────────────────────── */
.zn-glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
}
.zn-glass-darker {
  background: rgba(255,255,255,0.015);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 16px;
}

/* ── Scan Line ──────────────────────────────────────────────── */
.zn-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent), 0 0 28px var(--accent-glow);
  animation: znScan 1.8s linear infinite;
  z-index: 20;
  pointer-events: none;
}

/* ── Corner Brackets ────────────────────────────────────────── */
.zn-corner { position: absolute; width: 22px; height: 22px; }
.zn-corner-tl { top: 12px; left: 12px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); border-radius: 4px 0 0 0; }
.zn-corner-tr { top: 12px; right: 12px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); border-radius: 0 4px 0 0; }
.zn-corner-bl { bottom: 12px; left: 12px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); border-radius: 0 0 0 4px; }
.zn-corner-br { bottom: 12px; right: 12px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); border-radius: 0 0 4px 0; }

/* ── Number Counter ─────────────────────────────────────────── */
.zn-counter { font-variant-numeric: tabular-nums; }

/* ── Stagger Delays ─────────────────────────────────────────── */
.zn-delay-1 { animation-delay: 0.1s; }
.zn-delay-2 { animation-delay: 0.2s; }
.zn-delay-3 { animation-delay: 0.3s; }
.zn-delay-4 { animation-delay: 0.4s; }
.zn-delay-5 { animation-delay: 0.5s; }
.zn-delay-6 { animation-delay: 0.6s; }

/* ── Safe area mobile ───────────────────────────────────────── */
.safe-area-inset-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* ── Selection ──────────────────────────────────────────────── */
::selection { background: rgba(212,175,55,0.25); color: #fff; }

/* ── Tour guiado (Driver.js) + modal pós-quiz ───────────────── */
body.zh-modal-open { overflow: hidden; }

.zh-post-quiz-backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.zh-post-quiz-card {
  animation: zhModalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes zhModalIn {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .zh-post-quiz-card { animation: none !important; }
}

.driver-active-element {
  outline: 2px solid rgba(212, 175, 55, 0.9) !important;
  outline-offset: 4px !important;
  border-radius: 12px;
}

.zh-driver-popover.driver-popover {
  background: rgba(10, 10, 10, 0.98) !important;
  border: 1px solid rgba(212, 175, 55, 0.28) !important;
  border-radius: 20px !important;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  max-width: min(360px, calc(100vw - 32px)) !important;
}

.zh-driver-popover .driver-popover-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #fff !important;
}

.zh-driver-popover .driver-popover-description {
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.zh-driver-popover .driver-popover-description strong {
  color: var(--accent-soft);
  font-weight: 600;
}

.zh-driver-popover .driver-popover-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  margin-top: 12px !important;
  padding-top: 12px !important;
}

.zh-driver-popover .driver-popover-prev-btn,
.zh-driver-popover .driver-popover-next-btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 12px !important;
}

.zh-driver-popover .driver-popover-next-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft)) !important;
  color: #000 !important;
  border: none !important;
}

.zh-driver-popover .driver-popover-prev-btn {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

.zh-driver-popover .driver-popover-close-btn {
  color: rgba(255, 255, 255, 0.4) !important;
}

.zh-driver-popover .driver-popover-progress-text {
  color: rgba(212, 175, 55, 0.75) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}
