/* Qo'shimcha uslublar */

:root {
  --ring-track: #20352a;
  --chart-grid: rgba(148, 163, 184, 0.08);
  --chart-text: #64748b;
}

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
  transition: background-color 0.25s ease;
}

/* Poppins kengroq shrift — sarlavhalarni biroz zichlaymiz */
h1, h2, h3 {
  letter-spacing: -0.02em;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Gorizontal scroll chizig'ini yashirish */
.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Lucide ikonkalari */
svg.lucide {
  flex-shrink: 0;
}

/* Raqam maydonlaridagi strelkalarni yashirish */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

button {
  -webkit-user-select: none;
  user-select: none;
}
button:not(:disabled):active {
  transform: scale(0.98);
}

/* Select ichidagi variantlar */
select option {
  background: #18181b;
  color: #fafafa;
}
html.light select option {
  background: #fff;
  color: #18181b;
}

/* ================= SPLASH (logo animatsiyasi) ================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 42%, #0f2a22 0%, #07100c 55%, #040907 100%);
  color: #fff;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#splash.hide {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}
.splash-logo {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(45, 212, 191, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: splash-pop 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.25) both, splash-float 3s ease-in-out 0.9s infinite;
}
.splash-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin-top: -38px;
}
.splash-rings span {
  position: absolute;
  left: -90px;
  top: -90px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.35);
  animation: splash-ring 2.4s ease-out infinite;
  opacity: 0;
}
.splash-rings span:nth-child(2) { animation-delay: 0.8s; }
.splash-rings span:nth-child(3) { animation-delay: 1.6s; }
.splash-name {
  margin-top: 26px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  animation: splash-up 0.7s ease 0.35s both;
}
.splash-name span {
  background: linear-gradient(90deg, #5eead4, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.splash-tag {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  animation: splash-up 0.7s ease 0.55s both;
}
.splash-bar {
  margin-top: 34px;
  width: 120px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: splash-up 0.7s ease 0.7s both;
}
.splash-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #34d399, #38bdf8);
  animation: splash-load 1.1s ease-in-out infinite;
}
@keyframes splash-pop {
  0% { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes splash-ring {
  0% { opacity: 0.8; transform: scale(0.55); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes splash-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes splash-load {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}

/* Kirish sahifasidagi logo */
.logo-hero {
  animation: splash-pop 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.25) both, logo-float 3.2s ease-in-out 0.8s infinite;
  box-shadow: 0 8px 22px rgba(45, 212, 191, 0.3);
}
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ===== Ilova (telefon ilovasidek): aylantirish chizig'i ko'rinmaydi, yonga siljimaydi ===== */
html.app {
  scrollbar-width: none;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
html.app::-webkit-scrollbar,
html.app body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
html.app body {
  overflow-x: hidden;
  width: 100%;
}
/* Ichki aylanadigan bloklar (chat, kategoriyalar) ham ingichka/yashirin chiziq bilan */
html.app *::-webkit-scrollbar {
  width: 0;
  height: 0;
}
html.app * {
  scrollbar-width: none;
}

/* Sahifalar yumshoq paydo bo'lishi */
@keyframes intizom-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.fade-in {
  animation: intizom-fade 0.28s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .fade-in, .splash-logo, .splash-rings span, .logo-hero { animation: none; }
  * { transition: none !important; }
}
