:root {
  --primary-color: #3b7ddd;
  --primary-hover: #2d62b9;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --info-color: #17a2b8;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --body-bg: #f5f7fb;
  --body-color: #444;
  --border-color: #e9ecef;
  --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --transition-speed: 0.3s;
}

body {
  background-color: var(--body-bg);
  color: var(--body-color);
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Card Styles */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Form Controls */
.form-control, .form-select {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(59, 125, 221, 0.25);
}

.form-control-lg {
  font-size: 1.25rem;
  font-weight: 500;
}

.input-group-text {
  background-color: #f8f9fa;
  border-color: var(--border-color);
}

.form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #495057;
}

.form-text {
  color: var(--secondary-color);
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Navigation */
.nav-pills .nav-link {
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
}

/* Alerts */
.alert {
  border-radius: 0.75rem;
  border: none;
  padding: 1.25rem;
}

/* Payment Methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.payment-method {
  position: relative;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-speed);
  height: 100%;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.payment-method:hover {
  border-color: var(--primary-color);
  background-color: rgba(59, 125, 221, 0.05);
}

.payment-method.active {
  border-color: var(--primary-color);
  background-color: rgba(59, 125, 221, 0.1);
}

.payment-method-name {
  font-size: 0.875rem;
  font-weight: 600;
}

.payment-submethod {
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all var(--transition-speed);
}

.payment-submethod:hover {
  background-color: #e9ecef;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}

.status-badge-success {
  color: #fff;
  background-color: var(--success-color);
}

.status-badge-warning {
  color: #212529;
  background-color: var(--warning-color);
}

/* Footer */
footer {
  margin-top: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .payment-methods {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

/* Custom Animations */
.btn-pulse {
  animation: pulse 1.5s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Modern Form Checkboxes and Radios */
.form-check-input {
  width: 1.25em;
  height: 1.25em;
  margin-top: 0.125em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid rgba(0, 0, 0, 0.25);
  appearance: none;
  color-adjust: exact;
  transition: all var(--transition-speed);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(59, 125, 221, 0.25);
}

.form-check-input[type="checkbox"] {
  border-radius: 0.25em;
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

/* Payment Success Animation */
.payment-success-icon {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--success-color);
  animation: successPulse 1.5s ease-in-out infinite;
}

.payment-success-icon:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 28%;
  width: 25%;
  height: 50%;
  border-right: 4px solid white;
  border-bottom: 4px solid white;
  transform: translate(-50%, -75%) rotate(45deg);
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Modern Table Styles */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  font-weight: 600;
  color: #495057;
  border-top: none;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(59, 125, 221, 0.05);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem 0;
}

/* Floating Labels */
.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem;
}

.form-floating > label {
  padding: 1rem 0.75rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Amount Input Styling */
.amount-input-wrapper {
  position: relative;
}

.amount-input-wrapper .form-control {
  padding-left: 3rem;
  font-size: 1.5rem;
  font-weight: 600;
  height: 60px;
}

.amount-input-wrapper .currency-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  z-index: 5;
}

/* Payment Method Selection Enhancement */
.payment-method-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-option {
  flex: 1;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.payment-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background-color: #fff;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-speed);
  height: 100%;
  min-height: 120px;
}

.payment-option input[type="radio"]:checked + label {
  border-color: var(--primary-color);
  background-color: rgba(59, 125, 221, 0.1);
  box-shadow: 0 0.125rem 0.25rem rgba(59, 125, 221, 0.2);
}

.payment-option input[type="radio"]:focus + label {
  box-shadow: 0 0 0 0.25rem rgba(59, 125, 221, 0.25);
}

.payment-option label:hover {
  border-color: var(--primary-color);
  background-color: rgba(59, 125, 221, 0.05);
}

.payment-option-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.payment-option-name {
  font-weight: 600;
  text-align: center;
}

/* Enhanced Form Validation Styling */
.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: var(--danger-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: var(--success-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Payment Security Features */
.security-features {
  background-color: #f8f9fa;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 2rem;
}

.security-feature {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.security-feature:last-child {
  margin-bottom: 0;
}

.security-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(59, 125, 221, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary-color);
}

.security-feature-text {
  flex: 1;
}

.security-feature-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.security-feature-description {
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin-bottom: 0;
}