/* ============================================================
   U-PONTRENT — Premium Dark Emerald Design System
   ============================================================ */

:root {
  --emerald-950: #021410;
  --emerald-900: #032018;
  --emerald-850: #04261d;
  --emerald-800: #053024;
  --emerald-700: #0a4a37;
  --emerald-500: #10b981;
  --gold-500: #f5c542;
  --gold-400: #fcd34d;
}

html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(16,185,129,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(245,197,66,.10), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(16,185,129,.05), transparent 70%),
    linear-gradient(180deg, #02130e 0%, #021410 40%, #010a08 100%);
  min-height: 100vh;
  background-attachment: fixed;
}

/* ---------- Islamic geometric ornament background ---------- */
.islamic-pattern {
  background-image:
    radial-gradient(rgba(16,185,129,.08) 1px, transparent 1px),
    radial-gradient(rgba(245,197,66,.06) 1px, transparent 1px);
  background-size: 28px 28px, 56px 56px;
  background-position: 0 0, 14px 14px;
}

.geo-ornament {
  background-image:
    linear-gradient(60deg, transparent 49.5%, rgba(245,197,66,.08) 50%, transparent 50.5%),
    linear-gradient(-60deg, transparent 49.5%, rgba(16,185,129,.08) 50%, transparent 50.5%);
  background-size: 36px 64px;
}

/* ---------- Glassmorphism cards ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 60px -30px rgba(0,0,0,.7);
}
.glass-strong {
  background: linear-gradient(180deg, rgba(10,74,55,.55) 0%, rgba(3,32,24,.65) 100%);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(20px) saturate(160%);
}

/* ---------- Premium glow utilities ---------- */
.glow-emerald { box-shadow: 0 0 0 1px rgba(16,185,129,.25), 0 0 60px -10px rgba(16,185,129,.45); }
.glow-gold    { box-shadow: 0 0 0 1px rgba(245,197,66,.30), 0 0 60px -10px rgba(245,197,66,.45); }
.text-glow-emerald { text-shadow: 0 0 24px rgba(16,185,129,.55); }
.text-glow-gold { text-shadow: 0 0 22px rgba(245,197,66,.55); }

