@import url('glass-ui.css');

:root {
  /* Layout */
  --header-height: 56px;
  --bulk-buy-height: 56px;
  --search-bar-height: 80px;
  --footer-height: 34px;
  
  /* Liquid Glass Colors */
  --bg: #0f0f12;
  --panel: rgba(35, 35, 45, 0.7);
  --panel-2: rgba(50, 50, 60, 0.6);
  --background: #0f0f12;
  --background-secondary: rgba(30, 30, 40, 0.8);
  --background-tertiary: rgba(20, 20, 28, 0.9);
  
  --text: #fff;
  --foreground: #fff;
  --muted: rgba(255, 255, 255, 0.5);
  --muted-foreground: rgba(255, 255, 255, 0.5);
  
  --brand: #1689ff;
  --primary: #1689ff;
  --primary-light: #4da6ff;
  --primary-foreground: #fff;
  
  --accent: #49df64;
  --accent-secondary: rgba(73, 223, 100, 0.12);
  --destructive: #df494d;
  
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --input: rgba(255, 255, 255, 0.06);
  --ring: #fff;
  
  --radius: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Glass effects */
  --blur-sm: 8px;
  --blur-md: 16px;
  --blur-lg: 24px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.5);
  
  /* Gradients */
  --gold-gradient: linear-gradient(94.02deg, #fac297 1.95%, #ffc386 50.42%, #ca8e52 98.56%);
  --bg-gold: #f1aa05;
  --bg-purple: #af51de;
  --bg-cyan: #5ac8fa;
  --bright-azure: #35aff1;
  --bg-dark: #0a0a0e;
  
  /* Spacing */
  --spacing: 0.25rem;
  
  /* Font */
  --font-sans: "SFProText", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

*, :after, :before {
  box-sizing: border-box;
  scrollbar-color: black #141414;
  scrollbar-width: none;
  outline: none;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: none;
}

html, body { 
  height: 100%; 
  overflow-x: hidden;
  color: var(--foreground);
  background: #0d0d14;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Animated gradient background - VISIBLE colored orbs */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle 400px at 10% 20%, rgba(99, 102, 241, 0.35) 0%, transparent 60%),
    radial-gradient(circle 350px at 90% 15%, rgba(236, 72, 153, 0.3) 0%, transparent 60%),
    radial-gradient(circle 300px at 50% 90%, rgba(34, 211, 238, 0.25) 0%, transparent 60%),
    radial-gradient(circle 250px at 5% 70%, rgba(168, 85, 247, 0.25) 0%, transparent 60%),
    radial-gradient(circle 280px at 85% 80%, rgba(34, 197, 94, 0.2) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: bgFloat 20s ease-in-out infinite;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(13, 13, 20, 0.5) 100%);
  pointer-events: none;
  z-index: 0;
}

@keyframes bgFloat {
  0%, 100% { 
    transform: scale(1) translate(0, 0); 
  }
  25% { 
    transform: scale(1.1) translate(-2%, 3%); 
  }
  50% { 
    transform: scale(1.05) translate(2%, -2%); 
  }
  75% { 
    transform: scale(1.15) translate(-1%, -3%); 
  }
}

.app { 
  min-height: 100%; 
  display: flex; 
  flex-direction: column;
  padding-top: calc(var(--header-height) + 16px);
  padding-bottom: calc(var(--spacing) * 32);
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Hide snowflakes for cleaner UI */
.snowflakes {
  display: none !important;
}

/* Glass Balance Bar */
.balance-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.85) 0%, rgba(20, 20, 35, 0.75) 100%);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  height: var(--header-height);
  align-items: center;
}

.balance-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--transition-normal);
}

.balance-item.stars {
  background: rgba(247, 181, 0, 0.12);
  border: 1px solid rgba(247, 181, 0, 0.2);
  padding: 8px 14px;
}

.balance-item.ton {
  background: rgba(22, 137, 255, 0.12);
  border: 1px solid rgba(22, 137, 255, 0.2);
  padding: 8px 8px 8px 14px;
}

.balance-item:hover {
  transform: scale(1.02);
}

.balance-icon-star {
  font-size: 16px;
  color: #f7b500;
}

.balance-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.balance-amount {
  color: var(--text);
}

.balance-add {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  line-height: 1;
  transition: all var(--transition-normal);
}

.balance-add:hover {
  background: var(--primary);
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(22, 137, 255, 0.4);
}

.balance-add:active {
  transform: scale(1.05);
}

/* Glass Banner Area */
.banner-area {
  padding: 0 16px;
  margin-bottom: 16px;
}

.banner-slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  max-height: 80px;
  background: linear-gradient(135deg, rgba(40, 40, 50, 0.6) 0%, rgba(30, 30, 40, 0.8) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
}

