@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Bubblegum+Sans&display=swap');

/* Reset and Global Styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body {
  font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif !important;
  background: #000000;
  color: #fff;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(51, 144, 236, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 136, 204, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================================
   LIQUID GLASS EFFECTS
   ============================================================================ */
@keyframes liquidShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes liquidReflection {
  0%, 100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    opacity: 0.3;
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
    opacity: 0.6;
  }
}

/* ============================================================================
   SCREENS
   ============================================================================ */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  display: none;
  padding: calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  background: #000000;
  z-index: 1;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

#loading.active {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

.loading-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(51, 144, 236, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 144, 236, 0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.7;
  z-index: 0;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.85;
  }
}

.sparkles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.sparkle::before {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(51, 144, 236, 1) 0%, rgba(51, 144, 236, 0.8) 30%, transparent 60%);
  box-shadow: 
    0 0 8px rgba(51, 144, 236, 1),
    0 0 16px rgba(51, 144, 236, 0.9),
    0 0 32px rgba(51, 144, 236, 0.7),
    0 0 48px rgba(51, 144, 236, 0.5);
  animation: sparklePulse var(--sparkle-duration-1, 1.2s) cubic-bezier(0.4, 0, 0.6, 1) infinite;
  animation-delay: var(--sparkle-delay, 0s);
}

.sparkle::after {
  width: 250%;
  height: 250%;
  background: radial-gradient(circle, rgba(51, 144, 236, 0.8) 0%, rgba(51, 144, 236, 0.5) 25%, transparent 60%);
  animation: sparkleGlow var(--sparkle-duration-2, 1.5s) cubic-bezier(0.4, 0, 0.6, 1) infinite;
  animation-delay: var(--sparkle-delay, 0s);
}

.sparkle.sparkle-purple::before {
  background: radial-gradient(circle, rgba(51, 144, 236, 1) 0%, rgba(51, 144, 236, 0.9) 25%, transparent 55%);
  box-shadow: 
    0 0 10px rgba(51, 144, 236, 1),
    0 0 20px rgba(51, 144, 236, 1),
    0 0 40px rgba(51, 144, 236, 0.9),
    0 0 60px rgba(51, 144, 236, 0.7),
    0 0 80px rgba(51, 144, 236, 0.5);
}

@keyframes sparklePulse {
  0%, 100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.6);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.4);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.2);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@keyframes sparkleGlow {
  0%, 100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.8);
  }
  33% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.3);
  }
  66% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.loading-inner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  z-index: 1;
  margin: 0;
  padding: 0;
}

.logo {
  margin: 0;
  font-size: 58px;
  font-weight: 400;
  position: relative;
  font-family: 'Fredoka One', cursive;
  letter-spacing: 1px;
}

