* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 50%, #0d1628 100%);
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Animated background elements */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Header Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.75rem;
  animation: float 3s ease-in-out infinite;
}

.logo h1 {
  margin: 0;
  font-size: 1.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.credits-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-size: 0.95rem;
  font-weight: 600;
}

.credits-icon {
  font-size: 1.25rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  font-weight: 500;  
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
}

/* Tool Cards */
.tool-card {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.8) 0%,
    rgba(15, 23, 42, 0.6) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow:
    0 16px 48px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.icon-box {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(168, 85, 247, 0.2)
  );
  border-radius: 12px;
  flex-shrink: 0;
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

/* Input Fields */
.input-field {
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.input-field::placeholder {
  color: #64748b;
}

.input-field:focus {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-icon {
  font-size: 1.1rem;
}

/* Output Section */
.output-section {
  margin-top: 0.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.1);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Loader */
.loader {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* API Card */
.api-card .api-code {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

.api-code pre {
  margin: 0;
  color: #06b6d4;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
}

.api-code code {
  color: #06b6d4;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  font-size: 0.9rem;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  position: relative;
  z-index: 1;
}

/* Purchase Credits Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(15, 23, 42, 0.95) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-header h2 {
  font-size: 1.75rem;
  background: linear-gradient(135deg, #3b82f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.modal-close:hover {
  color: #e2e8f0;
  background: rgba(59, 130, 246, 0.1);
}

.modal-body {
  padding: 2rem;
}

.modal-subtitle {
  text-align: center;
  color: #94a3b8;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Credit Packages */
.credit-packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.package-card {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.8),
    rgba(30, 41, 59, 0.6)
  );
  border: 1.5px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.package-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.package-card.featured {
  border-color: rgba(59, 130, 246, 0.6);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(168, 85, 247, 0.15)
  );
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.package-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured-badge {
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.3),
    rgba(59, 130, 246, 0.3)
  );
  color: #a855f7;
}

.package-header {
  margin-bottom: 1rem;
}

.package-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.package-credits {
  color: #3b82f6;
  font-weight: 600;
  font-size: 0.95rem;
}

.package-price {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.package-desc {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.btn-package {
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.3),
    rgba(59, 130, 246, 0.2)
  );
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-package:hover {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.5),
    rgba(59, 130, 246, 0.3)
  );
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.btn-featured {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-featured:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

/* Payment Methods */
.payment-methods {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.methods-title {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: block;
}

.methods-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.method-badge {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }

  .nav-container {
    padding: 0 1rem;
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  body::before {
    width: 300px;
    height: 300px;
  }

  body::after {
    width: 250px;
    height: 250px;
  }

  /* Modal Responsive */
  .modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-header {
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .credit-packages {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .package-card.featured {
    transform: scale(1);
  }

  .methods-list {
    gap: 0.75rem;
  }

  .method-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}
