/* 
 * Modern Dashboard Styles
 * Fully constraint-compliant: GPU-accelerated, Responsive, Glassmorphic
 */

:root {
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: 12px;
  --primary-glow: 0 0 20px rgba(0, 255, 136, 0.3); /* Neon green glow base */
  --transition-speed: 0.3s;
  --touch-target: 44px;
}

/* Glassmorphism Classes Constraint 6 & 7 */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

/* Interactive Hover Lift - Constraint 3 & 15 */
.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Large touch targets - Constraint 9 */
.glass-btn {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, #00ff88 0%, #00b359 100%);
  color: #000 !important;
  font-weight: 700;
  border-radius: 30px;
  box-shadow: var(--primary-glow);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, opacity var(--transition-speed) ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
}

.glass-btn:hover {
  transform: scale(1.05); /* GPU Accelerated scale */
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
  color: #000 !important;
}

/* 
 * Endless Marquee Ad Banner Constraints (1, 2, 4, 13, 19, 20)
 */

.modern-ad-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  /* Constraint 2: aspect ratio mapping to heavily reduce CLS */
  aspect-ratio: 21 / 3; 
  max-height: 120px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.modern-ad-marquee-track {
  display: flex;
  width: max-content;
  /* Constraint 19: single infinite keyframes translation */
  animation: scrollMarquee 25s linear infinite;
  /* Constraint 4: Use will-change strictly on the moving track */
  will-change: transform;
}

.modern-ad-marquee-track:hover {
  /* Pause on hover for readability */
  animation-play-state: paused;
}

.ad-banner-item {
  width: clamp(280px, 40vw, 600px); /* Constraint 1: fluid scaling */
  height: clamp(60px, 8vw, 100px);
  margin: 0 15px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  position: relative;
  background: #111; /* fallback */
}

/* Fallback state when JS fails (Constraint 20) - Though this is pure CSS */
.ad-banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Constraint 3: Hardware accel hint for the image rendering */
  transform: translateZ(0); 
}

@keyframes scrollMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    /* Translate exactly half of the double-width track */
    transform: translate3d(-50%, 0, 0); 
  }
}

/* 
 * Accessibility (A11y) Constraint 5
 */
@media (prefers-reduced-motion: reduce) {
  .modern-ad-marquee-track {
    animation: none;
    overflow-x: auto; /* Fallback to manual horizontal scroll */
  }
  .glass-panel, .glass-btn {
    transition: none;
    transform: none !important;
  }
}

/* Override existing Dashboard Elements */
.premium-header {
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(0, 50, 25, 0.8) 0%, rgba(10, 10, 10, 1) 70%) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  padding: 60px 20px;
}

.premium-title {
  font-size: clamp(2rem, 5vw, 3.5rem) !important; /* Fluid Typography */
  text-shadow: 0 0 20px rgba(255,255,255,0.2);
  font-weight: 800;
}

.social-card, .feature-card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease !important;
}

.social-card:hover, .feature-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5) !important;
  border-color: rgba(255,255,255,0.2) !important;
}

/* Specific Tweak for Featured Telegram Card */
.telegram-card.featured {
  background: linear-gradient(145deg, rgba(34, 158, 217, 0.15) 0%, rgba(34, 158, 217, 0.05) 100%) !important;
  border: 1px solid rgba(34, 158, 217, 0.4) !important;
  box-shadow: 0 0 20px rgba(34, 158, 217, 0.2) !important;
}
.telegram-card.featured:hover {
  box-shadow: 0 10px 40px rgba(34, 158, 217, 0.4) !important;
}

/* Ensure minimum contrast ratios Constraint 10 */
.social-name, .social-stats {
  color: #fff !important; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.feature-title, .feature-description {
  color: #e0e0e0 !important;
}
