:root {
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-900: #581c87;
  --slate-900: #0f172a;
  --green-400: #4ade80;
  --red-400: #f87171;
  --white: #ffffff;
}



#analytics-page {
  font-family: "Inter", sans-serif;
  background: linear-gradient(
    to bottom right,
    var(--slate-900),
    var(--purple-900),
    var(--slate-900)
  );
  color: var(--white);
  margin-top: 5vw;
}


@media (max-width: 568px) {
  #analytics-page {
    font-family: "Inter", sans-serif;
    background: linear-gradient(
      to bottom right,
      var(--slate-900),
      var(--purple-900),
      var(--slate-900)
    );
    color: var(--white);
    margin-top: 20%;
  }
  .cta-section {
  padding: 1rem 0;
}
.cta-container {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(
    to right,
    rgba(37, 99, 235, 0.2),
    rgba(124, 58, 237, 0.2)
  );
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Animation Keyframes */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.2;
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 1.5rem;
  padding-bottom: 5rem;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.2)
  );
}

.hero-bg-element {
  position: absolute;
  top: 2.5rem;
  left: 2.5rem;
  width: 18rem;
  height: 18rem;
  background-color: rgba(139, 92, 246, 0.1);
  border-radius: 50%;
  filter: blur(3rem);
  animation: pulse 4s infinite;
}

.hero-bg-element-2 {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  width: 24rem;
  height: 24rem;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  filter: blur(3rem);
  animation: pulse 4s infinite;
  animation-delay: 1s;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 9999px;
  margin-bottom: 2rem;
}

.badge i {
  color: #fbbf24;
  margin-right: 0.5rem;
}

.badge span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  h1 {
    font-size: 5rem;
  }
}

.gradient-text {
  background: linear-gradient(to right, var(--blue-400), var(--purple-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 3rem;
  max-width: 60rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-buttons {
    flex-direction: row;
  }
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(to right, var(--blue-500), var(--purple-600));
  color: var(--white);
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--blue-600), var(--purple-700));
  transform: scale(1.05);
}

.btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--white);
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Dashboard Section */
.dashboard-section {
  padding: 5rem 0;
  position: relative;
}

.dashboard-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .dashboard-header {
    flex-direction: row;
    align-items: center;
  }
}

.dashboard-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.dashboard-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--white);
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  font-size: 0.875rem;
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.action-btn i {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Tab Navigation */
.tab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  background: linear-gradient(to right, var(--blue-500), var(--purple-600));
  color: var(--white);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tab-btn i {
  margin-right: 0.5rem;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.kpi-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slide-up 0.8s ease-out;
  animation-fill-mode: both;
  animation-delay: calc(var(--index) * 0.1s);
  transform-origin: center bottom;
}

.kpi-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.kpi-icon {
  font-size: 2rem;
  color: var(--blue-400);
  transition: color 0.3s;
}

.kpi-card:hover .kpi-icon {
  color: var(--blue-300);
}

.kpi-change {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
}

.positive {
  color: var(--green-400);
}

.negative {
  color: var(--red-400);
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.kpi-title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* Charts Section */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.chart-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.chart-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}

.chart-select {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: inherit;
}

.chart-select:focus {
  outline: none;
  border-color: var(--blue-400);
}

.chart-container {
  height: 20rem;
  position: relative;
}

.device-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
}

.legend-color {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.legend-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* Campaign Table */
.table-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 3rem;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.view-all-btn {
  color: var(--blue-400);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.view-all-btn:hover {
  color: var(--blue-300);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.data-table td {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slide-up 0.8s ease-out;
  animation-fill-mode: both;
  animation-delay: calc(var(--index) * 0.1s);
  transform-origin: center bottom;
}

.feature-card:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.feature-icon {
  font-size: 3rem;
  color: var(--blue-400);
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.feature-card:hover .feature-icon {
  color: var(--blue-300);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1rem;
}

.feature-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  padding: 3rem 0;
}

.cta-container {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(
    to right,
    rgba(37, 99, 235, 0.2),
    rgba(124, 58, 237, 0.2)
  );
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.cta-description {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* Loading spinner */
.loading-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .dashboard-title {
    font-size: 1.5rem;
  }

  .kpi-value {
    font-size: 1.25rem;
  }

  .cta-title {
    font-size: 1.875rem;
  }

  .cta-description {
    font-size: 1.125rem;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}
