
/* ============================================
   LEARN EARN — Premium Features v2
   Notification + Live Feed + Missions + Spin
   ============================================ */

/* ============================================
   1. NOTIFICATION BELL (Header)
   ============================================ */
.notif-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(88,204,2,0.1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  flex-shrink: 0;
}
.notif-bell:hover {
  transform: scale(1.1);
  background: rgba(88,204,2,0.2);
}
.notif-bell:active {
  transform: scale(0.95);
}
.notif-bell.has-unread {
  animation: bellRing 2s ease-in-out infinite;
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
  50% { transform: rotate(0); }
}
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4b4b, #ea2b2b);
  color: white;
  font-size: 10px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(255,75,75,0.4);
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================================
   2. NOTIFICATION PANEL
   ============================================ */
.notif-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  z-index: 99997;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.notif-panel.open {
  right: 0;
}
.notif-panel-header {
  padding: 20px;
  background: linear-gradient(135deg, #58cc02, #89e219);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-panel-close:active {
  transform: scale(0.92);
}
.notif-panel-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.notif-panel-actions button {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.notif-panel-actions button:active {
  transform: scale(0.96);
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: white;
  margin-bottom: 8px;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  animation: notifIn 0.3s ease backwards;
}
.notif-item:nth-child(1) { animation-delay: 0.02s; }
.notif-item:nth-child(2) { animation-delay: 0.04s; }
.notif-item:nth-child(3) { animation-delay: 0.06s; }
.notif-item:nth-child(4) { animation-delay: 0.08s; }
.notif-item:nth-child(5) { animation-delay: 0.10s; }
@keyframes notifIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.notif-item:hover {
  background: #f8f9fa;
}
.notif-item.unread {
  background: linear-gradient(135deg, #f0fff0, #e6ffe6);
  border-left-color: #58cc02;
}
.notif-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(88,204,2,0.1);
}
.notif-item-icon.earn { background: linear-gradient(135deg, #f0fff0, #e6ffe6); }
.notif-item-icon.order { background: linear-gradient(135deg, #e8f6ff, #d4ecff); }
.notif-item-icon.ach { background: linear-gradient(135deg, #fff9e6, #ffefb3); }
.notif-item-icon.withdraw { background: linear-gradient(135deg, #ffe6e6, #ffcccc); }
.notif-item-icon.system { background: linear-gradient(135deg, #f0f4ff, #e0e7ff); }
.notif-item-content {
  flex: 1;
  min-width: 0;
}
.notif-item-title {
  font-size: 13px;
  font-weight: 900;
  color: #1a1a1a;
  margin-bottom: 4px;
  line-height: 1.3;
}
.notif-item-desc {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
}
.notif-item-time {
  font-size: 10px;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.notif-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.notif-empty-icon {
  font-size: 60px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

/* ============================================
   3. LIVE ACTIVITY FEED
   ============================================ */
.live-feed {
  position: fixed;
  bottom: 90px;
  left: 16px;
  max-width: 320px;
  z-index: 9998;
  pointer-events: none;
}
.live-feed-item {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-left: 4px solid #58cc02;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: feedIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
  opacity: 0;
}
.live-feed-item.show {
  opacity: 1;
}
.live-feed-item.fade-out {
  animation: feedOut 0.5s ease forwards;
}
@keyframes feedIn {
  from { opacity: 0; transform: translateX(-30px) scale(0.9); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes feedOut {
  to { opacity: 0; transform: translateX(-30px) scale(0.9); }
}
.live-feed-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0fff0, #e6ffe6);
}
.live-feed-content {
  flex: 1;
  min-width: 0;
}
.live-feed-text {
  font-size: 12px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-feed-time {
  font-size: 10px;
  color: #999;
  font-weight: 600;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4b4b;
  animation: liveDot 1s ease-in-out infinite;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}
@keyframes liveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ============================================
   4. SOCIAL PROOF HERO
   ============================================ */
.social-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.8);
}
.social-proof-item {
  text-align: center;
  position: relative;
}
.social-proof-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(0,0,0,0.06);
}
.social-proof-value {
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #58cc02, #89e219);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2px;
  display: block;
}
.social-proof-label {
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================
   5. DAILY MISSIONS
   ============================================ */
.missions-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1.5px solid rgba(0,0,0,0.04);
}
.missions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.missions-title {
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.missions-reset {
  font-size: 10px;
  font-weight: 700;
  color: #999;
  background: #f3f4f6;
  padding: 4px 10px;
  border-radius: 999px;
}
.missions-progress {
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.missions-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #58cc02, #89e219);
  border-radius: 999px;
  transition: width 0.5s ease;
  position: relative;
}
.missions-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shineMove 2s infinite;
}
@keyframes shineMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.25s;
}
.mission-item.done {
  background: linear-gradient(135deg, #f0fff0, #e6ffe6);
  border: 1px solid rgba(88,204,2,0.3);
}
.mission-item:hover {
  transform: translateX(4px);
}
.mission-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #58cc02;
  flex-shrink: 0;
  transition: all 0.3s;
  background: white;
}
.mission-item.done .mission-check {
  background: linear-gradient(135deg, #58cc02, #89e219);
  border-color: transparent;
  color: white;
  animation: checkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
@keyframes checkPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.mission-info {
  flex: 1;
  min-width: 0;
}
.mission-title {
  font-size: 13px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 2px;
}
.mission-item.done .mission-title {
  color: #58cc02;
  text-decoration: line-through;
  text-decoration-color: rgba(88,204,2,0.5);
}
.mission-reward {
  font-size: 11px;
  font-weight: 900;
  color: #f59e0b;
}

/* ============================================
   6. SPIN WHEEL
   ============================================ */
.spin-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.spin-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.4), transparent 60%);
  animation: rotate 15s linear infinite;
  pointer-events: none;
}
.spin-title {
  font-size: 18px;
  font-weight: 900;
  color: #78350f;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.spin-desc {
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.spin-wheel-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}
.spin-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    #ff6b6b 0deg 45deg,
    #fbbf24 45deg 90deg,
    #58cc02 90deg 135deg,
    #1cb0f6 135deg 180deg,
    #ce82ff 180deg 225deg,
    #ff6b6b 225deg 270deg,
    #fbbf24 270deg 315deg,
    #58cc02 315deg 360deg
  );
  box-shadow:
    0 8px 32px rgba(251,191,36,0.5),
    inset 0 0 0 8px white,
    inset 0 0 0 12px rgba(0,0,0,0.05);
  position: relative;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}
.spin-wheel::after {
  content: '🎁';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  background: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.spin-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.spin-btn {
  padding: 14px 32px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #c2410c, 0 8px 24px rgba(234,88,12,0.4);
  transition: all 0.2s;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.spin-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #c2410c;
}
.spin-btn:disabled {
  background: #d1d5db;
  box-shadow: 0 4px 0 #9ca3af;
  cursor: not-allowed;
}
.spin-info {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  position: relative;
  z-index: 1;
}

/* Spin result modal */
.spin-result-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s;
}
.spin-result-card {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);
  background-size: 200% 200%;
  animation: shimmerGold 2s infinite, popIn 0.5s cubic-bezier(0.68,-0.55,0.265,1.55);
  border-radius: 28px;
  padding: 40px 32px;
  text-align: center;
  max-width: 360px;
  width: 100%;
  color: white;
  box-shadow: 0 24px 80px rgba(251,191,36,0.6);
  position: relative;
  overflow: hidden;
}
@keyframes shimmerGold {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.spin-result-emoji {
  font-size: 80px;
  margin-bottom: 16px;
  display: block;
  animation: bounceIn 0.6s cubic-bezier(0.68,-0.55,0.265,1.55);
}
@keyframes bounceIn {
  0% { transform: scale(0) rotate(-180deg); }
  50% { transform: scale(1.3) rotate(20deg); }
  100% { transform: scale(1) rotate(0); }
}
.spin-result-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.spin-result-amount {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.spin-result-sub {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.95;
  margin-bottom: 20px;
}
.spin-result-btn {
  padding: 14px 36px;
  background: white;
  color: #b45309;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.spin-result-btn:active {
  transform: scale(0.96);
}

/* ============================================
   7. TOPUP REDESIGN
   ============================================ */
.topup-hero {
  background: linear-gradient(135deg, #1cb0f6, #0ea5e9, #06b6d4);
  background-size: 200% 200%;
  animation: heroGradient 8s ease infinite;
  border-radius: 24px;
  padding: 22px 20px;
  margin-bottom: 16px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(28,176,246,0.35);
}
@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.topup-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}
.topup-hero-content {
  position: relative;
  z-index: 1;
}
.topup-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  animation: badgePulse 2s infinite;
}
.topup-hero-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.topup-hero-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 16px;
  line-height: 1.5;
}
.topup-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.topup-benefit {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 14px;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}
.topup-benefit .icon {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}
.topup-bonus-bar {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: bonusShine 3s infinite;
}
@keyframes bonusShine {
  0%, 100% { box-shadow: 0 4px 20px rgba(245,158,11,0.3); }
  50% { box-shadow: 0 4px 30px rgba(245,158,11,0.6); }
}
.topup-bonus-icon {
  font-size: 28px;
  animation: bonusBounce 1.5s ease-in-out infinite;
}
@keyframes bonusBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(-5deg); }
}
.topup-bonus-text {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  color: #78350f;
  line-height: 1.4;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] .notif-panel {
  background: rgba(20,20,20,0.98);
}
[data-theme="dark"] .notif-item {
  background: #1f1f1f;
}
[data-theme="dark"] .notif-item:hover {
  background: #2a2a2a;
}
[data-theme="dark"] .notif-item.unread {
  background: linear-gradient(135deg, #1a2a1a, #1f2f1f);
}
[data-theme="dark"] .notif-item-title {
  color: #f3f4f6;
}
[data-theme="dark"] .notif-item-desc {
  color: #9ca3af;
}
[data-theme="dark"] .live-feed-item {
  background: rgba(30,30,30,0.98);
}
[data-theme="dark"] .live-feed-text {
  color: #f3f4f6;
}
[data-theme="dark"] .missions-card,
[data-theme="dark"] .mission-item {
  background: #1f1f1f;
}
[data-theme="dark"] .mission-title {
  color: #f3f4f6;
}
[data-theme="dark"] .mission-item.done {
  background: linear-gradient(135deg, #1a2a1a, #1f2f1f);
}
[data-theme="dark"] .spin-card {
  background: linear-gradient(135deg, #3f2917, #2e1e10);
}
[data-theme="dark"] .spin-title,
[data-theme="dark"] .spin-desc,
[data-theme="dark"] .spin-info {
  color: #fcd34d;
}
[data-theme="dark"] .social-proof {
  background: rgba(30,30,30,0.9);
}
[data-theme="dark"] .social-proof-label {
  color: #9ca3af;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .notif-panel {
    max-width: 100%;
  }
  .live-feed {
    left: 8px;
    right: 8px;
    max-width: none;
    bottom: 80px;
  }
  .spin-wheel-wrap {
    width: 160px;
    height: 160px;
  }
  .spin-wheel::after {
    width: 48px;
    height: 48px;
    font-size: 32px;
  }
  .topup-hero-title {
    font-size: 20px;
  }
  .social-proof-value {
    font-size: 16px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