.logo-text {
  font-size: 58px;
  font-weight: 400;
  font-family: 'Fredoka One', cursive;
  color: rgba(51, 144, 236, 1);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-letter {
  display: inline-block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: letterDraw forwards;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Individual letter drawing animation */
@keyframes letterDraw {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(5px);
  }
  60% {
    opacity: 0.8;
    clip-path: inset(0 30% 0 0);
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

.hanger {
  display: block;
  filter: drop-shadow(0 0 30px rgba(51, 144, 236, 0.6)) drop-shadow(0 10px 40px rgba(0, 0, 0, 0.8));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}


.hanger-home {
  width: 200px;
}

.large-hanger {
  width: 240px;
  margin-top: -280px;
  margin-bottom: 30px;
}


/* ============================================================================
   HOME SCREEN
   ============================================================================ */
.home-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 100%;
  height: 50vh;
  background: radial-gradient(ellipse at center top, rgba(51, 144, 236, 0.25), rgba(0, 136, 204, 0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.home-inner {
  height: 100%;
  max-width: 420px;
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.text {
  max-width: 360px;
  margin-top: -20%;
}

.hero {
  margin-bottom: 12px;
}

.hero-text {
  font-size: 34px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  display: inline-block;
  position: relative;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.desc {
  margin-top: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.2px;
}

/* ============================================================================
   BUTTONS - LIQUID GLASS EFFECT
   ============================================================================ */
.buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.btn {
  width: 100%;
  max-width: 320px;
  padding: 16px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(51, 144, 236, 0.3);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: rgba(30, 30, 30, 0.3);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: #fff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  z-index: 1;
}

/* Liquid Glass Shimmer Effect */
.btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 3s ease-in-out infinite;
  opacity: 0.6;
  z-index: -1;
  border-radius: 16px;
}

/* Liquid Glass Reflection */
.btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  animation: liquidReflection 4s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

.btn:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.btn:hover::after {
  opacity: 0.8;
}

.btn:hover {
  border-color: rgba(51, 144, 236, 0.6);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(51, 144, 236, 0.2);
  transform: translateY(-2px);
  background: rgba(30, 30, 30, 0.4);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 
    0 4px 20px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.2), rgba(0, 136, 204, 0.15));
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 
    0 4px 25px rgba(51, 144, 236, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(51, 144, 236, 0.15);
}

.btn-primary::before {
  background: linear-gradient(
    135deg,
    transparent 25%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 75%
  );
  opacity: 0.8;
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.3), rgba(0, 136, 204, 0.2));
  box-shadow: 
    0 8px 45px rgba(51, 144, 236, 0.5),
    0 0 0 1px rgba(51, 144, 236, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(51, 144, 236, 0.25);
}

.btn-secondary {
  width: 65%;
  font-size: 14px;
  opacity: 0.9;
}

/* ============================================================================
   LANGUAGE SWITCHER - LIQUID GLASS
   ============================================================================ */
.lang-switch {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  display: flex;
  gap: 6px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(51, 144, 236, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  overflow: hidden;
  width: auto;
  max-width: none;
}

.lang-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.lang-switch button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.lang-switch button.active {
  background: rgba(51, 144, 236, 0.25);
  color: #fff;
  box-shadow: 0 0 15px rgba(51, 144, 236, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.by {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.5px;
}

.thanks-api {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.5px;
  z-index: 1;
}

/* ============================================================================
   PROFILE PAGE
   ============================================================================ */
#newPage {
  background: #000000;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  padding-top: calc(70px + env(safe-area-inset-top));
  text-align: center;
  overflow-y: auto;
  height: 100vh;
  position: relative;
}

.profile-container {
  width: 100%;
  max-width: 420px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  margin-top: 10px;
  border: 2px solid rgba(51, 144, 236, 0.3);
  box-shadow: 
    0 0 30px rgba(51, 144, 236, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.5);
  position: relative;
}

.avatar::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.6), rgba(0, 136, 204, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar:hover::before {
  opacity: 1;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username {
  margin-top: 0;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.username:hover {
  color: #3390EC;
  text-shadow: 0 0 15px rgba(51, 144, 236, 0.5);
}

.username:active {
  transform: scale(0.98);
}

.user-info {
  margin-top: 0;
  margin-bottom: 20px;
}

.status-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 14px;
}

/* Verification Icon Button - Liquid Glass */
.verification-icon-btn {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #3390EC, #0088cc);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(51, 144, 236, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 3px 3px 3px 3px / 4px 4px 4px 4px;
  clip-path: polygon(2% 0%, 98% 0%, 100% 5%, 100% 75%, 52% 98%, 50% 100%, 48% 98%, 0% 75%, 0% 5%);
  -webkit-clip-path: polygon(2% 0%, 98% 0%, 100% 5%, 100% 75%, 52% 98%, 50% 100%, 48% 98%, 0% 75%, 0% 5%);
  align-self: center;
  transform: translateY(1px);
}

.verification-icon-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  animation: liquidReflection 3s ease-in-out infinite;
  pointer-events: none;
}

.verification-icon-btn:hover {
  transform: translateY(1px) scale(1.15);
  box-shadow: 0 0 30px rgba(51, 144, 236, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.verification-icon-btn:active {
  transform: translateY(1px) scale(1.05);
}

.verification-number {
  font-size: 9px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 1;
  position: relative;
  line-height: 1;
  margin-top: -1px;
}

.status {
  margin: 0;
  font-size: inherit;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  flex-shrink: 0;
}

/* User Info Panel */
.user-info-panel {
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 20px;
  color: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(51, 144, 236, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.user-info-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.user-info-panel p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.user-info-panel .phone-number {
  font-size: 18px;
  font-weight: 600;
  color: #3390EC;
  text-shadow: 0 0 10px rgba(51, 144, 236, 0.4);
}

.user-info-panel .userhandle {
  font-size: 18px;
  font-weight: 600;
  color: #3390EC;
  text-shadow: 0 0 10px rgba(51, 144, 236, 0.4);
}

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.panel-content {
  flex: 1;
}

.separator {
  border: none;
  border-top: 1px solid rgba(51, 144, 236, 0.2);
  margin: 8px 0;
}

.tabs-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 24px auto 0;
  width: auto;
}

.tab-button {
  padding: 10px 28px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 4s ease-in-out infinite;
  pointer-events: none;
  border-radius: 50px;
  opacity: 0.5;
  z-index: -1;
}

.tab-button:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.tab-button:hover {
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 
    0 6px 30px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  color: rgba(255, 255, 255, 0.9);
}

.tab-button.active {
  background: rgba(51, 144, 236, 0.15);
  border-color: rgba(51, 144, 236, 0.4);
  color: #fff;
  box-shadow: 
    0 6px 30px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-button.active::before {
  opacity: 1;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
}

.tab-button:active {
  transform: translateY(0) scale(0.98);
}

.stickers-soon {
  margin: 50px auto 0;
  text-align: center;
  font-size: 36px;
  font-weight: 400;
  font-family: 'Fredoka One', cursive;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
  line-height: 1.4;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
  width: 100%;
}

/* ============================================================================
   GIFT ITEMS - LIQUID GLASS
   ============================================================================ */
.gift-item {
  /* background управляется через JavaScript для поддержки backdrop и pattern */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  height: 100px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 144, 236, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(51, 144, 236, 0.08);
  z-index: 1;
}


/* Pattern overlay - применяется поверх освещения через ::after, но ПОД подарком */
.gift-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gift-pattern-image, none);
  background-repeat: repeat;
  background-size: 100px 100px; /* Подогнано под слоты (100px) и предварительное окно (200px) */
  background-position: 0 0;
  pointer-events: none;
  z-index: 0; /* Под подарком (z-index: 1), но поверх фона */
  border-radius: 16px;
}

/* Скрываем ::after если pattern не задан */
.gift-item:not([style*="--gift-pattern-image"])::after,
.gift-item[style*="--gift-pattern-image: none"]::after {
  display: none;
}

.gift-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 30%, rgba(51, 144, 236, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 136, 204, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  border-radius: 16px;
  opacity: 0.6;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.gift-item:hover {
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(51, 144, 236, 0.12);
  transform: translateY(-2px);
  /* background управляется через JavaScript */
}


.gift-item:hover::before {
  opacity: 0.9;
  background: 
    radial-gradient(circle at 30% 30%, rgba(51, 144, 236, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 136, 204, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.gift-item:active {
  transform: translateY(0) scale(0.98);
}

.gift-item span {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.gift-item:hover span {
  color: #3390EC;
  text-shadow: 0 0 15px rgba(51, 144, 236, 0.6);
}

/* ============================================================================
   CORNER RIBBON (Угловая лента)
   ============================================================================ */
/* Угловая лента в правом верхнем углу каждого слота */
.gift-item .corner-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 35px;
  height: 35px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.gift-item .corner-ribbon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* ============================================================================
   ADD SLOTS BUTTON
   ============================================================================ */
.add-slots-btn {
  width: 96px;
  height: 56px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 144, 236, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(51, 144, 236, 0.08);
  z-index: 1;
  margin: 12px auto 0;
  padding: 0;
  font-family: inherit;
}

.add-slots-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 30%, rgba(51, 144, 236, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 136, 204, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  border-radius: 16px;
  opacity: 0.6;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.add-slots-btn:hover:not(.disabled) {
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(51, 144, 236, 0.12);
  transform: translateY(-2px);
  background: rgba(20, 20, 20, 0.45);
}

.add-slots-btn:hover:not(.disabled)::before {
  opacity: 0.9;
  background: 
    radial-gradient(circle at 30% 30%, rgba(51, 144, 236, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0, 136, 204, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.add-slots-btn:active:not(.disabled) {
  transform: translateY(0) scale(0.98);
}

.add-slots-btn span {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  z-index: 1;
}

.add-slots-btn:hover:not(.disabled) span {
  color: #3390EC;
  text-shadow: 0 0 15px rgba(51, 144, 236, 0.6);
}

.add-slots-btn.disabled {
  cursor: not-allowed;
  opacity: 0.4;
  border-color: rgba(128, 128, 128, 0.2);
  background: rgba(20, 20, 20, 0.2);
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(128, 128, 128, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.add-slots-btn.disabled::before {
  opacity: 0.3;
  background: 
    radial-gradient(circle at 30% 30%, rgba(128, 128, 128, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(128, 128, 128, 0.08) 0%, transparent 50%);
}

.add-slots-btn.disabled span {
  color: rgba(255, 255, 255, 0.3);
  text-shadow: none;
}

/* Back Button - Liquid Glass */
.back-btn {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top));
  left: 20px;
  width: 44px;
  height: 44px;
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  color: white;
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.back-btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 100%;
  height: 100%;
}

.back-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 4s ease-in-out infinite;
  border-radius: 12px;
  z-index: -1;
  opacity: 0.6;
}

.back-btn:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.back-btn:hover {
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.back-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Edit Button - Liquid Glass */
.edit-btn {
  background: rgba(20, 20, 20, 0.4);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.edit-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 4s ease-in-out infinite;
  border-radius: 12px;
  z-index: -1;
  opacity: 0.6;
}

.edit-btn:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.edit-btn:hover {
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: #3390EC;
}

.edit-btn-top {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  z-index: 10000;
}

.share-btn-top {
  right: 72px;
}

.share-btn-top svg {
  display: block;
}

/* Read-only profile state */
.read-only .edit-btn:not(.share-btn-top),
.read-only .edit-btn-inline,
.read-only #verificationIconBtn,
.read-only .gift-item,
.read-only .add-slots-btn {
  pointer-events: none;
  opacity: 0.5;
}

.edit-btn-inline {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: rgba(20, 20, 20, 0.4);
}

.edit-btn:active {
  transform: translateY(0) scale(0.95);
}

/* Avatar Crop Modal */
.crop-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.crop-modal.active {
  display: flex;
}

.crop-modal-content {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(51, 144, 236, 0.2);
  border: 1px solid rgba(51, 144, 236, 0.2);
  overflow: hidden;
}

/* Subscription Modal */
.subscription-modal-content {
  width: min(360px, 92vw);
}

.subscription-modal-body {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.subscription-price {
  font-weight: 600;
  margin-top: 8px;
  color: #ffffff;
}

.crop-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(51, 144, 236, 0.2);
  background: linear-gradient(to bottom, rgba(51, 144, 236, 0.05), transparent);
  min-height: 58px;
}

.crop-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.2px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  flex: 1;
  min-width: 0;
}

.crop-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.crop-close-btn:hover {
  color: #3390EC;
  background: rgba(51, 144, 236, 0.1);
}

.crop-container {
  position: relative;
  width: 100%;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  min-height: 300px;
  max-height: 60vh;
  overflow: hidden;
}

#cropCanvas {
  max-width: 100%;
  max-height: 60vh;
  cursor: move;
  touch-action: none;
  border-radius: 12px;
}

.crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(51, 144, 236, 0.6);
  box-shadow: 
    0 0 0 9999px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(51, 144, 236, 0.4);
  pointer-events: none;
}

.crop-controls {
  padding: 20px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid rgba(51, 144, 236, 0.2);
  background: linear-gradient(to top, rgba(51, 144, 236, 0.05), transparent);
  flex-wrap: wrap;
}

.crop-cancel-btn,
.crop-confirm-btn {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  line-height: 1.3;
  letter-spacing: 0.2px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.crop-cancel-btn {
  background: rgba(40, 40, 40, 0.6);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(51, 144, 236, 0.2);
}

.crop-cancel-btn:hover {
  background: rgba(50, 50, 50, 0.7);
  border-color: rgba(51, 144, 236, 0.3);
  transform: translateY(-2px);
}

.crop-cancel-btn:active {
  transform: translateY(0) scale(0.98);
}

.crop-confirm-btn {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.4), rgba(0, 136, 204, 0.3));
  color: white;
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 0 4px 20px rgba(51, 144, 236, 0.3);
}

.crop-confirm-btn:hover {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.5), rgba(0, 136, 204, 0.4));
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 0 6px 30px rgba(51, 144, 236, 0.4);
  transform: translateY(-2px);
}

.crop-confirm-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Phone Number Edit Modal */
.phone-edit-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.phone-edit-modal.active {
  display: flex;
}

.phone-edit-content {
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  width: 85%;
  max-width: 360px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(51, 144, 236, 0.2);
  border: 1px solid rgba(51, 144, 236, 0.2);
  overflow: hidden;
}

.phone-edit-header {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(51, 144, 236, 0.2);
  background: linear-gradient(to bottom, rgba(51, 144, 236, 0.05), transparent);
  min-height: 54px;
}

.phone-edit-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.2px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  flex: 1;
  min-width: 0;
}

.phone-edit-close {
  background: transparent;
  border: none;
  color: rgba(187, 187, 187, 0.8);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 8px;
  opacity: 0.7;
}

.phone-edit-close:hover {
  color: #3390EC;
  background: rgba(51, 144, 236, 0.1);
  opacity: 1;
}

.phone-edit-body {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(10, 10, 10, 0.4);
}

.phone-prefix {
  font-size: 15px;
  font-weight: 600;
  color: #3390EC;
  flex-shrink: 0;
  opacity: 0.95;
  text-shadow: 0 0 10px rgba(51, 144, 236, 0.4);
  line-height: 1.4;
}

.phone-number-input {
  flex: 1;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #3390EC;
  font-family: 'Ubuntu', sans-serif;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 0 10px rgba(51, 144, 236, 0.3);
  line-height: 1.4;
}

.phone-number-input:focus {
  border-color: rgba(51, 144, 236, 0.5);
  background: rgba(10, 10, 10, 0.7);
  box-shadow: 
    0 0 0 3px rgba(51, 144, 236, 0.1),
    0 0 20px rgba(51, 144, 236, 0.3),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.phone-number-input::placeholder {
  color: rgba(187, 187, 187, 0.4);
}

.phone-edit-footer {
  padding: 18px 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid rgba(51, 144, 236, 0.2);
  background: linear-gradient(to top, rgba(51, 144, 236, 0.05), transparent);
  flex-wrap: wrap;
}

.phone-edit-cancel,
.phone-edit-confirm {
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.phone-edit-cancel {
  background: rgba(40, 40, 40, 0.6);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(51, 144, 236, 0.2);
}

.phone-edit-cancel:hover {
  background: rgba(50, 50, 50, 0.7);
  border-color: rgba(51, 144, 236, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.phone-edit-cancel:active {
  transform: translateY(0) scale(0.98);
}

.phone-edit-confirm {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.4), rgba(0, 136, 204, 0.3));
  color: white;
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 0 4px 20px rgba(51, 144, 236, 0.3);
}

.phone-edit-confirm:hover {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.5), rgba(0, 136, 204, 0.4));
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 0 6px 30px rgba(51, 144, 236, 0.4);
  transform: translateY(-2px);
}

.phone-edit-confirm:active {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.6), rgba(0, 136, 204, 0.5));
  transform: translateY(0) scale(0.98);
}

/* Filters Modal */
.filters-modal-content {
  max-width: 380px;
  min-width: 300px;
  max-height: 85vh;
  width: 90%;
}

/* Filters Preview Section */
.filters-preview {
  padding: 16px 22px 18px 22px;
  background: linear-gradient(180deg, rgba(15, 15, 20, 0.95) 0%, rgba(10, 10, 15, 0.85) 100%);
  border-bottom: 1px solid rgba(51, 144, 236, 0.2);
  position: relative;
  overflow: visible;
  margin-bottom: 0;
}

.filters-preview-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: opacity 0.3s ease;
}

.filters-preview-label.hidden {
  opacity: 0;
  display: none;
}

.filters-preview-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: 200px;
  /* background управляется через JavaScript для поддержки backdrop и pattern */
  border-radius: 14px;
  border: 1px solid rgba(51, 144, 236, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 1;
  isolation: isolate; /* Создаём новый stacking context */
}

/* Фон через ::before псевдоэлемент */
.filters-preview-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--preview-background, rgba(0, 0, 0, 0.3));
  background-size: var(--preview-background-size, 100%);
  background-repeat: var(--preview-background-repeat, no-repeat);
  background-position: var(--preview-background-position, center);
  z-index: -2; /* Под pattern */
  border-radius: 14px;
  pointer-events: none;
}

/* Pattern через ::after псевдоэлемент */
.filters-preview-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--preview-pattern-image, none);
  background-size: 100px 100px; /* Подогнано под слоты (100px) и предварительное окно (200px) */
  background-repeat: repeat;
  background-position: 0 0;
  pointer-events: none;
  z-index: -1; /* Поверх фона, но под подарком */
  border-radius: 14px;
}

/* Скрываем ::after если pattern не задан */
.filters-preview-container[style*="--preview-pattern-image: none"]::after,
.filters-preview-container:not([style*="--preview-pattern-image"])::after {
  display: none;
}


.filters-preview-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.filters-preview-container img,
.filters-preview-container > div {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.filters-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: rgba(10, 10, 10, 0.4);
  overflow-y: auto;
  max-height: calc(85vh - 280px);
}

.filters-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* Filter Action Buttons - Liquid Glass */
.filter-action-btn {
  background: rgba(40, 40, 40, 0.5);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.filter-action-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 4s ease-in-out infinite;
  border-radius: 12px;
  z-index: -1;
  opacity: 0.6;
}

.filter-action-btn:hover::before {
  opacity: 1;
  animation-duration: 2s;
}

.filter-reset-btn,
.filter-copy-btn {
  flex: 1;
  max-width: 140px;
  min-width: 120px;
}

.filter-action-btn:hover {
  background: rgba(50, 50, 50, 0.6);
  border-color: rgba(51, 144, 236, 0.5);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.filter-action-btn:active {
  transform: translateY(0) scale(0.98);
}

.filter-action-btn svg {
  opacity: 0.9;
  color: #3390EC;
}

.filter-action-btn span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.filters-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-item {
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(51, 144, 236, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.filter-item::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  animation: liquidShimmer 5s ease-in-out infinite;
  border-radius: 14px;
  z-index: -1;
  opacity: 0.5;
}

.filter-item:hover::before {
  opacity: 1;
  animation-duration: 2.5s;
}

.filter-item:hover {
  background: rgba(20, 20, 20, 0.6);
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 
    0 8px 40px rgba(51, 144, 236, 0.4),
    0 0 0 1px rgba(51, 144, 236, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.filter-item:active {
  transform: translateY(0) scale(0.98);
}

.filter-label {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  margin-right: 12px;
}

.filter-value {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.filter-value span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  text-align: right;
}

.filter-chevron {
  opacity: 0.7;
  transition: transform 0.3s ease;
  color: #3390EC;
}

.filter-item:hover .filter-chevron {
  opacity: 1;
  transform: translateY(2px);
  color: #3390EC;
}

.filters-footer {
  padding: 20px 22px;
  border-top: 1px solid rgba(51, 144, 236, 0.2);
  background: linear-gradient(to top, rgba(51, 144, 236, 0.05), transparent);
}

.filters-apply-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.5), rgba(0, 136, 204, 0.4));
  color: white;
  border: 1px solid rgba(51, 144, 236, 0.4);
  border-radius: 14px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 25px rgba(51, 144, 236, 0.3);
  line-height: 1.3;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.filters-apply-btn:hover {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.6), rgba(0, 136, 204, 0.5));
  border-color: rgba(51, 144, 236, 0.5);
  box-shadow: 0 6px 35px rgba(51, 144, 236, 0.4);
  transform: translateY(-2px);
}

.filters-apply-btn:active {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.7), rgba(0, 136, 204, 0.6));
  transform: translateY(0) scale(0.98);
}

/* Number Slider Modal */
.number-slider-content {
  max-width: 220px;
  max-height: 360px;
}

.number-slider-body {
  padding: 12px 14px;
  background-color: rgba(10, 10, 10, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 240px;
}

.number-slider-container {
  width: 100%;
  height: 100%;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.number-slider-container::-webkit-scrollbar {
  width: 6px;
}

.number-slider-container::-webkit-scrollbar-track {
  background: rgba(51, 144, 236, 0.1);
  border-radius: 3px;
}

.number-slider-container::-webkit-scrollbar-thumb {
  background: rgba(51, 144, 236, 0.4);
  border-radius: 3px;
}

.number-slider-container::-webkit-scrollbar-thumb:hover {
  background: rgba(51, 144, 236, 0.6);
}

.number-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(51, 144, 236, 0.2);
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.number-item:hover {
  background: rgba(51, 144, 236, 0.2);
  border-color: rgba(51, 144, 236, 0.4);
  box-shadow: 0 4px 20px rgba(51, 144, 236, 0.3);
  transform: scale(1.1);
}

.number-item:active {
  transform: scale(1.05);
}

.number-item.selected {
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.6), rgba(0, 136, 204, 0.5));
  border-color: rgba(51, 144, 236, 0.6);
  color: white;
  box-shadow: 
    0 6px 30px rgba(51, 144, 236, 0.5),
    0 0 0 1px rgba(51, 144, 236, 0.4);
  transform: scale(1.2);
}


/* Filter Dropdown */
.filter-dropdown {
  position: fixed;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(51, 144, 236, 0.3);
  max-height: min(500px, calc(100vh - 150px));
  min-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10002;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(51, 144, 236, 0.2);
  animation: dropdownFadeIn 0.2s ease-out;
  border-radius: 12px;
}

.filter-dropdown-search-container {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(51, 144, 236, 0.2);
  background: rgba(10, 10, 10, 0.3);
}

.filter-dropdown-search {
  width: 100%;
  padding: 10px 12px;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(51, 144, 236, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: 'Ubuntu', sans-serif;
  outline: none;
  transition: all 0.2s ease;
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: rgba(20, 20, 20, 0.95);
}

.filter-dropdown-search:focus {
  border-color: rgba(51, 144, 236, 0.4);
  background: rgba(20, 20, 20, 0.8);
  box-shadow: 0 0 0 2px rgba(51, 144, 236, 0.1);
}

.filter-dropdown-search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.filter-dropdown-search-empty {
  padding: 16px 18px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-dropdown::-webkit-scrollbar {
  width: 6px;
}

.filter-dropdown::-webkit-scrollbar-track {
  background: rgba(51, 144, 236, 0.1);
  border-radius: 3px;
}

.filter-dropdown::-webkit-scrollbar-thumb {
  background: rgba(51, 144, 236, 0.4);
  border-radius: 3px;
}

.filter-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(51, 144, 236, 0.6);
}

.filter-dropdown-item {
  padding: 12px 18px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(51, 144, 236, 0.1);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-dropdown-item:last-child {
  border-bottom: none;
}

.filter-dropdown-item:hover {
  background: rgba(51, 144, 236, 0.2);
  color: #fff;
}

.filter-dropdown-item.selected {
  background: rgba(51, 144, 236, 0.3);
  color: #3390EC;
  font-weight: 600;
}

.filter-dropdown-item.selected .filter-dropdown-item-text::after {
  content: " ✓";
  opacity: 0.8;
  margin-left: 4px;
}

.filter-dropdown-item-image-container {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.filter-dropdown-item-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  display: block;
  transition: opacity 0.2s ease;
}

.filter-dropdown-item-color-preview {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-dropdown-item:hover .filter-dropdown-item-color-preview {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-dropdown-item-text {
  flex: 1;
  min-width: 0;
  font-family: 'Ubuntu', sans-serif;
}

.filter-dropdown-loading,
.filter-dropdown-empty,
.filter-dropdown-error {
  padding: 20px 18px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

.filter-dropdown-error {
  color: rgba(255, 100, 100, 0.8);
}

/* Gift item with image */
.gift-item img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
}

