/* ============================================================
   premium.css — BotHost Platform premium layer (v1)
   Loaded AFTER style.css. Purely additive: existing classes
   keep working. Contains animations, loading UI, glow effects.
   ============================================================ */

:root {
  --gz-accent: #6366f1;
  --gz-accent-2: #06b6d4;
  --gz-glow: 0 10px 40px rgba(99, 102, 241, .35);
  --gz-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------------------------------------------------
   Brand logo (replaces the emoji in navbars/brand)
   ------------------------------------------------------------ */
.brand-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  vertical-align: -6px;
  margin-right: .35rem;
  transition: transform .5s var(--gz-ease);
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, .45));
}
.navbar-brand:hover .brand-logo,
.admin-sidebar .brand:hover .brand-logo { transform: rotate(8deg) scale(1.08); }
.brand-logo.lg { width: 64px; height: 64px; border-radius: 16px; }

/* ------------------------------------------------------------
   Full-page loading overlay (auto-injected by premium.js)
   ------------------------------------------------------------ */
#gzLoader {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  background: var(--bg, #f4f6fb);
  transition: opacity .45s ease, visibility .45s ease;
}
[data-theme="dark"] #gzLoader { background: #0f1117; }
#gzLoader.gz-done { opacity: 0; visibility: hidden; pointer-events: none; }

#gzLoader .gz-loader-ring {
  width: 74px; height: 74px; position: relative;
  animation: gz-pop .6s var(--gz-ease) both;
}
#gzLoader .gz-loader-ring img { position: absolute; inset: 11px; width: 52px; height: 52px; border-radius: 14px; }
#gzLoader .gz-loader-ring svg { position: absolute; inset: 0; animation: gz-spin 1s linear infinite; }
@keyframes gz-spin { to { transform: rotate(360deg); } }
@keyframes gz-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }

#gzLoader .gz-loader-text {
  font-weight: 700; font-size: .82rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--muted);
  animation: gz-breathe 1.4s ease-in-out infinite;
}
@keyframes gz-breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

#gzLoader .gz-loader-track {
  width: 190px; height: 4px; border-radius: 4px; overflow: hidden;
  background: rgba(99, 102, 241, .15);
}
#gzLoader .gz-loader-track i {
  display: block; height: 100%; width: 40%; border-radius: 4px;
  background: linear-gradient(90deg, var(--gz-accent), var(--gz-accent-2));
  animation: gz-track 1.1s var(--gz-ease) infinite;
}
@keyframes gz-track { 0% { transform: translateX(-110%); } 100% { transform: translateX(500%); } }

/* ------------------------------------------------------------
   Slim top progress bar (page navigation + AJAX)
   ------------------------------------------------------------ */
#gzBar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  z-index: 100000; border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--gz-accent), var(--gz-accent-2), #ec4899);
  box-shadow: 0 0 12px rgba(99, 102, 241, .8);
  transition: width .25s ease, opacity .4s ease .3s;
  opacity: 0; pointer-events: none;
}
#gzBar.gz-on { opacity: 1; }

/* ------------------------------------------------------------
   Scroll-reveal + entrance animations
   ------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(26px) scale(.98); transition: opacity .7s var(--gz-ease), transform .7s var(--gz-ease); transition-delay: var(--gz-d, 0ms); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

@keyframes gz-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.gz-enter { animation: gz-fade-up .55s var(--gz-ease) both; }

/* ------------------------------------------------------------
   Floating gradient orbs (injected behind content)
   ------------------------------------------------------------ */
.gz-orb {
  position: fixed; border-radius: 50%; filter: blur(70px);
  z-index: -1; pointer-events: none; opacity: .5;
  animation: gz-float 14s ease-in-out infinite alternate;
}
.gz-orb.o1 { width: 420px; height: 420px; left: -120px; top: -80px; background: radial-gradient(circle, rgba(99,102,241,.35), transparent 65%); }
.gz-orb.o2 { width: 380px; height: 380px; right: -100px; top: 30%; background: radial-gradient(circle, rgba(6,182,212,.30), transparent 65%); animation-delay: -5s; }
.gz-orb.o3 { width: 340px; height: 340px; left: 30%; bottom: -140px; background: radial-gradient(circle, rgba(236,72,153,.22), transparent 65%); animation-delay: -9s; }
@keyframes gz-float {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.12); }
}

/* ------------------------------------------------------------
   Buttons: animated gradient + shine + ripple + loading state
   ------------------------------------------------------------ */
