@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease;
  background: radial-gradient(120% 120% at 15% 10%, rgba(99, 102, 241, 0.15), transparent 60%),
              radial-gradient(120% 120% at 90% 20%, rgba(16, 185, 129, 0.12), transparent 65%),
              #f5f7fb;
}

.dark body {
  background: radial-gradient(120% 120% at 15% 10%, rgba(99, 102, 241, 0.15), transparent 60%),
              radial-gradient(120% 120% at 90% 20%, rgba(79, 70, 229, 0.18), transparent 65%),
              #0f172a;
}

.app-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  isolation: isolate;
}

.app-wrapper::before,
.app-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 48px;
  opacity: 0.5;
  filter: blur(120px);
  z-index: -1;
}

.app-wrapper::before {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.12));
}

.app-wrapper::after {
  background: linear-gradient(45deg, rgba(16, 185, 129, 0.18), rgba(56, 189, 248, 0.12));
  mix-blend-mode: screen;
}

.dark .app-wrapper::before {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(236, 72, 153, 0.2));
}

.dark .app-wrapper::after {
  background: linear-gradient(45deg, rgba(16, 185, 129, 0.25), rgba(56, 189, 248, 0.18));
  mix-blend-mode: screen;
}

.glass-panel {
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.75));
  padding: 2.25rem;
  box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(22px);
}

.dark .glass-panel {
  border-color: rgba(71, 85, 105, 0.45);
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.65));
  box-shadow: 0 30px 60px -35px rgba(15, 23, 42, 0.9);
}

.chip {
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.65);
  padding: 0.35rem 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.dark .chip {
  border-color: rgba(71, 85, 105, 0.6);
  background: rgba(15, 23, 42, 0.6);
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e293b;
  background: linear-gradient(120deg, rgba(148, 163, 184, 0.2), rgba(99, 102, 241, 0.2));
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 25px -20px rgba(15, 23, 42, 0.9);
}

.pill-button:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 30px -20px rgba(15, 23, 42, 0.7);
}

.dark .pill-button {
  color: #e2e8f0;
  background: linear-gradient(120deg, rgba(51, 65, 85, 0.7), rgba(99, 102, 241, 0.35));
  border-color: rgba(79, 70, 229, 0.35);
}

.dark .pill-button:hover {
  border-color: rgba(129, 140, 248, 0.45);
}

.modal-panel {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.modal-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 40px 80px -45px rgba(15, 23, 42, 0.55);
}

.modal-card {
  border-radius: 20px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.85);
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 0.75rem;
}

.dark .modal-card {
  border-color: rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.15);
}

.embed-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.6);
}

