/* Bingo — O'zbek ijtimoiy marketplace dizayn tizimi */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700&display=swap');

:root {
  --atlas-teal: #0d7377;
  --atlas-teal-light: #14a3a8;
  --atlas-gold: #c9a227;
  --atlas-gold-light: #e8c547;
  --adras-crimson: #9b2335;
  --adras-crimson-light: #c41e3a;
  --adras-indigo: #2c3e6b;
  --adras-purple: #5c3d6e;
  --cream: #faf6f0;
  --cream-dark: #f0e8dc;
  --ivory: #fffdf8;
  /* Light-first defaults (dark via html[data-theme="dark"]) */
  --color-bg: #f2f2f7;
  --color-bg-secondary: #f8f9fb;
  --color-bg-elevated: #ffffff;
  --color-bg-card: #f3f4f6;
  --color-bg-hover: #f0f1f4;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-tertiary: #9ca3af;
  --color-accent: #0d7377;
  --color-accent-hover: #0a5c5f;
  --color-accent-light: rgba(13, 115, 119, 0.1);
  --color-gold: #c9a227;
  --color-gold-light: rgba(201, 162, 39, 0.15);
  --color-crimson: #c41e3a;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-strong: rgba(0, 0, 0, 0.12);
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-glass: rgba(255, 255, 255, 0.78);
  --gradient-atlas: linear-gradient(135deg, #0d7377 0%, #14a3a8 40%, #c9a227 100%);
  --gradient-adras: linear-gradient(135deg, #9b2335 0%, #5c3d6e 50%, #2c3e6b 100%);
  --gradient-story: linear-gradient(45deg, #c9a227, #c41e3a, #5c3d6e, #14a3a8);
  --pattern-atlas: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(20, 163, 168, 0.03) 8px,
    rgba(20, 163, 168, 0.03) 16px
  );
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 24px rgba(13, 115, 119, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 999px;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;
  --nav-height: 60px;
  --sidebar-width: 244px;
  --feed-width: 470px;
  --right-panel: 293px;
  --bottom-nav: 56px;
}

html[data-theme="dark"] {
  --color-bg: #000000;
  --color-bg-secondary: #121212;
  --color-bg-elevated: #1a1a1a;
  --color-bg-card: #262626;
  --color-bg-hover: #363636;
  --color-text: #fafafa;
  --color-text-secondary: #a8a8a8;
  --color-text-tertiary: #737373;
  --color-accent: #14a3a8;
  --color-accent-hover: #0d7377;
  --color-accent-light: rgba(20, 163, 168, 0.15);
  --color-gold: #e8c547;
  --color-gold-light: rgba(232, 197, 71, 0.15);
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.18);
  --color-success: #00c853;
  --color-warning: #ffab00;
  --color-error: #ff5252;
  --color-glass: rgba(18, 18, 18, 0.85);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(20, 163, 168, 0.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

body.app-body {
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

body.landing-page {
  background: var(--cream);
  color: #1a1a1a;
}

a { color: inherit; text-decoration: none; transition: opacity var(--transition-fast); }
a:hover { opacity: 0.85; }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-atlas);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  background: var(--gradient-atlas);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.landing-page .logo-text {
  background: var(--gradient-adras);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-atlas);
  color: white;
  box-shadow: 0 4px 16px rgba(20, 163, 168, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(20, 163, 168, 0.45);
  opacity: 1;
}

.btn-gold {
  background: linear-gradient(135deg, #c9a227, #e8c547);
  color: #1a1a1a;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--atlas-teal-light);
  color: var(--atlas-teal-light);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover { color: var(--color-text); background: var(--color-bg-hover); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.badge-gold { background: var(--color-gold-light); color: var(--color-gold); }
.badge-verified { background: rgba(0, 149, 246, 0.15); color: #0095f6; }
.badge-success { background: rgba(0, 200, 83, 0.15); color: var(--color-success); }
.badge-warning { background: rgba(255, 171, 0, 0.15); color: var(--color-warning); }

/* Forms */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-input::placeholder { color: var(--color-text-tertiary); }

/* Avatar */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl { width: 88px; height: 88px; font-size: 28px; }

/* Story ring */
.story-ring {
  padding: 3px;
  border-radius: 50%;
  background: var(--gradient-story);
}

.story-ring.viewed { background: var(--color-border-strong); }

.story-ring-inner {
  padding: 2px;
  border-radius: 50%;
  background: var(--color-bg);
}

/* Verified */
.verified {
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  margin-left: 3px;
  vertical-align: middle;
}

.verified .icon-svg { width: 14px; height: 14px; }

.new-user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 3px;
  border-radius: 50%;
  background: #E53935;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-bg-card);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.35s ease;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--color-success); }
.toast.error { border-color: var(--color-error); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 420px;
  width: 90%;
  border: 1px solid var(--color-border);
  transform: scale(0.95);
  transition: transform var(--transition);
}

.modal-overlay.active .modal { transform: scale(1); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes atlas-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade-in-up { animation: fadeInUp 0.7s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 3px; }
