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

:root {
  --emerald-950: #061D15;
  --emerald-900: #0A2F23;
  --emerald-800: #114232;
  --emerald-700: #175742;
  --emerald-glow: #10B981;
  --cream-50: #FAF6F0;
  --cream-100: #F4EBDD;
  --cream-200: #EADAC3;
  --cream-300: #D8C1A0;
  --ink-900: #0F241D;
  --ink-600: #4A5F57;
  --ink-400: #7B8E87;
  --gold-accent: #C9A875;
  --shadow-soft: 0 12px 32px -12px rgba(10, 47, 35, 0.14);
  --shadow-hover: 0 18px 40px -12px rgba(10, 47, 35, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, Tahoma, sans-serif;
  background-color: var(--cream-50);
  color: var(--ink-900);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

/* ============================================================
   KOMO Full-Screen Black Preloader with Rotating Green Orbit Line
   ============================================================ */
#komo-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 45%, #0B1914 0%, #050706 62%, #000000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s ease;
}

#komo-preloader.komo-preloader-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.komo-loader-ring-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.komo-loader-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(16, 185, 129, 0.14);
}

.komo-loader-arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #10B981;
  border-right-color: rgba(16, 185, 129, 0.45);
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.75));
  animation: komoSpin 1.05s cubic-bezier(0.55, 0.25, 0.45, 0.75) infinite;
}

.komo-loader-arc-inner {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-bottom-color: rgba(201, 168, 117, 0.55);
  animation: komoSpinReverse 1.8s linear infinite;
}

.komo-loader-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  animation: komoPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.65));
}

.komo-loader-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #F5E6D3;
}

.komo-loader-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
}

.komo-loader-sub {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: rgba(245, 230, 211, 0.62);
  font-weight: 600;
}

.komo-loader-fa {
  font-size: 0.85rem;
  font-weight: 700;
  color: #10B981;
  margin-top: 2px;
}

@keyframes komoSpin {
  to { transform: rotate(360deg); }
}

@keyframes komoSpinReverse {
  to { transform: rotate(-360deg); }
}

@keyframes komoPulse {
  0%, 100% { transform: scale(1); opacity: 0.94; }
  50%      { transform: scale(1.06); opacity: 1; }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream-100);
}
::-webkit-scrollbar-thumb {
  background: #1B5A45;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-900);
}

.komo-emerald {
  background: linear-gradient(135deg, #0A2F23 0%, #0E3D2E 58%, #072219 100%);
}

.komo-glass {
  background: rgba(250, 246, 240, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 230, 211, 0.18);
}

.komo-card {
  background-color: #FFFFFF;
  border: 1px solid rgba(10, 47, 35, 0.08);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.komo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(10, 47, 35, 0.18);
}

.komo-cream-card {
  background-color: var(--cream-100);
  border: 1px solid rgba(10, 47, 35, 0.08);
}

.komo-btn-primary {
  background-color: var(--emerald-900);
  color: var(--cream-50);
  transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.komo-btn-primary:hover {
  background-color: var(--emerald-700);
  box-shadow: 0 10px 22px -8px rgba(10, 47, 35, 0.45);
}

.komo-btn-primary:active {
  transform: scale(0.98);
}

.komo-btn-cream {
  background-color: var(--cream-100);
  color: var(--emerald-900);
  transition: background-color 0.2s ease, transform 0.18s ease;
}

.komo-btn-cream:hover {
  background-color: #FFFFFF;
}

input[type="range"].komo-range {
  accent-color: var(--emerald-900);
}

#komo-toast-container {
  position: fixed;
  bottom: 20px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (min-width: 640px) {
  #komo-toast-container {
    right: auto;
    left: 24px;
    bottom: 24px;
  }
}

.komo-toast {
  pointer-events: auto;
  background: var(--emerald-900);
  color: var(--cream-50);
  border: 1px solid rgba(245, 230, 211, 0.22);
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(6, 29, 21, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: toastIn 0.28s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-link-active {
  background-color: #FAF6F0;
  color: #0A2F23 !important;
  font-weight: 800;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@media print {
  header, footer, .no-print, #komo-toast-container, #komo-preloader {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
  }
}