.banner-img {
  width: 100%;
  height: 80px;
  display: block;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: left center;
}

.banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  min-height: 100px;
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.banner-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.banner-highlight {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.banner-image {
  width: 90px;
  height: 90px;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* Glass Category Tabs */
.category-tabs {
  display: flex;
  gap: 24px;
  padding: 0 16px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  justify-content: center;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
}

.category-tab::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.category-tab.active {
  color: var(--text);
}

.category-tab.active::after {
  width: 100%;
}

.category-tab:hover:not(.active) {
  color: rgba(255, 255, 255, 0.7);
}

/* Glass Filters Row */
.filters-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-row::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 90px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.filter-btn .filter-value {
  color: var(--primary);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.filter-btn:active {
  transform: scale(0.98);
}

.filter-label {
  color: var(--muted);
  font-size: 12px;
}

.filter-value {
  font-weight: 600;
  font-size: 14px;
}

.filter-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

.filter-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: var(--radius-md);
  color: #1a1a1a;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.filter-expand:hover {
  background: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.filter-expand:active {
  transform: scale(0.95);
}

.filter-expand svg {
  width: 18px;
  height: 18px;
}

/* Glass Price Slider & View Controls */
.controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.price-slider-container {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  flex: 1;
  transition: all var(--transition-normal);
}

.price-slider-container:hover {
  border-color: var(--border-light);
}

.price-slider {
  flex: 1;
  display: flex;
  align-items: center;
}

.slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  background: #555;
  border-radius: 2px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.price-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 70px;
}

.price-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.items-count {
  font-size: 11px;
  color: var(--text);
}

.view-controls {
  display: flex;
  gap: 8px;
  background: transparent;
  padding: 0;
  margin-left: auto;
}

.view-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.view-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
}

.view-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-light);
}

.view-btn:active {
  transform: scale(0.95);
}

.view-btn svg {
  width: 22px;
  height: 22px;
}

.view-btn.filter-icon {
  color: var(--text);
}

/* Glass Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 0 16px 16px 16px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-bar:focus-within {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 0 0 3px rgba(22, 137, 255, 0.15),
    0 8px 30px rgba(0, 0, 0, 0.3);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.search-input::placeholder {
  color: var(--muted);
}

/* Floating Price Widget */
.floating-price-widget {
  position: fixed;
  bottom: 80px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #c9a227 0%, #d4af37 50%, #b8960f 100%);
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.floating-price-widget.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-icon {
  width: 24px;
  height: 24px;
  color: #1a1a1a;
}

.floating-icon svg {
  width: 100%;
  height: 100%;
}

.floating-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.floating-price {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.floating-items {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.6);
}

/* Glass Content Grid */
.content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: 96px;
  align-content: start;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Glass Gift Cards */
.card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(200, 200, 255, 0.06) 100%
  );
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 100%
  );
  pointer-events: none;
  border-radius: 24px 24px 0 0;
}

.card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(99, 102, 241, 0.2),
    0 0 60px rgba(139, 92, 246, 0.1),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.card:active {
  transform: translateY(-2px) scale(0.99);
}

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(60, 60, 70, 0.4) 0%,
    rgba(40, 40, 50, 0.5) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .thumb img {
  transform: scale(1.05);
}

.meta {
  display: grid;
  gap: 2px;
}

.title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.buy-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--primary) 0%, #0d5fb8 100%);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 12px rgba(22, 137, 255, 0.25);
}

.buy-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 6px 20px rgba(22, 137, 255, 0.4);
  transform: translateY(-1px);
}

.buy-btn:active {
  transform: scale(0.98);
}

.buy-btn .ton-icon {
  width: 18px;
  height: 18px;
}

.cart-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.cart-btn:hover {
  background: rgba(73, 223, 100, 0.15);
  border-color: var(--accent);
}

.cart-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(73, 223, 100, 0.4);
}

.cart-btn.selected svg {
  stroke: white;
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  stroke: rgba(255, 255, 255, 0.7);
  transition: stroke var(--transition-normal);
}

.cart-btn:hover svg {
  stroke: white;
}

/* Glass Bottom Tab Bar - Floating Style like Portals */
.tabbar {
  position: fixed;
  bottom: 10px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  z-index: 100;
}