.embed-header {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.embed-instruction {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.embed-instruction label {
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

.embed-heading {
  display: grid;
  gap: 0.5rem;
  max-width: 24rem;
}

.embed-header + .embed-preview,
.embed-header + .embed-preview + .space-y-2 {
  margin-top: 0.25rem;
}

.embed-header .text-sm {
  line-height: 1.5;
}

.embed-header .text-lg {
  margin: 0;
}

.dark .embed-preview {
  border-color: rgba(71, 85, 105, 0.6);
  background: rgba(15, 23, 42, 0.6);
}

.embed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff6154 0%, #ff7a59 45%, #ffa26b 100%);
  color: #ffffff;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 20px 38px -22px rgba(255, 97, 84, 0.65);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.embed-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -20px rgba(255, 97, 84, 0.7);
}

.embed-badge:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.embed-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.embed-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.embed-badge-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.82;
}

.embed-badge-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.dark .embed-badge {
  box-shadow: 0 20px 48px -24px rgba(0, 0, 0, 0.6);
}

.dark .embed-badge-icon {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.embed-code-group {
  position: relative;
}

.embed-code {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.04);
  padding: 1rem 1.1rem;
  font-family: 'Fira Code', 'Source Code Pro', monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  resize: none;
  color: #0f172a;
}

.embed-code:focus {
  outline: 2px solid rgba(79, 70, 229, 0.5);
  outline-offset: 2px;
}

.dark .embed-code {
  border-color: rgba(71, 85, 105, 0.6);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #1e293b;
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.copy-button:hover {
  transform: translateY(-1px);
  background: #0f172a;
}

.dark .copy-button {
  background: #475569;
  color: #f8fafc;
}

.dark .copy-button:hover {
  background: #1e293b;
}

.submit-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.85rem 1.6rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(120deg, rgba(79, 70, 229, 0.18), rgba(16, 185, 129, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #1e293b;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -28px rgba(15, 23, 42, 0.65);
}

.dark .submit-link {
  color: #e2e8f0;
  border-color: rgba(129, 140, 248, 0.4);
  background: linear-gradient(120deg, rgba(79, 70, 229, 0.35), rgba(16, 185, 129, 0.28));
}

.dark .submit-link:hover {
  box-shadow: 0 18px 38px -28px rgba(15, 23, 42, 0.9);
}

.copy-status-success {
  color: #047857 !important;
}

.dark .copy-status-success {
  color: #34d399 !important;
}

/* Card styling */

.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 24px;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -40px rgba(15, 23, 42, 0.45);
}

.card-container {
  position: relative;
  perspective: 1500px;
}

.card-front, .card-back {
  backface-visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 24px;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.card-back {
  transform: rotateY(180deg);
}

.card-front.flipped {
  transform: rotateY(-180deg);
}

/* Adjust card container when flipped */
.card-container.flipped {
  z-index: 10;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.card-back.flipped {
  transform: rotateY(0deg);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Button effects */
.signup-btn, .details-btn, .review-btn {
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.signup-btn:hover, .review-btn:hover, .details-btn:hover {
  transform: translateY(-2px);
}

.signup-btn:active, .review-btn:active, .details-btn:active {
  transform: translateY(0);
}

/* Rating icons styling */
.ratings i.fa-star, .ratings i.fab {
  font-size: 0.9rem;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

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

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

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

/* Payment info styling */
.min-payout, .avg-pay {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.min-payout:hover, .avg-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Theme toggle button */
.theme-toggle {
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg);
}

/* Search input effect */
.search-input {
  transition: all 0.3s ease;
}

.search-input:focus {
  box-shadow: 0 25px 50px -30px rgba(79, 70, 229, 0.5);
  transform: translateY(-2px);
}

/* Card detail tags */
.payment-method, .feature {
  transition: all 0.2s ease;
}

.payment-method:hover, .feature:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Fancy gradient effects */
@media (prefers-reduced-motion: no-preference) {
  .bg-gradient-to-r {
    background-size: 200% auto;
    transition: background-position 0.5s ease;
  }
  
  .bg-gradient-to-r:hover {
    background-position: right center;
  }
}

/* Animation for new cards */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#cardContainer > div {
  animation: fadeIn 0.5s ease-out backwards;
}

#cardContainer > div:nth-child(1) { animation-delay: 0.05s; }
#cardContainer > div:nth-child(2) { animation-delay: 0.1s; }
#cardContainer > div:nth-child(3) { animation-delay: 0.15s; }
#cardContainer > div:nth-child(4) { animation-delay: 0.2s; }
#cardContainer > div:nth-child(5) { animation-delay: 0.25s; }
#cardContainer > div:nth-child(6) { animation-delay: 0.3s; }
#cardContainer > div:nth-child(7) { animation-delay: 0.35s; }
#cardContainer > div:nth-child(8) { animation-delay: 0.4s; }
#cardContainer > div:nth-child(9) { animation-delay: 0.45s; }

/* Responsive adjustments */
@media (max-width: 640px) {
  .ratings {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
  }
}

/* Back button animation */
.back-btn {
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-btn:hover {
  transform: rotate(90deg);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Card content sections hover effects */
.card-back .bg-gray-100, 
.card-back .bg-indigo-50,
.card-back .bg-emerald-50,
.card-back .bg-amber-50,
.card-back .bg-purple-50 {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-back .bg-gray-100:hover, 
.card-back .bg-indigo-50:hover,
.card-back .bg-emerald-50:hover,
.card-back .bg-amber-50:hover,
.card-back .bg-purple-50:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Dark mode adjustments */
.dark .card-back .bg-gray-100:hover,
.dark .card-back .bg-indigo-900:hover,
.dark .card-back .bg-emerald-900:hover,
.dark .card-back .bg-amber-900:hover,
.dark .card-back .bg-purple-900:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