/* ---------- Gradient text ---------- */
.text-gradient-emerald {
  background: linear-gradient(135deg,#a7f3d0 0%,#34d399 40%,#10b981 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-gradient-gold {
  background: linear-gradient(135deg,#fef3c7 0%,#f5c542 50%,#d4a017 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.text-gradient-premium {
  background: linear-gradient(135deg,#fff 0%,#a7f3d0 35%,#f5c542 70%,#fff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg,#10b981 0%,#059669 50%,#065f46 100%);
  border: 1px solid rgba(110,231,183,.4);
  box-shadow: 0 10px 30px -10px rgba(16,185,129,.6), inset 0 1px 0 rgba(255,255,255,.2);
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 40px -10px rgba(16,185,129,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-gold {
  background: linear-gradient(135deg,#fde68a 0%,#f5c542 45%,#b08412 100%);
  color: #1a1a1a; font-weight: 700;
  border: 1px solid rgba(254,243,199,.5);
  box-shadow: 0 10px 30px -10px rgba(245,197,66,.55), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-ghost {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  transition: all .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(16,185,129,.4); }

/* ---------- Inputs ---------- */
.input-premium {
  background: rgba(2,20,16,.6); border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  transition: all .25s ease;
}
.input-premium:focus {
  outline: none; border-color: rgba(16,185,129,.6);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12), 0 0 30px -10px rgba(16,185,129,.5);
}
.input-premium::placeholder { color: rgba(148,163,184,.5); }

/* ---------- Sidebar nav item ---------- */
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .85rem; border-radius: .75rem;
  color: rgba(226,232,240,.7); font-weight: 500; font-size: .9rem;
  transition: all .2s ease; cursor: pointer;
  border: 1px solid transparent;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16,185,129,.18), rgba(16,185,129,.04));
  border-color: rgba(16,185,129,.3);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 8px 24px -12px rgba(16,185,129,.5);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -1px; top: 20%; height: 60%; width: 3px;
  background: linear-gradient(180deg, #34d399, #10b981); border-radius: 3px;
  box-shadow: 0 0 12px #10b981;
}

/* ---------- Animations ---------- */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-ring { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes scan {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: .8; } 90% { opacity: .8; }
  100% { transform: translateY(100%); opacity: 0; }
}
@keyframes spin-slow { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes particle {
  0% { transform: translate(0,0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--tx,40px), var(--ty,-80px)) scale(0); opacity: 0; }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-spin-slow { animation: spin-slow 18s linear infinite; }
.animate-scan { animation: scan 3s linear infinite; }
.animate-blink { animation: blink 1.4s ease-in-out infinite; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.6s linear infinite;
}

.pulse-dot { position: relative; }
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 9999px;
  border: 2px solid currentColor; animation: pulse-ring 1.6s ease-out infinite;
}

/* ---------- Particles ---------- */
.particle {
  position: absolute; width: 4px; height: 4px; border-radius: 9999px;
  background: radial-gradient(circle, rgba(16,185,129,.9), transparent 70%);
  animation: particle 5s ease-out infinite;
}

/* ---------- Hologram AI panel ---------- */
.hologram {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16,185,129,.12), rgba(56,189,248,.08), rgba(245,197,66,.06));
  border: 1px solid rgba(16,185,129,.25);
}
.hologram::before {
  content: ''; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.hologram::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, rgba(110,231,183,.25), transparent);
  height: 30%; animation: scan 4s linear infinite; pointer-events: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(2,20,16,.5); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #064e3b, #022c22);
  border-radius: 10px; border: 2px solid rgba(2,20,16,.6);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #065f46, #064e3b); }

/* ---------- Card hover ---------- */
.card-hover { transition: transform .35s ease, box-shadow .35s ease; }
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(16,185,129,.25);
}

/* ---------- Logo halo ---------- */
.logo-halo {
  filter: drop-shadow(0 0 28px rgba(245,197,66,.45)) drop-shadow(0 0 60px rgba(16,185,129,.35));
}

/* ---------- Tag/badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; border-radius: 9999px; font-weight: 600; font-size: .7rem; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.08); text-transform: uppercase;
}
.badge-emerald { color: #6ee7b7; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.3); }
.badge-gold    { color: #fde68a; background: rgba(245,197,66,.12); border-color: rgba(245,197,66,.3); }
.badge-red     { color: #fca5a5; background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.3); }
.badge-blue    { color: #93c5fd; background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); }
.badge-slate   { color: #cbd5e1; background: rgba(148,163,184,.10);border-color: rgba(148,163,184,.25); }

/* ---------- Excel spreadsheet preview ---------- */
.xlsx { background: #fff; color: #1f2937; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.xlsx .x-row { display: grid; }
.xlsx .x-cell { padding: 8px 12px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; font-size: 12px; }
.xlsx .x-head { background: #137a4d; color: #fff; font-weight: 700; }
.xlsx .x-row-head { background: #f3f4f6; color: #6b7280; font-weight: 600; text-align: center; }
.xlsx .x-zebra:nth-child(even) { background: #f9fafb; }

/* ---------- Raport ---------- */
.raport-page {
  width: 210mm; min-height: 297mm; margin: 0 auto;
  background: #fff; color: #1f2937;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7);
  position: relative; overflow: hidden;
}
.raport-page::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(16,185,129,.04) 0, transparent 60%),
    repeating-linear-gradient(45deg, rgba(16,185,129,.025) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.raport-watermark {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: .05; pointer-events: none;
}

/* ---------- Hide on print ---------- */
@media print {
  body { background: #fff !important; }
  .no-print { display: none !important; }
  .raport-page { box-shadow: none; margin: 0; }
}

/* ---------- Marquee / ticker ---------- */
.marquee { display: flex; gap: 3rem; animation: marquee 30s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Mobile mockup frame ---------- */
.mobile-frame {
  width: 320px; height: 660px; border-radius: 42px;
  background: linear-gradient(135deg,#0a0a0a,#1a1a1a);
  padding: 14px;
  box-shadow:
    0 50px 100px -20px rgba(0,0,0,.7),
    inset 0 0 0 2px rgba(255,255,255,.08),
    0 0 80px -20px rgba(16,185,129,.4);
  position: relative;
}
.mobile-screen {
  width: 100%; height: 100%; border-radius: 30px; overflow: hidden;
  background: var(--emerald-950); position: relative;
}
.mobile-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #000; border-radius: 12px; z-index: 50;
}

/* ---------- Section divider ornament ---------- */
.divider-ornament {
  display: flex; align-items: center; gap: 1rem;
  color: rgba(245,197,66,.6);
}
.divider-ornament::before, .divider-ornament::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,197,66,.4), transparent);
}

/* ---------- Hide scrollbar utility ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- KaTeX-like answer box ---------- */
.ans-option {
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  border-radius: 14px; padding: 14px 16px; cursor: pointer;
  transition: all .2s ease; display: flex; align-items: center; gap: 14px;
}
.ans-option:hover { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.05); }
.ans-option.active {
  border-color: rgba(16,185,129,.7);
  background: linear-gradient(135deg, rgba(16,185,129,.15), rgba(16,185,129,.04));
  box-shadow: inset 0 0 0 1px rgba(110,231,183,.25), 0 10px 30px -10px rgba(16,185,129,.5);
}
.ans-letter {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  font-weight: 700; color: #a7f3d0;
}
.ans-option.active .ans-letter {
  background: linear-gradient(135deg,#10b981,#059669); color: #fff; border-color: transparent;
}

/* ---------- Hero spotlight ---------- */
.spotlight {
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(16,185,129,.18), transparent 70%),
    radial-gradient(40% 40% at 80% 20%, rgba(245,197,66,.12), transparent 70%);
}

/* Smooth fade-in for sections */
section { scroll-margin-top: 80px; }
