/**
 * Referral Entry Page Styles
 */

/* ==========================================
   Page Layout
   ========================================== */
.referral-entry-page {
  min-height: 100vh;
  background: var(--color-bg-dark, #0f1020);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  direction: rtl;
}

.referral-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.referral-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-title {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: #fff;
  direction: rtl;
  text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

.referral-description {
  font-size: 16px;
  text-align: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  direction: rtl;
}

/* ==========================================
   Referral Form
   ========================================== */
.referral-form {
  margin-bottom: 20px;
}

.referral-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.referral-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.3s ease;
  text-align: center;
  direction: ltr;
  font-family: monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.referral-input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.referral-input::placeholder {
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255, 255, 255, 0.5);
}

.referral-btn {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.referral-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.referral-btn:active {
  transform: translateY(0);
}

.error-message {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 12px 15px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  direction: rtl;
}

/* ==========================================
   Quiz Selection Section
   ========================================== */
.quiz-selection {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.quiz-selection-title {
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #10b981;
  direction: rtl;
}

.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ==========================================
   Referral Footer
   ========================================== */
.referral-footer {
  margin-top: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  direction: rtl;
}

.referral-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.referral-footer a:hover {
  color: #8568ff;
  text-decoration: underline;
}

/* ==========================================
   Activation Modal
   ========================================== */
.activation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.activation-modal {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  color: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.4s ease;
}

.modal-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.activation-modal h2 {
  font-size: 24px;
  margin: 0 0 15px;
  color: white;
  font-weight: 700;
}

.activation-time {
  font-size: 16px;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.activation-time strong {
  color: #fbbf24;
  font-size: 18px;
  display: block;
  margin-top: 8px;
}

.expiration-time {
  color: #ef4444;
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.95;
}

.expiration-time strong {
  font-size: 16px;
  color: #fca5a5;
}

/* ==========================================
   Countdown Timer
   ========================================== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.15);
  padding: 15px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  min-width: 80px;
}

.countdown-value {
  font-size: 36px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
}

.countdown-label {
  font-size: 14px;
  opacity: 0.8;
}

.activated-message {
  color: #10b981;
  font-size: 18px;
  font-weight: 600;
  padding: 15px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  margin: 0;
}

/* ==========================================
   Advertisement Section in Modal
   ========================================== */
.countdown-ad-container {
  margin: 25px 0;
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.countdown-ad-container .ad-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

#countdown-ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
}

#countdown-ad-slot img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

#countdown-ad-slot .qg-section-ad {
  width: 100%;
}

#countdown-ad-slot a {
  display: block;
  transition: transform 0.3s ease;
}

#countdown-ad-slot a:hover {
  transform: scale(1.02);
}

.no-ad-message,
.ad-error-message {
  color: #999;
  font-size: 14px;
  text-align: center;
  padding: 20px;
  margin: 0;
}

.ad-error-message {
  color: #fca5a5;
}

/* ==========================================
   Modal Button
   ========================================== */
.modal-close-btn {
  background: white;
  color: #667eea;
  border: none;
  padding: 15px 40px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
}

.modal-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 480px) {
  .activation-modal {
    padding: 30px 20px;
  }
  
  .countdown {
    gap: 10px;
  }
  
  .countdown-item {
    min-width: 70px;
    padding: 12px 15px;
  }
  
  .countdown-value {
    font-size: 28px;
  }
  
  .countdown-ad-container {
    padding: 15px;
    margin: 20px 0;
  }
}
