/**
 * ============================================================================
 * The Dark Card - Visual Design Styles
 * ============================================================================
 * Styling for the Dark Card display, animations, and UI components
 * ============================================================================
 */

/* ============================================================================
   DARK CARD VISUAL COMPONENT
   ============================================================================ */

.dark-card-container {
  perspective: 1000px;
  margin: 2rem auto;
  max-width: 450px;
}

.dark-card {
  width: 100%;
  height: 280px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.dark-card:hover {
  transform: rotateY(10deg) rotateX(5deg);
}

.dark-card.flipped {
  transform: rotateY(180deg);
}

.dark-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dark-card-front {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.dark-card-front::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: shimmer 8s ease-in-out infinite;
}

.dark-card-back {
  background: linear-gradient(135deg, #24243e 0%, #302b63 50%, #0f0c29 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 30px;
}

/* Card Logo and Branding */
.card-logo {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ffffff, #a0a0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* Card Chip */
.card-chip {
  width: 50px;
  height: 40px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.card-chip::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: repeating-linear-gradient(
    90deg,
    #b8860b 0px,
    #b8860b 2px,
    transparent 2px,
    transparent 4px
  );
  border-radius: 4px;
}

/* Card Number */
.card-number {
  font-size: 1.5rem;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  margin-top: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-number-hidden {
  opacity: 0.3;
}

/* Card Details */
.card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.card-holder {
  flex: 1;
}

.card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.card-expiry {
  text-align: right;
}

.card-never-expires {
  font-size: 0.9rem;
  color: #a0ffb0;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(160, 255, 176, 0.5);
}

/* Card Back Elements */
.card-magnetic-stripe {
  height: 50px;
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 50%, #1a1a1a 100%);
  margin: -20px -30px 20px -30px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-back-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card-signature-panel {
  background: rgba(255, 255, 255, 0.9);
  height: 50px;
  border-radius: 4px;
  padding: 8px 12px;
  position: relative;
  display: flex;
  align-items: center;
}

.card-signature-label {
  position: absolute;
  top: 4px;
  left: 12px;
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-signature {
  margin-top: 12px;
  font-family: 'Brush Script MT', cursive;
  font-size: 1.5rem;
  color: #000;
  font-style: italic;
}

.card-back-disclaimer {
  font-size: 0.65rem;
  line-height: 1.4;
  opacity: 0.8;
  text-align: justify;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
}

/* QR Code on Back */
.card-qr-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-qr-container {
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-qr-code {
  width: 100px;
  height: 100px;
  display: block;
}

.card-qr-info {
  flex: 1;
}

.card-qr-label {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.card-qr-instructions {
  font-size: 0.65rem;
  opacity: 0.7;
  line-height: 1.3;
}

.card-back-footer {
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.6;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Balance Display */
.card-balance {
  position: absolute;
  top: 20px;
  right: 30px;
  text-align: right;
}

.balance-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.balance-amount {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   CARD MANAGEMENT UI
   ============================================================================ */

.dark-card-section {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 2rem;
}

.btn-apply-dark-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-apply-dark-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Card Info Grid */
.card-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card-info-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.info-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.info-value.credits {
  color: #4ade80;
}

.info-value.usd {
  color: #60a5fa;
}

/* Transaction History */
.transaction-list {
  margin-top: 2rem;
}

.transaction-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.transaction-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.transaction-item.load {
  border-left-color: #4ade80;
}

.transaction-item.purchase {
  border-left-color: #f87171;
}

.transaction-info {
  flex: 1;
}

.transaction-type {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}

.transaction-description {
  color: #ffffff;
  font-weight: 500;
}

.transaction-amount {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: right;
}

.transaction-amount.positive {
  color: #4ade80;
}

.transaction-amount.negative {
  color: #f87171;
}

.transaction-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
  margin-top: 4px;
}

/* Load Card Modal */
.load-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.package-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.package-card.featured {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.package-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: 12px;
  right: -30px;
  background: #fbbf24;
  color: #1a1a2e;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 40px;
  transform: rotate(45deg);
}

.package-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.package-credits {
  font-size: 2rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 0.5rem;
}

.package-bonus {
  font-size: 0.9rem;
  color: #fbbf24;
  margin-bottom: 1rem;
}

.package-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #60a5fa;
  margin-top: 1rem;
}

/* ============================================================================
   APPLICATION FORM
   ============================================================================ */

.application-form {
  max-width: 600px;
  margin: 2rem auto;
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .dark-card {
    height: 220px;
  }

  .card-brand {
    font-size: 1.2rem;
  }

  .card-number {
    font-size: 1.1rem;
  }

  .card-info-grid {
    grid-template-columns: 1fr;
  }

  .load-packages-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  animation: shimmer 3s infinite;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 1000px 100%;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
