/* Safe Area Handling for mobile webviews */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

.safe-top {
  padding-top: max(0.75rem, var(--safe-top));
}

.safe-bottom {
  padding-bottom: max(0.75rem, var(--safe-bottom));
}

/* Glassmorphism Styles */
.glass-card {
  background: rgba(11, 15, 25, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Active ratio & style buttons */
.active-ratio {
  border-color: #6366F1 !important;
  background: rgba(99, 102, 241, 0.15) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.active-ratio div {
  border-color: #38BDF8 !important;
}

.active-style-card {
  border-color: #6366F1 !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.15)) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.active-style-card .style-icon-box {
  background: #6366F1 !important;
  color: #ffffff !important;
}

/* Custom scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.4);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Animations */
@keyframes pop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pop {
  animation: pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Disable text selection on interactive chips/buttons */
button, .chip, .ratio-btn {
  user-select: none;
  -webkit-user-select: none;
}