.tabbar-main {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  gap: 2px;
  background: rgba(120, 120, 140, 0.18);
  backdrop-filter: blur(80px) saturate(180%);
  -webkit-backdrop-filter: blur(80px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 4px 6px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 16px;
  background: transparent;
}

.tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, rgba(22, 137, 255, 0.95) 0%, rgba(13, 95, 184, 0.95) 100%);
  box-shadow: 
    0 4px 16px rgba(22, 137, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-icon-wrap {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon {
  width: 16px;
  height: 16px;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.45);
  stroke: rgba(255, 255, 255, 0.45);
  fill: none;
}

.tab:hover .tab-icon {
  color: rgba(255, 255, 255, 0.7);
  stroke: rgba(255, 255, 255, 0.7);
}

.tab.active .tab-icon {
  color: white;
  stroke: white;
  fill: white;
}

.tab-label {
  font-size: 9px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tab.active .tab-label {
  color: white;
}

/* Profile Avatar - Separate Circle */
.tab-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.tab-avatar:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.tab-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.tab-avatar-img.loaded {
  display: block;
}

.tab-avatar-letter {
  font-size: 14px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

.tab-avatar-img.loaded + .tab-avatar-letter {
  display: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* Additional utility classes */
.pb-16 {
  padding-bottom: calc(var(--spacing) * 16);
}

.w-full {
  width: 100%;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Focus states */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Lazy loading */
.lazy-hidden {
  display: none !important;
}

.lazy-visible {
  animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lazy-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

.loader-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-state .empty-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.empty-state .empty-icon svg {
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.empty-state .empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state .empty-text {
  font-size: 14px;
  color: var(--muted);
}

/* Collection Modal */
.collection-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.collection-modal.active {
  opacity: 1;
  visibility: visible;
}

.collection-modal-content {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.collection-modal.active .collection-modal-content {
  transform: translateY(0);
}

.collection-modal-header {
  padding: 20px 16px 16px;
  position: relative;
  text-align: center;
}

.collection-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: inline;
}

.collection-modal-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-left: 8px;
}

.collection-modal-close {
  position: absolute;
  right: 16px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: var(--panel);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.collection-modal-close svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.collection-search {
  margin: 0 16px 16px;
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.collection-search svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.collection-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.collection-search input::placeholder {
  color: var(--muted);
}

.collection-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
}

.collection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.collection-item:last-child {
  border-bottom: none;
}

.collection-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.collection-item.selected .collection-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.collection-checkbox svg {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
}

.collection-item.selected .collection-checkbox svg {
  opacity: 1;
}

.collection-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.collection-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-info {
  flex: 1;
}

.collection-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.collection-price {
  text-align: right;
}

.collection-price-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.collection-price-label {
  font-size: 12px;
  color: var(--muted);
}

.collection-modal-footer {
  padding: 16px;
  display: flex;
  gap: 12px;
}

.collection-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.collection-btn.reset-btn {
  background: var(--panel);
  color: var(--text);
}

.collection-btn.apply-btn {
  background: var(--primary);
  color: #fff;
}

.collection-btn:active {
  transform: scale(0.97);
}

/* Model/Backdrop Filter Modal */
.filter-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.filter-modal.active {
  opacity: 1;
  visibility: visible;
}

.filter-modal-content {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.filter-modal.active .filter-modal-content {
  transform: translateY(0);
}

.filter-modal-header {
  padding: 20px 16px 16px;
  position: relative;
  text-align: center;
}

.filter-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: inline;
}

.filter-modal-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-left: 8px;
}

.filter-modal-close {
  position: absolute;
  right: 16px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: var(--panel);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.filter-modal-close svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.filter-search {
  margin: 0 16px 16px;
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-search svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.filter-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.filter-search input::placeholder {
  color: var(--muted);
}

.filter-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  max-height: 50vh;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.filter-item:last-child {
  border-bottom: none;
}

.filter-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.filter-item.selected .filter-checkbox {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-checkbox svg {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
}

.filter-item.selected .filter-checkbox svg {
  opacity: 1;
}

.filter-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--panel);
}

.filter-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-info {
  flex: 1;
}

.filter-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.filter-count {
  font-size: 13px;
  color: var(--muted);
}

.filter-modal-footer {
  padding: 16px;
  display: flex;
  gap: 12px;
}

.filter-btn-action {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.filter-btn-action.reset-btn {
  background: var(--panel);
  color: var(--text);
}

.filter-btn-action.apply-btn {
  background: var(--primary);
  color: #fff;
}

/* Gift Purchase Modal */
.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gift-modal.active {
  opacity: 1;
  visibility: visible;
}

.gift-modal-content {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 24px 16px;
  width: 100%;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  position: relative;
}

.gift-modal.active .gift-modal-content {
  transform: translateY(0);
}

.gift-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.gift-modal-close svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.gift-modal-image {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.gift-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gift-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.gift-modal-id {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 4px;
}

.gift-modal-price {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.gift-modal-actions {
  display: flex;
  gap: 10px;
  padding: 0 8px;
}

.gift-modal-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.gift-modal-btn.offer-btn {
  background: var(--panel);
  color: var(--text);
}

.gift-modal-btn.buy-modal-btn {
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gift-modal-btn.buy-modal-btn .buy-price {
  font-size: 13px;
  opacity: 0.9;
}

.gift-modal-btn:active {
  transform: scale(0.97);
}

/* Offer Modal */
.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.offer-modal.active {
  opacity: 1;
  visibility: visible;
}

.offer-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.offer-modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.offer-modal.active .offer-modal-content {
  transform: translateY(0);
}

.offer-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.offer-modal-close svg {
  width: 100%;
  height: 100%;
}

.offer-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px 0;
}

.offer-gift-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--background);
  border-radius: 12px;
  margin-bottom: 20px;
}

.offer-gift-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  flex-shrink: 0;
}

.offer-gift-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-gift-details {
  flex: 1;
}

.offer-gift-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.offer-gift-number {
  font-size: 12px;
  color: var(--muted);
}

.offer-price-col {
  text-align: center;
}

.offer-price-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.offer-price-input {
  width: 60px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: none;
  text-align: center;
  outline: none;
}

.offer-price-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.offer-price-sublabel {
  font-size: 11px;
  color: var(--muted);
}

.offer-duration {
  margin-bottom: 16px;
}

.offer-duration-label {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
}

.offer-duration-options {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.offer-duration-btn {
  padding: 10px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.offer-duration-btn.active {
  background: var(--text);
  color: var(--background);
  border-color: var(--text);
}

.offer-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}

.offer-balance-label {
  font-size: 14px;
  color: var(--muted);
}

.offer-balance-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.offer-submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.offer-submit-btn:active {
  transform: scale(0.98);
}

/* Offer Error Modal */
.offer-error-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}

.offer-error-modal.active {
  opacity: 1;
  visibility: visible;
}

.offer-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.offer-error-content {
  position: relative;
  background: var(--panel);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.offer-error-modal.active .offer-error-content {
  transform: scale(1);
}

.offer-error-icon {
  margin-bottom: 16px;
}

.offer-error-icon svg {
  width: 48px;
  height: 48px;
}

.offer-error-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.offer-error-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.offer-error-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.offer-error-btn.sync-btn {
  background: var(--panel-2);
  color: var(--text);
}

.offer-error-btn.close-btn {
  background: transparent;
  color: var(--text);
}

.offer-error-btn:last-child {
  margin-bottom: 0;
}

.offer-error-btn:active {
  transform: scale(0.98);
}

/* Buy Confirm Modal */
.buy-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.buy-confirm-modal.active {
  opacity: 1;
  visibility: visible;
}

.buy-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.buy-confirm-content {
  position: relative;
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.buy-confirm-modal.active .buy-confirm-content {
  transform: translateY(0);
}

.buy-confirm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}

.buy-confirm-close svg {
  width: 100%;
  height: 100%;
}

.buy-confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
}

.buy-confirm-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px 0;
}

.buy-confirm-gift {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--background);
  border-radius: 12px;
  margin-bottom: 16px;
}

.buy-confirm-gift-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
  flex-shrink: 0;
}

.buy-confirm-gift-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buy-confirm-gift-details {
  flex: 1;
}

.buy-confirm-gift-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.buy-confirm-gift-number {
  font-size: 12px;
  color: var(--muted);
}

.buy-confirm-gift-price {
  text-align: right;
}

.buy-confirm-price-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.buy-confirm-price-label {
  font-size: 11px;
  color: var(--muted);
}

.buy-confirm-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 8px;
}

.buy-confirm-balance-label {
  font-size: 14px;
  color: var(--muted);
}

.buy-confirm-balance-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.buy-confirm-warning {
  text-align: center;
  font-size: 14px;
  color: #ff4444;
  margin-bottom: 16px;
}

.buy-confirm-actions {
  display: flex;
  gap: 12px;
}

.buy-confirm-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.buy-confirm-btn.cancel-btn {
  background: var(--panel-2);
  color: var(--text);
}

.buy-confirm-btn.confirm-btn {
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.buy-confirm-btn.confirm-btn .confirm-price {
  font-size: 12px;
  opacity: 0.9;
}

.buy-confirm-btn:active {
  transform: scale(0.97);
}

/* Insufficient Funds Modal */
.funds-error-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}

.funds-error-modal.active {
  opacity: 1;
  visibility: visible;
}

.funds-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.funds-error-content {
  position: relative;
  background: var(--panel);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.funds-error-modal.active .funds-error-content {
  transform: scale(1);
}

.funds-error-icon {
  margin-bottom: 16px;
}

.funds-error-icon svg {
  width: 48px;
  height: 48px;
}

.funds-error-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.funds-error-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.funds-error-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--panel-2);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.funds-error-btn:active {
  transform: scale(0.98);
}

/* Selection disabled */
::selection {
  background: transparent;
}

