* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
  transition: all 0.3s ease;
}

.light {
  color: #333;
}

.dark {
  color: white;
}

#animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  transition: all 0.5s ease-in-out;
}

.light #animated-background {
  background: radial-gradient(circle at 70% 30%, #e2e8f0, #f8fafc);
  filter: blur(80px) brightness(1);
  opacity: 0.8;
}

.dark #animated-background {
  background: radial-gradient(circle at 30% 70%, #3b82f6, #1e3a8a);
  filter: blur(80px) brightness(0.6);
  opacity: 0.9;
}

.container {
  backdrop-filter: blur(12px);
  transition: all 0.3s;
  will-change: transform;
}

.light .container {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 8px 32px rgba(148, 163, 184, 0.2);
}

.dark .container {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(100, 116, 139, 0.3);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.4);
}

.container:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
}

.form-input {
  font-size: 16px;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: #5d5cde;
  box-shadow: 0 0 0 2px rgba(93, 92, 222, 0.2);
}

.modal {
  backdrop-filter: blur(5px);
  transition: opacity 0.3s ease;
}

.modal-content {
  transition: all 0.3s ease;
}

.light .modal-content {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(30, 41, 59, 0.2);
}

.dark .modal-content {
  background-color: rgba(30, 41, 59, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Contact item hover effect */
.contact-item {
  transition: all 0.2s ease;
}

.contact-item:hover {
  background-color: rgba(93, 92, 222, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(93, 92, 222, 0.5);
  }
  100% {
    box-shadow: 0 0 20px rgba(93, 92, 222, 0.8);
  }
}

/* Shimmering effect for balance display */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.dark .shimmer::after {
  background: linear-gradient(
    to right,
    rgba(30, 41, 59, 0) 0%,
    rgba(93, 92, 222, 0.2) 50%,
    rgba(30, 41, 59, 0) 100%
  );
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }
  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

/* Success animation */
.success-animation {
  animation: success-circle 0.6s ease forwards;
}

@keyframes success-circle {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.checkmark {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark 1s ease-in-out forwards;
  animation-delay: 0.4s;
}

@keyframes checkmark {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

/* Button animation for wallet connect */
.connect-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.connect-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: -1;
  transition: all 0.5s ease;
}

.connect-btn:hover::before {
  left: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(93, 92, 222, 0.5);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(93, 92, 222, 0.7);
}

/* Category pill styles */
.category-pill {
  transition: all 0.2s;
}

.category-pill:hover {
  transform: translateY(-2px);
}

/* Profile image styles */
.profile-circle {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

.badge-notification {
  position: absolute;
  top: -2px;
  right: -2px;
  height: 14px;
  width: 14px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse 1.5s infinite;
}

.theme-selector {
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.theme-selector.active {
  border-color: #5d5cde;
  transform: scale(1.05);
}

/* Network indicator animation */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.network-indicator {
  animation: blink 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }

  .modal-content {
    width: 95%;
    padding: 16px;
  }
}

/* Image cropper */
.cropper-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid #5d5cde;
}

.cropper-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* New: Balance toggle styles */
.balance-container {
  position: relative;
}

.balance-text {
  transition: all 0.3s ease;
}

.balance-hidden {
  filter: blur(4px);
}

/* Notification progress bar animation */
@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

#notificationProgressBar {
  animation: progress 5s linear forwards;
}

/* New: Splash screen animation */
@keyframes revealText {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#splashScreen h1 {
  animation: revealText 1s ease-out forwards;
}

#splashScreen p {
  animation: revealText 1s ease-out 0.5s forwards;
  opacity: 0;
}

/* Search highlight */
.search-highlight {
  background-color: rgba(93, 92, 222, 0.2);
  border-radius: 2px;
  padding: 0 2px;
}

/* ENHANCED: Additional splash screen animations */
.splash-bg {
  background: linear-gradient(-45deg, #5d5cde, #4f46e5, #7e22ce, #c026d3);
  background-size: 400% 400%;
  animation: gradient 10s ease infinite;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.splash-logo {
  filter: drop-shadow(0 0 15px rgba(93, 92, 222, 0.8));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

.circle-bg {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  animation: move-up 8s linear infinite;
}

@keyframes move-up {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}

.hexagon {
  position: absolute;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: rgba(255, 255, 255, 0.1);
  z-index: -1;
  animation: hexagon-float 15s linear infinite;
}

@keyframes hexagon-float {
  0% {
    transform: translateY(100vh) translateX(-50vw) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-20vh) translateX(100vw) rotate(360deg);
    opacity: 0;
  }
}

.loading-bar-container {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
}

.loading-bar {
  background: linear-gradient(90deg, #5d5cde, #8b5cf6);
  box-shadow: 0 0 15px #5d5cde;
  height: 100%;
  width: 0;
  transition: width 0.5s ease;
  border-radius: 2rem;
}

.loading-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer-loading 2s infinite;
}

@keyframes shimmer-loading {
  100% {
    transform: translateX(100%);
  }
}

.text-gradient {
  background: linear-gradient(90deg, #5d5cde, #8b5cf6, #c026d3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-text 3s ease infinite;
  background-size: 200% auto;
}

@keyframes gradient-text {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* NEW: Desktop search results dropdown */
#desktopSearchResults {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#desktopSearchResults.show {
  opacity: 1;
  transform: translateY(0);
  display: block;
}

/* TOTP verification digits styling */
.totp-digit-group {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.totp-digit {
  width: 40px;
  height: 50px;
  font-size: 24px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 6px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark .totp-digit {
  background-color: #374151;
  border-color: #4b5563;
  color: white;
}

/* Timer circle animation */
.timer-circle {
  transition: stroke-dashoffset 1s linear;
  transform: rotate(-90deg);
  transform-origin: center;
}

@keyframes blink-border {
  0%,
  100% {
    border-color: #5d5cde;
  }
  50% {
    border-color: #ef4444;
  }
}

.blinking-border {
  animation: blink-border 1s infinite;
}
