/* Buy Credits Page Styles */
.buy-credits-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.buy-credits-title {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 3rem;
}

/* Success Banner */
.success-banner {
  display: flex;
  align-items: center;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 2rem;
  color: #10b981;
  animation: fadeIn 0.3s ease;
}

.success-banner i {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

.banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #10b981;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
}

/* Credit Options Grid */
.credit-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Credit Card */
.credit-card {
  background-color: #1c1e50;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.credit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.credit-card.selected {
  border: 1px solid #f7b928;
  box-shadow: 0 0 0 2px rgba(247, 185, 40, 0.3);
}

/* Credit Card Header */
.credit-header {
  background-color: #4549e0;
  padding: 1.25rem 1rem;
  text-align: center;
}

.credit-amount {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.credit-amount .currency {
  color: #f7b928;
  margin-left: 0.25rem;
}

.credit-price {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Credit Card Body */
.credit-body {
  padding: 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.credit-icon {
  font-size: 2.5rem;
  color: #f7b928;
}

/* Credit Card Footer */
.credit-footer {
  padding: 1rem;
}

.purchase-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: #4549e0;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.purchase-btn:hover {
  background-color: #5a5ef7;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.3s ease;
}

/* Base Modal Styles */
.modal-content {
  background-color: #1c1e50;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s ease;
}

/* Purchase Confirmation Modal */
.purchase-modal .modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.purchase-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.purchase-modal .modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.purchase-modal .modal-body {
  padding: 1.5rem;
  color: white;
}

.purchase-modal .purchase-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 1.5rem 0;
}

.purchase-modal .modal-footer {
  padding: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-cancel:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-confirm {
  padding: 0.75rem 1.5rem;
  background-color: #f7b928;
  color: #1c1e50;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-confirm:hover {
  background-color: #e6a800;
}

/* Loading Modal */
.loading-modal {
  max-width: 450px;
  padding: 2rem;
  text-align: center;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.spinner-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(247, 185, 40, 0.3);
  border-top-color: #f7b928;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-circle-inner {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(69, 73, 224, 0.3);
  border-top-color: #4549e0;
  border-radius: 50%;
  animation: spin 1s linear infinite reverse;
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.loading-text {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

.loading-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.7);
}

.loading-step.completed {
  color: #10b981;
}

.step-indicator {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.loading-step.completed .step-indicator {
  background-color: rgba(16, 185, 129, 0.2);
}

.loading-step.completed .step-indicator i {
  color: #10b981;
}

/* Success Modal */
.success-modal {
  max-width: 450px;
  padding: 2rem;
  text-align: center;
}

.success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  margin-bottom: 1.5rem;
  animation: scaleIn 0.5s ease;
}

.success-icon i {
  font-size: 3rem;
  color: #10b981;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin-bottom: 1.5rem;
}

.success-details {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.success-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: #f7b928;
  margin-bottom: 0.5rem;
}

.success-text {
  color: white;
  margin-bottom: 1.5rem;
}

.success-balance {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.balance-amount {
  font-weight: 600;
  color: white;
}

.btn-done {
  padding: 0.75rem 2rem;
  background-color: #10b981;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-done:hover {
  background-color: #0da271;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .credit-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .credit-options-grid {
    grid-template-columns: 1fr;
  }

  .buy-credits-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }

  .loading-modal,
  .success-modal {
    padding: 1.5rem;
  }

  .loading-spinner,
  .success-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }

  .loading-title,
  .success-title {
    font-size: 1.25rem;
  }

  .success-amount {
    font-size: 2rem;
  }
}
