/* ═══════════════════════════════════════════════════════════════
   KAPGIR PREMIUM — STYLE.CSS
   Mobile-First Premium PWA Marketplace
   Inspired by: Instagram Story, Uzum, Wildberries, Pinterest,
                TikTok Shop, Telegram Mini App, Material You
═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   1. CSS VARIABLES & DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  /* Color Palette - Dark Premium */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: #161620;
  --bg-elevated: #1e1e2c;
  --bg-glass: rgba(30, 30, 44, 0.65);
  --bg-glass-strong: rgba(20, 20, 30, 0.85);

  /* Accent — Material You inspired warm tone */
  --accent: #ff6b35;
  --accent-light: #ff8a5b;
  --accent-dark: #e85a28;
  --accent-glow: rgba(255, 107, 53, 0.35);

  /* Secondary accent */
  --accent-2: #6c5ce7;
  --accent-3: #00d4aa;

  /* Status colors */
  --success: #00d4aa;
  --danger: #ff4757;
  --warning: #ffa502;
  --info: #3498db;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #b8b8c8;
  --text-tertiary: #7a7a8c;
  --text-muted: #4a4a5c;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Shadows — Premium depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 32px var(--accent-glow);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-full: 999px;

  /* Spacing */
  --gap-xs: 4px;
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  --gap-xl: 24px;
  --gap-2xl: 32px;

  /* Layout */
  --header-h: 60px;
  --bottom-nav-h: 70px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Gradients */
  --grad-accent: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  --grad-story: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --grad-card: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
  --grad-bg: radial-gradient(ellipse at top, #1a1a2e 0%, #0a0a0f 70%);
}

/* ─────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--grad-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}

img,
video {
  max-width: 100%;
  display: block;
}

button {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* ─────────────────────────────────────────────
   3. SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ─────────────────────────────────────────────
   4. SPLASH SCREEN
───────────────────────────────────────────── */
.splash {
  position: fixed;
  inset: 0;
  background: var(--grad-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.splash.fade-out {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.1);
}

.splash-content {
  text-align: center;
  animation: splashIn 0.8s var(--t-spring);
}

.splash-logo {
  width: 110px;
  height: 110px;
  margin: 0 auto 24px;
  background: var(--grad-accent);
  border-radius: var(--r-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  animation: pulse 2s ease-in-out infinite;
}

.splash-logo-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.splash-logo-icon svg {
  width: 100%;
  height: 100%;
}
.logo-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.splash-title {
  font-family: 'Manrope', sans-serif;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 6px;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-subtitle {
  font-size: 11px;
  letter-spacing: 8px;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-weight: 600;
}

.splash-loader {
  width: 140px;
  height: 3px;
  background: var(--bg-tertiary);
  margin: 32px auto 0;
  border-radius: var(--r-full);
  overflow: hidden;
}

.splash-loader-bar {
  height: 100%;
  width: 40%;
  background: var(--grad-accent);
  border-radius: var(--r-full);
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes splashIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 20px transparent; }
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