.btn-gradient {
  background: linear-gradient(120deg, var(--gz-accent), var(--gz-accent-2), #8b5cf6, var(--gz-accent));
  background-size: 300% 300%;
  animation: gz-gradient 6s ease infinite;
  position: relative; overflow: hidden;
  transition: transform .25s var(--gz-ease), box-shadow .25s ease;
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: var(--gz-glow); color: #fff; }
@keyframes gz-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.btn-gradient::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: gz-shine 3.2s ease infinite;
}
@keyframes gz-shine { 0% { left: -80%; } 55%, 100% { left: 130%; } }

.gz-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .5);
  transform: scale(0); animation: gz-ripple .6s ease-out forwards;
}
@keyframes gz-ripple { to { transform: scale(3.2); opacity: 0; } }

.btn.gz-busy { color: transparent !important; pointer-events: none; position: relative; }
.btn.gz-busy::before {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 1.15em; height: 1.15em; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: gz-spin .7s linear infinite;
}

/* ------------------------------------------------------------
   Cards: hover lift + gradient glow ring
   ------------------------------------------------------------ */
.glass-card { position: relative; }
.glass-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, rgba(99,102,241,.65), rgba(6,182,212,.35), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .35s ease;
}
.glass-card:hover { transform: translateY(-5px); box-shadow: 0 14px 44px rgba(31, 38, 135, .18), var(--gz-glow); }
.glass-card:hover::before { opacity: 1; }
[data-theme="dark"] .glass-card:hover { box-shadow: 0 14px 44px rgba(0, 0, 0, .5), var(--gz-glow); }

.plan-card.featured { animation: gz-featured 3s ease-in-out infinite; }
@keyframes gz-featured {
  0%, 100% { box-shadow: 0 8px 32px rgba(99, 102, 241, .25); }
  50%      { box-shadow: 0 8px 42px rgba(99, 102, 241, .55); }
}

/* ------------------------------------------------------------
   Stats: gradient numbers + pulsing status dots
   ------------------------------------------------------------ */
.stat-number, .display-4 {
  background: linear-gradient(120deg, var(--text), var(--gz-accent) 70%, var(--gz-accent-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
[data-theme="dark"] .stat-number, [data-theme="dark"] .display-4 {
  background: linear-gradient(120deg, #fff, #818cf8 65%, #22d3ee);
  -webkit-background-clip: text; background-clip: text;
}

.gz-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px;
  animation: gz-pulse 1.8s ease-in-out infinite;
}
.gz-dot.green { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); }
.gz-dot.amber { background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); }
.gz-dot.red   { background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); }
@keyframes gz-pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70%  { box-shadow: 0 0 0 7px transparent; opacity: .85; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* ------------------------------------------------------------
   Skeleton shimmer (usable while AJAX loads)
   ------------------------------------------------------------ */
.gz-skeleton {
  position: relative; overflow: hidden;
  background: rgba(99, 102, 241, .10) !important;
  border-radius: 10px; color: transparent !important; min-height: 1.2em;
}
.gz-skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  animation: gz-shimmer 1.3s infinite;
}
[data-theme="dark"] .gz-skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
@keyframes gz-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ------------------------------------------------------------
   Toasts (PremiumUI.toast)
   ------------------------------------------------------------ */
