/* ============================================================
   Luxea Coin DAO — Custom CSS
   Supplements TailwindCSS CDN
   ============================================================ */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --lux-purple:  #7c3aed;
  --lux-violet:  #8b5cf6;
  --lux-cyan:    #22d3ee;
  --lux-bg:      #060612;
  --lux-surface: #0d0d24;
  --lux-border:  rgba(139, 92, 246, 0.2);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background-color: var(--lux-bg);
  color: #e2e8f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--lux-bg); }
::-webkit-scrollbar-thumb { background: var(--lux-purple); border-radius: 3px; }

/* Text selection */
::selection { background: var(--lux-purple); color: #fff; }

/* ── Animated starfield background ──────────────────────────────────────── */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.stars-bg::before,
.stars-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 60% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 85%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 30%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.2) 0%, transparent 100%);
  animation: twinkle 8s linear infinite alternate;
}
.stars-bg::after {
  background-image:
    radial-gradient(1px 1px at 15% 35%, rgba(139,92,246,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 15%, rgba(34,211,238,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 45%, rgba(139,92,246,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 75%, rgba(34,211,238,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 85%, rgba(139,92,246,0.3) 0%, transparent 100%);
  animation-delay: -4s;
  animation-duration: 12s;
}
@keyframes twinkle {
  0%   { opacity: 0.4; transform: scale(1); }
  50%  { opacity: 0.8; }
  100% { opacity: 0.4; transform: scale(1.02); }
}

/* ── Gradient orbs (decorative background blobs) ─────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-purple { background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%); }
.orb-cyan   { background: radial-gradient(circle, rgba(34,211,238,0.2) 0%, transparent 70%); }
.orb-violet { background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%); }

/* ── Glassmorphism card ───────────────────────────────────────────────────── */
.glass-card {
  background: rgba(13, 13, 36, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.1);
}

/* Navbar glass */
.glass-nav {
  background: rgba(6, 6, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

/* ── Gradient text ───────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-purple {
  background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.875rem;
  font-weight: 600;
  font-size: 0.9375rem;
  background: linear-gradient(135deg, var(--lux-purple), var(--lux-violet));
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(124, 58, 237, 0.55); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.875rem;
  font-weight: 600;
  font-size: 0.9375rem;
  background: transparent;
  color: var(--lux-violet);
  border: 1px solid rgba(139, 92, 246, 0.5);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--lux-violet);
  transform: translateY(-1px);
}

/* Phantom button */
.btn-phantom {
  background: linear-gradient(135deg, #ab9ff2, #7c3aed);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.3); }
  50%       { box-shadow: 0 0 40px rgba(124,58,237,0.6), 0 0 80px rgba(34,211,238,0.2); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.float-anim   { animation: float 6s ease-in-out infinite; }
.glow-anim    { animation: glow-pulse 3s ease-in-out infinite; }
.slide-up     { animation: slide-up 0.6s ease forwards; }
.fade-in      { animation: fade-in 0.4s ease forwards; }
.spin-slow    { animation: rotate-slow 20s linear infinite; }

/* Staggered slide-up for children */
.stagger-children > * {
  opacity: 0;
  animation: slide-up 0.5s ease forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }

/* ── Hero section ────────────────────────────────────────────────────────── */
.hero-gradient {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124,58,237,0.25) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(34,211,238,0.1) 0%, transparent 60%);
}

/* Token logo glow ring */
.token-glow {
  box-shadow:
    0 0 0 1px rgba(139,92,246,0.3),
    0 0 30px rgba(124,58,237,0.5),
    0 0 80px rgba(124,58,237,0.2);
  animation: glow-pulse 3s ease-in-out infinite;
}

/* ── Tokenomics donut chart ──────────────────────────────────────────────── */
.donut-ring {
  transform: rotate(-90deg);
  transform-origin: center;
}
.donut-segment {
  transition: stroke-dashoffset 1s ease, opacity 0.3s;
}
.donut-segment:hover { opacity: 0.85; cursor: pointer; }

/* Animated progress bar fill */
.progress-fill {
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Proposal cards ──────────────────────────────────────────────────────── */
.proposal-card {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.proposal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.15);
}

/* Line clamp helpers */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Input fields ────────────────────────────────────────────────────────── */
.lux-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #fff;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lux-input:focus {
  border-color: var(--lux-violet);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.lux-input::placeholder { color: rgba(255,255,255,0.3); }

textarea.lux-input { resize: vertical; min-height: 120px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.modal-box {
  animation: slide-up 0.3s ease;
}

/* ── Stat counters ───────────────────────────────────────────────────────── */
.stat-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Active language button ──────────────────────────────────────────────── */
.active-lang {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
}

/* ── Section dividers ────────────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,92,246,0.4), transparent);
}

/* ── Wallet address monospace ────────────────────────────────────────────── */
.wallet-addr {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: rgba(139,92,246,0.9);
}

/* ── Mobile Bottom Navigation ────────────────────────────────────────────── */
.mobile-bottom-nav {
  background: rgba(6, 6, 18, 0.98);
  border-top: 1px solid rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex !important;
  align-items: stretch;
  width: 100%;
  min-height: 60px;
}

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none !important; }
}

.mobile-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px 10px;
  color: rgba(148, 163, 184, 0.6);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}

.mobile-bottom-tab:active { background: rgba(139, 92, 246, 0.1); }

.mobile-bottom-tab.active { color: #a78bfa; }

.mobile-bottom-tab svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.mobile-bottom-tab.active svg { transform: scale(1.1); }

/* Active indicator bar at top */
.mobile-bottom-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: #8b5cf6;
}

/* Wallet tab area */
.mobile-bottom-wallet-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-wallet-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 8px 2px 10px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-wallet-btn svg { width: 24px; height: 24px; flex-shrink: 0; }

.mobile-bottom-wallet-btn:active { background: rgba(139, 92, 246, 0.1); }

.mobile-bottom-wallet-connected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px 8px;
  width: 100%;
  height: 100%;
}

/* ── Responsive mobile tweaks ────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Prevent images from causing horizontal overflow */
  img { max-width: 100%; height: auto; }

  /* Hero: reduce vertical padding on small screens */
  .hero-gradient { padding-top: 5rem; padding-bottom: 3rem; min-height: auto; }

  /* Touch targets: minimum 44px for all interactive elements */
  .btn-primary, .btn-outline { min-height: 44px; font-size: 0.9rem; }

  /* Main content padding to clear bottom nav */
  main { padding-bottom: 5.5rem !important; }

  /* How-it-works: 2 columns on mobile */
  .how-grid-mobile { grid-template-columns: repeat(2, 1fr) !important; }

  /* Tokenomics legend: smaller gap */
  .tokenomics-legend { gap: 0.75rem !important; }

  /* Footer: less top margin on mobile */
  footer { margin-top: 2rem !important; }

  /* Ensure glass panels don't overflow */
  .glass-card, .glass-nav { max-width: 100vw; }

  /* Orb decorations: clip on mobile so they don't cause overflow */
  .orb { max-width: none; }
}

/* ── Admin panel table ───────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(139,92,246,0.8);
  border-bottom: 1px solid rgba(139,92,246,0.15);
}
.admin-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-table tr:hover td { background: rgba(139,92,246,0.04); }

/* ── Scrollable table wrapper ────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll::-webkit-scrollbar { height: 4px; }

/* ── Parachute floating animations ───────────────────────────────────────── */
@keyframes parachute-float {
  0%   { transform: translateY(0px) rotate(-2deg); }
  50%  { transform: translateY(-18px) rotate(2deg); }
  100% { transform: translateY(0px) rotate(-2deg); }
}
@keyframes parachute-float-slow {
  0%   { transform: translateY(0px) rotate(1deg); }
  50%  { transform: translateY(-22px) rotate(-1.5deg); }
  100% { transform: translateY(0px) rotate(1deg); }
}
@keyframes parachute-float-mini {
  0%   { transform: translateY(0px) rotate(3deg); }
  50%  { transform: translateY(-10px) rotate(-2deg); }
  100% { transform: translateY(0px) rotate(3deg); }
}

.parachute-hero {
  animation: parachute-float-slow 5s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(139,92,246,0.45)) drop-shadow(0 0 60px rgba(34,211,238,0.2));
}
.parachute-deco {
  animation: parachute-float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(139,92,246,0.35));
}
.parachute-mini {
  animation: parachute-float-mini 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(139,92,246,0.3));
}
.parachute-cta {
  animation: parachute-float-slow 6s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(139,92,246,0.5)) drop-shadow(0 0 50px rgba(34,211,238,0.25));
}

/* ── Status badge ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid;
}
