/* ===== GLOBAL STYLES ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #070b14; }
::-webkit-scrollbar-thumb { background: #10b981; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #34d399; }
::selection { background: rgba(16,185,129,0.3); color: #fff; }

body {
  background: #070b14;
  color: #e2e8f0;
  min-height: 100vh;
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.1);
}
.glass-strong {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(16, 185, 129, 0.15);
}
.glass-card {
  background: linear-gradient(135deg, rgba(15,23,42,0.7) 0%, rgba(6,78,59,0.15) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16,185,129,0.12);
  border-radius: 16px;
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(16,185,129,0.3);
  box-shadow: 0 0 30px rgba(16,185,129,0.1);
  transform: translateY(-2px);
}

/* ===== ANIMATED GRADIENTS ===== */
.gradient-text {
  background: linear-gradient(135deg, #10b981, #06b6d4, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-glow {
  background: linear-gradient(135deg, #10b981, #22d3ee, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(16,185,129,0.3));
}
.gradient-border {
  position: relative;
  border: none !important;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #10b981, #06b6d4, #10b981);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ===== GLOW EFFECTS ===== */
.glow-green {
  box-shadow: 0 0 20px rgba(16,185,129,0.15), 0 0 60px rgba(16,185,129,0.05);
}
.glow-green-strong {
  box-shadow: 0 0 30px rgba(16,185,129,0.25), 0 0 80px rgba(16,185,129,0.1);
}
.glow-cyan {
  box-shadow: 0 0 20px rgba(6,182,212,0.15), 0 0 60px rgba(6,182,212,0.05);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(16,185,129,0.1); }
  50% { box-shadow: 0 0 40px rgba(16,185,129,0.3); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-right {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes counter-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes bounce-in {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-slide-up { animation: slide-up 0.6s ease-out forwards; }
.animate-slide-down { animation: slide-down 0.4s ease-out forwards; }
.animate-slide-right { animation: slide-right 0.5s ease-out forwards; }
.animate-fade-in { animation: fade-in 0.5s ease-out forwards; }
.animate-scale-in { animation: scale-in 0.4s ease-out forwards; }
.animate-bounce-in { animation: bounce-in 0.6s ease-out forwards; }
.animate-rotate-slow { animation: rotate-slow 20s linear infinite; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(16,185,129,0.1), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 5s ease infinite;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }
.stagger-5 { animation-delay: 0.5s; opacity: 0; }
.stagger-6 { animation-delay: 0.6s; opacity: 0; }

/* ===== 3D EARTH CONTAINER ===== */
#earth-3d {
  width: 300px;
  height: 300px;
  position: relative;
}
@media (min-width: 1024px) {
  #earth-3d {
    width: 420px;
    height: 420px;
  }
}
#earth-3d canvas {
  outline: none;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  box-shadow: 0 0 25px rgba(16,185,129,0.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(16,185,129,0.1);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.2);
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: rgba(16,185,129,0.2);
  border-color: rgba(16,185,129,0.4);
}

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: #e2e8f0; }

/* ===== INPUTS ===== */
.input-field {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(16,185,129,0.1);
  border-radius: 12px;
  padding: 12px 16px;
  color: #e2e8f0;
  font-size: 14px;
  transition: all 0.3s ease;
  outline: none;
  width: 100%;
}
.input-field:focus {
  border-color: rgba(16,185,129,0.4);
  box-shadow: 0 0 15px rgba(16,185,129,0.1);
}
.input-field::placeholder { color: #475569; }

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== SIDEBAR ===== */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.sidebar-link:hover {
  background: rgba(16,185,129,0.08);
  color: #34d399;
}
.sidebar-link.active {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border-left: 3px solid #10b981;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #059669, #10b981, #34d399);
  transition: width 1s ease-out;
}

/* ===== TOAST ===== */
.toast {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slide-down 0.3s ease-out;
  min-width: 280px;
  max-width: 400px;
}
.toast-success {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  color: #34d399;
}
.toast-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}
.toast-info {
  background: rgba(6,182,212,0.15);
  border: 1px solid rgba(6,182,212,0.3);
  color: #22d3ee;
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green {
  background: rgba(16,185,129,0.15);
  color: #34d399;
}
.badge-cyan {
  background: rgba(6,182,212,0.15);
  color: #22d3ee;
}
.badge-amber {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
}
.badge-red {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}

/* ===== STAT CARD ===== */
.stat-card {
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(16,185,129,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ===== MOBILE NAV ===== */
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  font-size: 10px;
  color: #64748b;
  transition: all 0.2s;
  cursor: pointer;
}
.mobile-nav-item.active {
  color: #10b981;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
  position: relative;
  width: 100%;
  height: 250px;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-content {
  background: #0f172a;
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: scale-in 0.3s ease-out;
}

/* ===== TIMELINE ===== */
.timeline-item {
  position: relative;
  padding-left: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(16,185,129,0.2);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .glass-card { border-radius: 12px; }
  .btn-primary, .btn-secondary { padding: 8px 18px; font-size: 13px; }
}

/* ===== CUSTOM SCROLLBAR FOR CHARTS ===== */
.chart-scroll::-webkit-scrollbar { height: 4px; }
.chart-scroll::-webkit-scrollbar-thumb { background: #10b981; border-radius: 2px; }

/* ===== GUEST BANNER ===== */
.guest-banner {
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(6,182,212,0.08));
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* ===== IMAGE UPLOAD & PREVIEW ===== */
.image-preview-container {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}
.image-preview-container img {
  max-height: 140px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(16,185,129,0.15);
}
.image-preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  border: 2px solid #0f172a;
  transition: transform 0.2s;
}
.image-preview-remove:hover {
  transform: scale(1.1);
}
.post-image {
  max-height: 280px;
  border-radius: 12px;
  object-fit: cover;
  width: 100%;
  border: 1px solid rgba(16,185,129,0.1);
}
.file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}
.upload-zone {
  border: 2px dashed rgba(16,185,129,0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.upload-zone:hover {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.05);
}
.upload-zone.dragover {
  border-color: #10b981;
  background: rgba(16,185,129,0.1);
}

/* Tab active indicator */
.tab-active {
  color: #10b981;
  border-bottom: 2px solid #10b981;
}