/* ============================================
   Modern Upgrade Page Styles
   VirtuoVerse Brand Theme (#369B39 Green)
   ============================================ */

/* Upgrade Page Header */
.upgrade-header-modern {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
}

.upgrade-title-modern {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.6s ease-out;
}

.upgrade-subtitle-modern {
  font-size: 1.125rem;
  color: #ffffff;
  margin: 0;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Packages Grid Layout */
.upgrade-packages-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 1rem;
}

/* Package Card Container */
.upgrade-packagecard-modern {
    background: #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.upgrade-packagecard-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #369B39;
}

/* Active Package Styling */
.upgrade-packagecard-modern.active-package {
  border-color: #369B39;
  box-shadow: 0 10px 15px -3px rgba(54, 155, 57, 0.3), 0 4px 6px -2px rgba(54, 155, 57, 0.2);
}

.upgrade-packagecard-modern.active-package::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #369B39 0%, #2d7d2e 100%);
}

/* Active Package Badge */
.active-package-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: 0 4px 6px rgba(54, 155, 57, 0.4);
  z-index: 10;
  animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 4px 6px rgba(54, 155, 57, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(54, 155, 57, 0.6);
  }
}

/* Package Header */
.package-header-modern {
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.package-title-modern {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pricing Section */
.package-pricing-modern {
  padding: 1.5rem;
  background: 2a2a2a;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pricing-label {
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 500;
}

.pricing-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.pricing-period {
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 400;
}

.pricing-divider {
  text-align: center;
  color: #369B39;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

/* Total Price Section */
.package-total-price-modern {
  padding: 1.5rem;
  background: #339236;
  border-top: 2px solid #339236;
  border-bottom: 2px solid #339236;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.total-amount {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Discount Code Section */
.package-discount-modern {
  padding: 1.5rem;
  display: flex;
  gap: 0.75rem;
}

.discount-input-modern,
.package-discount-modern .discount-input-modern,
input.discount-input-modern,
input[type="text"].discount-input-modern {
  flex: 1;
  padding: 1.25rem 1rem !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  transition: all 0.3s ease !important;
  background: #ffffff !important;
  color: #111827 !important;
}

.discount-input-modern:focus,
.package-discount-modern .discount-input-modern:focus,
input.discount-input-modern:focus,
input[type="text"].discount-input-modern:focus {
  outline: none !important;
  border-color: #369B39 !important;
  box-shadow: 0 0 0 3px rgba(54, 155, 57, 0.1) !important;
}

.discount-input-modern::placeholder,
input.discount-input-modern::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

.discount-input-modern:disabled,
input.discount-input-modern:disabled {
  background: #f3f4f6 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.discount-btn-modern {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.discount-btn-modern:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(54, 155, 57, 0.4);
}

.discount-btn-modern:active:not(:disabled) {
  transform: translateY(0);
}

.discount-btn-modern:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.discount-btn-modern .animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Discount Error Badge */
.discount-error-badge {
  margin: 0 1.5rem 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  border: 2px solid #ef4444;
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease-out;
}

/* Discount Applied Badge */
.discount-applied-badge {
  margin: 0 1.5rem 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
  border-radius: 8px;
  color: #047857;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: slideDown 0.3s ease-out;
}

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

/* Package Description */
.package-description-modern {
  padding: 1.5rem;
  flex: 1;
  min-height: 120px;
}

.package-description-modern p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #ffffff;
}

/* Buy Button */
.package-action-modern {
  padding: 1.5rem;
  padding-top: 0;
}

.btn-buy-package-modern {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #369B39 0%, #2d7d2e 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  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;
  box-shadow: 0 4px 6px rgba(54, 155, 57, 0.3);
}

.btn-buy-package-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(54, 155, 57, 0.4), 0 4px 6px -2px rgba(54, 155, 57, 0.3);
}

.btn-buy-package-modern:active {
  transform: translateY(0);
}

.btn-buy-package-modern svg {
  transition: transform 0.3s ease;
}

.btn-buy-package-modern:hover svg {
  transform: translateX(4px);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Design */
@media (max-width: 992px) {
  .upgrade-packages-grid-modern {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .upgrade-title-modern {
    font-size: 2rem;
  }

  .upgrade-subtitle-modern {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .upgrade-packages-grid-modern {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .upgrade-header-modern {
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
  }

  .upgrade-title-modern {
    font-size: 1.75rem;
  }

  .package-title-modern {
    font-size: 1.5rem;
  }

  .total-amount {
    font-size: 1.5rem;
  }

  .package-discount-modern {
    flex-direction: column;
  }

  .discount-btn-modern {
    width: 100%;
    justify-content: center;
  }

  .active-package-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .upgrade-packagecard-modern {
    background: #1f2937;
  }

  .package-pricing-modern {
    background: #111827;
  }

  .pricing-label {
    color: #9ca3af;
  }

  .pricing-value {
    color: #f9fafb;
  }

  .discount-input-modern {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }

  .discount-input-modern:focus {
    border-color: #369B39;
    background: #4b5563;
  }

  .package-description-modern p {
    color: #d1d5db;
  }

  .upgrade-subtitle-modern {
    color: #ffffff;
  }
}
