/* ================================================================
   EARNER — Premium Green/Gold Glassmorphism Theme
   Luxury Emerald + Gold identity for the Earner learning ecosystem
   ================================================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
  --earner-emerald: #059669;
  --earner-emerald-light: #10b981;
  --earner-emerald-dark: #047857;
  --earner-gold: #d4a017;
  --earner-gold-light: #f59e0b;
  --earner-gold-glow: rgba(212, 160, 23, 0.25);
  --earner-green-glow: rgba(5, 150, 105, 0.2);
  --earner-bg-gradient: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(212, 160, 23, 0.05) 50%, rgba(16, 185, 129, 0.06) 100%);
  --earner-card-border: rgba(5, 150, 105, 0.15);
  --earner-card-bg: rgba(5, 150, 105, 0.03);
}

/* ==================== EARNER BANNER SECTION ==================== */
.earner-banner-section {
  padding: 40px 0 50px;
  position: relative;
  overflow: hidden;
}

.earner-banner-section::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--earner-green-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: earnerOrbFloat 8s ease-in-out infinite;
}

.earner-banner-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--earner-gold-glow) 0%, transparent 70%);
  pointer-events: none;
  animation: earnerOrbFloat 10s ease-in-out infinite reverse;
}

@keyframes earnerOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(30px, -20px) scale(1.15); opacity: 0.8; }
}

/* ==================== EARNER PREMIUM CARD ==================== */
.earner-premium-card-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.earner-premium-card-bg-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--earner-emerald) 0%, var(--earner-gold) 50%, var(--earner-emerald-light) 100%);
  border-radius: 22px;
  opacity: 0.5;
  filter: blur(1px);
  animation: earnerGlowPulse 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes earnerGlowPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.earner-premium-card-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 36px 40px;
  background: rgba(5, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

[data-theme="light"] .earner-premium-card-inner {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(5, 150, 105, 0.15);
}

/* Left Column */
.earner-premium-card-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.earner-premium-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(212, 160, 23, 0.1));
  border: 1px solid rgba(5, 150, 105, 0.3);
  padding: 5px 14px;
  border-radius: 30px;
  width: fit-content;
  animation: earnerBadgeShimmer 3s ease-in-out infinite;
}

@keyframes earnerBadgeShimmer {
  0%, 100% { border-color: rgba(5, 150, 105, 0.3); }
  50% { border-color: rgba(212, 160, 23, 0.5); }
}

.earner-premium-tier-badge .badge-icon {
  font-size: 0.9rem;
}

.earner-premium-tier-badge .badge-text {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--earner-emerald-light), var(--earner-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.earner-premium-title {
  font-size: 2rem;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--earner-emerald-light) 0%, var(--earner-gold) 60%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

[data-theme="light"] .earner-premium-title {
  background: linear-gradient(135deg, var(--earner-emerald-dark) 0%, var(--earner-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.earner-premium-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

[data-theme="light"] .earner-premium-desc {
  color: #64748b;
}

/* CTA Button */
.earner-premium-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--earner-emerald) 0%, var(--earner-emerald-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  width: fit-content;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
  position: relative;
  overflow: hidden;
}

.earner-premium-cta-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  animation: earnerCTAShine 3s ease-in-out infinite;
}

@keyframes earnerCTAShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.earner-premium-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(5, 150, 105, 0.4);
}

/* Right Column — Feature Grid */
.earner-premium-card-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: center;
}

.earner-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.earner-feature-item:hover {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.25);
  transform: translateY(-2px);
}

.earner-feature-item.full-width-item {
  grid-column: span 2;
}

.earner-feature-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 150, 105, 0.1);
  border-radius: 10px;
}

.earner-feature-info h4 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

[data-theme="light"] .earner-feature-info h4 {
  color: #1e293b;
}

