/* ==========================================================================
   SHERIF ADS - MODERN GLASSMORPHISM DESIGN SYSTEM
   ========================================================================== */

/* ===== Variables & Core ===== */
:root {
  --ads-bg-dark: #070B19;
  --ads-bg-surface: rgba(15, 23, 42, 0.4);
  --ads-cyan-glow: rgba(14, 165, 233, 0.5);
  --ads-purple-glow: rgba(139, 92, 246, 0.4);
  --ads-glass-border: rgba(255, 255, 255, 0.08);
  --ads-glass-bg: rgba(255, 255, 255, 0.03);
  --ads-glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --ads-text-main: #f8fafc;
  --ads-text-muted: #94a3b8;
}

html {
  overflow-x: clip;
}
body {
  margin: 0;
  padding: 0;
  background-color: var(--ads-bg-dark);
  color: var(--ads-text-main);
  font-family: 'Cairo', sans-serif;
}

.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-bottom: 1px solid var(--ads-glass-border) !important;
}

.ads-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Override light backgrounds from base style.css */
.features-section, 
.trust-section, 
.how-to-upload-section,
.site-footer {
  background-color: transparent !important;
  background: transparent !important;
}

/* Force header links to be visible (white text on dark header) */
.header-nav .nav-link,
.header-nav a {
  color: #f8fafc !important;
  opacity: 0.9;
}
.header-nav .nav-link:hover {
  color: var(--ads-cyan) !important;
  opacity: 1;
}

/* ===== Particles Background ===== */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== Global Glassmorphism ===== */
.glass-card {
  background: var(--ads-glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ads-glass-border);
  border-radius: 20px;
  box-shadow: var(--ads-glass-shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  overflow: hidden;
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: left 0.7s ease;
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.3);
}

.glass-card:hover::before {
  left: 200%;
}

/* ===== Glowing Orbs Background ===== */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  animation: floatOrb 10s infinite alternate ease-in-out;
}

.glow-cyan {
  background: var(--ads-cyan-glow);
  width: 400px;
  height: 400px;
  top: -10%;
  right: -10%;
}

.glow-purple {
  background: var(--ads-purple-glow);
  width: 500px;
  height: 500px;
  bottom: -20%;
  left: -10%;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 50px) scale(1.1); }
  100% { transform: translate(50px, -30px) scale(0.9); }
}

/* ===== Typography & Gradients ===== */
.text-gradient-cyan {
  background: linear-gradient(to right, #0ea5e9, #38bdf8, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-gradient-purple {
  background: linear-gradient(to right, #8b5cf6, #d946ef, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ===== Hero Section Update ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Header offset */
  overflow: hidden;
  background: transparent;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  z-index: 10;
  position: relative;
  flex-wrap: wrap;
}

.hero-content {
  flex: 1 1 500px;
  text-align: right;
  z-index: 2;
}

.hero-visual {
  flex: 1 1 500px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.hero-visual svg {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.2));
  animation: floatingSvg 6s ease-in-out infinite;
}

@keyframes floatingSvg {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* ===== Stats Counter Section ===== */
.stats-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 4rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  flex: 1 1 250px;
}

.stat-number {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif; /* For better numbers */
}

/* ===== Custom Buttons ===== */
.btn-modern {
  position: relative;
  overflow: hidden;
  border-radius: 50px;
  padding: 0.8rem 2.5rem;
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 1;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-modern-primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: white;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.btn-modern-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #6366f1, #0ea5e9);
  z-index: -1;
  transition: opacity 0.3s;
  opacity: 0;
}

.btn-modern-primary:hover::before {
  opacity: 1;
}

.btn-modern-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px rgba(14, 165, 233, 0.4);
}

/* ===== Icons ===== */
.icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.2);
  transition: all 0.3s ease;
}

.glass-card:hover .icon-box {
  background: #0ea5e9;
  color: white;
  transform: scale(1.1) rotate(5deg);
}

/* ===== Responsive Fixes ===== */
@media (max-width: 991px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    text-align: center;
  }
  .glow-cyan, .glow-purple {
    width: 300px;
    height: 300px;
  }
}

/* ===== Chart Range Tabs ===== */
.chart-range-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 3px;
}

.range-tab {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: 'Cairo', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.range-tab:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
}

.range-tab.active {
  background: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.15);
}

/* ===== Properties Analytics Table ===== */
#publisher-properties-analytics table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

#publisher-properties-analytics table tbody tr:hover {
  background: rgba(14, 165, 233, 0.05);
}

#publisher-properties-analytics table td {
  padding: 0.75rem 0.5rem;
  color: #cbd5e1;
}

/* ===== Dashboard Mobile Responsive ===== */
@media (max-width: 768px) {
  /* Stats grid: 2 columns on tablet/phone */
  .grid-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Stat cards: compact on mobile */
  .stat-card {
    padding: 1rem !important;
  }
  .stat-card .stat-value {
    font-size: 1.4rem !important;
  }
  .stat-card .stat-icon {
    font-size: 1.4rem !important;
  }

  /* Tabs: horizontal scroll */
  .tabs-header {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    gap: 0;
  }
  .tabs-header::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    flex-shrink: 0;
  }

  /* Campaign cards stack vertically */
  .campaign-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  /* Welcome banner stack */
  #welcome-banner {
    flex-direction: column !important;
    text-align: center !important;
  }
  #welcome-summary {
    justify-content: center !important;
  }

  /* Chart range tabs wrap */
  .chart-range-tabs {
    flex-wrap: wrap;
  }
  .range-tab {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Billing grid single column */
  #billing-tab > div {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  /* Stats: single column on very small screens */
  .grid-stats {
    grid-template-columns: 1fr !important;
  }

  .stat-card .stat-value {
    font-size: 1.2rem !important;
  }

  .btn-modern {
    font-size: 0.9rem !important;
    padding: 0.6rem 1.5rem !important;
  }
}

.modal-overlay {
    z-index: 10000 !important;
}

.modal-panel {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    max-height: 85vh !important;
    padding: 2rem !important;
}

.modal-panel h3, .modal-panel h4, .form-inner-title {
    color: #f8fafc !important;
}

.input-group label {
    color: #cbd5e1 !important;
}

.input-group input, .input-group select, .input-group textarea {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #111827 !important;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    outline: none !important;
    border-color: #0ea5e9 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
}

.input-group input::placeholder, .input-group textarea::placeholder {
    color: #64748b !important;
}
.modal-close {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}