#gzToasts { position: fixed; right: 18px; bottom: 18px; z-index: 100001; display: flex; flex-direction: column; gap: 10px; }
.gz-toast {
  min-width: 250px; max-width: 340px;
  padding: 12px 16px; border-radius: 14px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, rgba(0,0,0,.06));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  backdrop-filter: blur(14px); font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  animation: gz-toast-in .45s var(--gz-ease) both;
}
.gz-toast.out { animation: gz-toast-out .35s ease forwards; }
.gz-toast .ico {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .85rem;
}
.gz-toast.ok  .ico { background: linear-gradient(135deg, #16a34a, #22c55e); }
.gz-toast.err .ico { background: linear-gradient(135deg, #dc2626, #f87171); }
.gz-toast.info .ico { background: linear-gradient(135deg, var(--gz-accent), var(--gz-accent-2)); }
@keyframes gz-toast-in { from { opacity: 0; transform: translateX(60px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes gz-toast-out { to { opacity: 0; transform: translateY(14px) scale(.96); } }

/* ------------------------------------------------------------
   Hero illustration + misc
   ------------------------------------------------------------ */
.gz-hero-img { max-width: 100%; height: auto; filter: drop-shadow(0 24px 48px rgba(99, 102, 241, .30)); }
.gz-hero-wrap { animation: gz-hero 6s ease-in-out infinite; }
@keyframes gz-hero { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.admin-sidebar .admin-nav-link i { transition: transform .3s var(--gz-ease); }
.admin-sidebar .admin-nav-link:hover i { transform: scale(1.18); }

.table-modern tbody tr { transition: background .2s ease, transform .2s ease; }

::selection { background: rgba(99, 102, 241, .30); }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   v2 — ULTRA: cursor glow, 3D tilt, conic borders, palette
   ============================================================ */

/* cursor glow */
#gzGlow {
  position: fixed; width: 340px; height: 340px; border-radius: 50%;
  pointer-events: none; z-index: 0; opacity: 0;
  background: radial-gradient(circle, rgba(99,102,241,.14), rgba(6,182,212,.07) 45%, transparent 70%);
  transform: translate(-50%,-50%); transition: opacity .5s ease;
}
@media (hover:hover) and (pointer:fine){ #gzGlow { opacity: 1; } }

/* loader percentage */
.gz-loader-pct {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: .95rem;
  background: linear-gradient(90deg, var(--gz-accent), var(--gz-accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* 3D tilt targets (JS drives the transform) */
.glass-card, .plan-card { transform-style: preserve-3d; will-change: transform; }
.gz-tilting { transition: transform .08s linear !important; }

/* rotating conic border on featured plan */
@property --gz-rot { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.plan-card.featured { position: relative; }
.plan-card.featured::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--gz-rot), #6366f1, #06b6d4, #ec4899, #f59e0b, #6366f1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: gz-rot 4.5s linear infinite; pointer-events: none;
}
@keyframes gz-rot { to { --gz-rot: 360deg; } }

/* animated gradient headline */
.display-4 { background-size: 200% auto; animation: gz-grad-pan 7s linear infinite; }
@keyframes gz-grad-pan { to { background-position: 200% center; } }

/* feature step icons (index how-it-works) */
.gz-step-ico {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center; color: var(--gz-accent);
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(6,182,212,.16));
  border: 1px solid rgba(99,102,241,.25);
  transition: transform .35s var(--gz-ease), box-shadow .35s ease;
}
.glass-card:hover .gz-step-ico { transform: translateY(-3px) scale(1.06); box-shadow: 0 8px 22px rgba(99,102,241,.3); }

/* plan check bullets */
.gz-check { color: #22c55e; font-weight: 800; margin-right: 2px; }

/* back to top */
#gzTop {
  position: fixed; right: 20px; bottom: 20px; z-index: 9998;
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--card-border, rgba(0,0,0,.08));
  background: linear-gradient(135deg, var(--gz-accent), var(--gz-accent-2)); color: #fff;
  font-size: 1.1rem; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all .35s var(--gz-ease); box-shadow: var(--gz-glow); display: flex; align-items: center; justify-content: center;
}
#gzTop.show { opacity: 1; visibility: visible; transform: none; }
#gzTop:hover { transform: translateY(-3px); }
.gz-toast { bottom: 76px; }

/* command palette (Ctrl+K) */
#gzPalette {
  position: fixed; inset: 0; z-index: 100002; display: none;
  background: rgba(10,12,20,.55); backdrop-filter: blur(6px);
}
#gzPalette.open { display: block; }
#gzPalette .gzp-box {
  max-width: 480px; margin: 12vh auto 0; background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, rgba(0,0,0,.08)); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); overflow: hidden;
  animation: gz-fade-up .25s var(--gz-ease) both;
}
#gzPalette input {
  width: 100%; padding: 16px 18px; border: none; outline: none; font-size: 1rem;
  background: transparent; color: var(--text, inherit); box-sizing: border-box;
  border-bottom: 1px solid var(--card-border, rgba(0,0,0,.06));
}
#gzPalette .gzp-list { max-height: 320px; overflow-y: auto; padding: 6px; }
#gzPalette .gzp-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 12px; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--text, inherit);
}
#gzPalette .gzp-item.sel, #gzPalette .gzp-item:hover { background: linear-gradient(90deg, rgba(99,102,241,.14), rgba(6,182,212,.10)); }
#gzPalette .gzp-item .ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem;
  background: linear-gradient(135deg, var(--gz-accent), var(--gz-accent-2));
}
#gzPalette .gzp-hint { padding: 8px 14px; font-size: .7rem; color: var(--muted, #888); border-top: 1px solid var(--card-border, rgba(0,0,0,.06)); }

/* confetti particle */
.gz-confetti { position: fixed; width: 8px; height: 8px; border-radius: 2px; pointer-events: none; z-index: 100003; animation: gz-conf .9s ease-out forwards; }
@keyframes gz-conf { to { transform: translate(var(--dx), var(--dy)) rotate(540deg); opacity: 0; } }
