:root {
  --primary-color: #8B4513;
  --primary-dark: #6B3410;
  --secondary-color: #D4A574;
  --accent-color: #C9A86C;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-bg: #f8f9fa;
  --dark-text: #2c3e50;
}

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  min-height: 100vh;
  color: var(--dark-text);
}

body.rtl {
  direction: rtl;
  text-align: right;
}

.logo {
  max-height: 50px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.card-main {
  border-radius: 1.5rem;
  overflow: hidden;
  border: none;
}

.gift-icon,
.otp-icon,
.form-icon,
.gift-received-icon {
  font-size: 4rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.text-primary {
  color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: 0.75rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-primary:disabled {
  background-color: #ccc;
  border-color: #ccc;
  transform: none;
  box-shadow: none;
}

.form-control,
.form-select {
  border-radius: 0.75rem;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.15);
}

.input-group-text {
  border-radius: 0.75rem 0 0 0.75rem;
  border: 2px solid #e9ecef;
  border-right: none;
  background-color: var(--light-bg);
  font-weight: 600;
}

.rtl .input-group-text {
  border-radius: 0 0.75rem 0.75rem 0;
  border-right: 2px solid #e9ecef;
  border-left: none;
}

.rtl .input-group .form-control {
  border-radius: 0.75rem 0 0 0.75rem;
}

.otp-input {
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  font-weight: 700;
}

.step-content {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.step-content.d-none {
  opacity: 0;
  transform: translateX(20px);
}

/* Gift Option Cards */
.gift-option {
  cursor: pointer;
  border: 2px solid #e9ecef;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.gift-option:hover {
  border-color: var(--secondary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gift-option.selected {
  border-color: var(--primary-color);
  background-color: rgba(139, 69, 19, 0.05);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

.gift-option .option-icon {
  font-size: 3rem;
}

/* Coupon Display */
.coupon-display {
  background: linear-gradient(135deg, var(--light-bg) 0%, #fff 100%);
  border: 2px dashed var(--primary-color);
  border-radius: 1rem;
  position: relative;
}

.coupon-code-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.coupon-code {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  word-break: break-all;
}

.copy-btn {
  border-radius: 0.5rem;
}

/* Success Animation */
.success-animation {
  display: flex;
  justify-content: center;
}

.checkmark-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--success-color), #20c997);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s ease;
}

.checkmark {
  width: 40px;
  height: 20px;
  border-left: 5px solid white;
  border-bottom: 5px solid white;
  transform: rotate(-45deg);
  margin-bottom: 10px;
  animation: checkmark 0.4s ease 0.3s forwards;
  opacity: 0;
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes checkmark {
  0% { opacity: 0; width: 0; height: 0; }
  100% { opacity: 1; width: 40px; height: 20px; }
}

/* Language Switch */
.lang-switch {
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

/* Alert Customization */
.alert {
  border-radius: 0.75rem;
  border: none;
}

/* reCAPTCHA Container */
.g-recaptcha {
  transform-origin: center;
}

@media (max-width: 400px) {
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center;
  }
}

/* Loading State */
.btn-loading .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* Phone Display */
.phone-display {
  font-size: 1.25rem;
  direction: ltr;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}

.rtl .toast-container {
  right: auto;
  left: 1rem;
}

/* Footer */
footer {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .card-body {
    padding: 1.5rem !important;
  }
  
  .gift-icon,
  .otp-icon,
  .form-icon {
    font-size: 3rem;
  }
  
  .coupon-code {
    font-size: 1.25rem !important;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .coupon-display {
    border: 2px solid #000;
  }
}