.earner-feature-info p {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .earner-feature-info p {
  color: #94a3b8;
}

/* ==================== EARNER HOMEPAGE SECTION ==================== */
.earner-home-section {
  padding: 60px 0;
  position: relative;
}

.earner-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.earner-section-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--earner-emerald-light) 0%, var(--earner-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.earner-section-header p {
  font-size: 1rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

/* Earner Batches Grid */
.earner-batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ==================== EARNER BATCH CARDS ==================== */
.earner-batch-card {
  --accent-glow: var(--earner-emerald);
  min-height: auto;
  height: 100%;
  border-radius: 16px;
  background: var(--bg-card, #ffffff);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid rgba(5, 150, 105, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="dark"] .earner-batch-card {
  background: #0f172a;
  border-color: rgba(5, 150, 105, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.earner-batch-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.15);
  border-color: var(--earner-emerald);
}

/* ==================== EARNER SKELETON LOADING ==================== */
.earner-skeleton-card {
  border-radius: 16px;
  background: var(--bg-card, #f8fafc);
  border: 1px solid rgba(5, 150, 105, 0.08);
  overflow: hidden;
  animation: earnerSkeletonFade 1.5s ease-in-out infinite;
}

[data-theme="dark"] .earner-skeleton-card {
  background: #0f172a;
  border-color: rgba(5, 150, 105, 0.06);
}

@keyframes earnerSkeletonFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.earner-skeleton-card .skeleton-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.05) 25%, rgba(5, 150, 105, 0.12) 50%, rgba(5, 150, 105, 0.05) 75%);
  background-size: 200% 100%;
  animation: earnerSkeletonShimmer 1.8s ease-in-out infinite;
}

@keyframes earnerSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.earner-skeleton-card .skeleton-line {
  margin: 12px 16px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.06) 25%, rgba(5, 150, 105, 0.12) 50%, rgba(5, 150, 105, 0.06) 75%);
  background-size: 200% 100%;
  animation: earnerSkeletonShimmer 1.8s ease-in-out infinite;
}

.earner-skeleton-card .skeleton-line.title { width: 70%; height: 16px; }
.earner-skeleton-card .skeleton-line.desc { width: 90%; }
.earner-skeleton-card .skeleton-line.meta { width: 50%; }

.earner-skeleton-card .skeleton-btn {
  margin: 16px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.08) 25%, rgba(5, 150, 105, 0.15) 50%, rgba(5, 150, 105, 0.08) 75%);
  background-size: 200% 100%;
  animation: earnerSkeletonShimmer 1.8s ease-in-out infinite;
}

/* ==================== EARNER EMPTY STATE ==================== */
.earner-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border-radius: 20px;
  background: var(--earner-bg-gradient);
  border: 1px dashed rgba(5, 150, 105, 0.2);
}

.earner-empty-state .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: earnerEmptyBounce 2s ease-in-out infinite;
}

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

.earner-empty-state h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--earner-emerald-light), var(--earner-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.earner-empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

/* ==================== EARNER ADMIN BADGE ==================== */
.earner-admin-badge {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(212, 160, 23, 0.1));
  color: var(--earner-emerald-light);
  border: 1px solid rgba(5, 150, 105, 0.25);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
}

/* ==================== EARNER SWITCHER BTN HIGHLIGHT ==================== */
.switcher-btn[data-category="earner"] {
  position: relative;
}

.switcher-btn[data-category="earner"].active {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(212, 160, 23, 0.08));
  border-color: rgba(5, 150, 105, 0.4);
  color: var(--earner-emerald-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .earner-premium-card-inner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }

  .earner-premium-card-right {
    grid-template-columns: 1fr;
  }

  .earner-feature-item.full-width-item {
    grid-column: span 1;
  }

  .earner-premium-title {
    font-size: 1.5rem;
  }

  .earner-batches-grid {
    grid-template-columns: 1fr;
  }

  .earner-premium-cta-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .earner-banner-section {
    padding: 24px 0 32px;
  }

  .earner-premium-card-inner {
    padding: 20px 16px;
  }

  .earner-premium-title {
    font-size: 1.3rem;
  }

  .earner-premium-desc {
    font-size: 0.85rem;
  }

  .earner-section-header h2 {
    font-size: 1.4rem;
  }
}
