/* Offercash Custom Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

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

/* Transitions */
a, button {
  transition: all 0.2s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Table responsive */
@media (max-width: 768px) {
  table {
    font-size: 0.875rem;
  }

  .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Flash messages animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash-message {
  animation: slideDown 0.3s ease-out;
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 3px solid #3b82f6;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover effects */
.hover-lift {
  transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Custom badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Truncate text */
.truncate-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gradient backgrounds */
.gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-yellow {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Card shadows */
.card-shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.card-shadow:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Responsive utilities */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  nav, footer {
    display: none;
  }
}

/* Balance update animation */
@keyframes balanceUpdate {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
    color: #10b981;
  }
}

.balance-update-animation {
  animation: balanceUpdate 0.6s ease-in-out;
}

/* Slide in/out animations */
@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out;
}

/* Balance display in nav */
.balance-display-nav {
  min-width: 120px;
  text-align: center;
  transition: transform 0.2s ease-in-out;
}

.balance-display-nav:hover {
  transform: scale(1.05);
}

/* Offer card optimization */
.offer-card {
  transition: all 0.3s ease-in-out;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.offer-card-compact {
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.offer-card-compact h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.offer-card-compact p {
  font-size: 0.875rem;
  line-height: 1.4;
}

.offercash-rgb {
  animation: rgbColorChange 5s infinite;
  font-weight: bold;
}

@keyframes rgbColorChange {
  0% { color: #ff0000; }
  16.66% { color: #ff7f00; }
  33.33% { color: #ffff00; }
  50% { color: #00ff00; }
  66.66% { color: #0000ff; }
  83.33% { color: #8b00ff; }
  100% { color: #ff0000; }
}
