.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.modern-card {
  background: #091c38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.25rem 1.75rem 1.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

/* Diagonal shape highlight mimicking the screenshot */
.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(22, 98, 255, 0.08) 50%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.modern-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  border-color: rgba(22, 98, 255, 0.4);
}

.modern-card > * {
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.card-divider {
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.75rem;
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  flex: 1;
}

.card-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  text-align: center;
}

.card-btn {
  width: 100%;
  background: #1662ff;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-transform: uppercase;
}

.modern-card:hover .card-btn {
  background: #2b70ff;
}

.stats-dashboard-card {
  transition: all var(--transition-normal);
  cursor: default;
}

.stats-dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.6) !important;
  border-color: rgba(22, 98, 255, 0.4) !important;
}

.dashboard-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.dashboard-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-stats-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dashboard-stat-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 6px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 60px;
}

.dashboard-title-box {
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  padding-right: 10px;
}

.mobile-toggle-desc {
  display: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.3;
  margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .stats-dashboard-card {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px !important;
  }
  
  .stats-dashboard-card .stats-divider {
    width: 100% !important;
    height: 1px !important;
    margin: 8px 0 !important;
  }
  
  .dashboard-title-box {
    width: 100%;
    text-align: center;
    padding-right: 0;
    margin-bottom: 5px;
  }

  .dashboard-toggle-wrapper {
    width: 100%;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-toggle-desc {
    display: block;
    text-align: center;
  }
}

/* Custom Tooltip for Settings */
.tooltip-container {
  position: relative;
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  width: 260px;
  background-color: rgba(15, 23, 42, 0.98);
  color: #e2e8f0;
  text-align: left;
  border-radius: 8px;
  padding: 12px;
  position: absolute;
  z-index: 100;
  top: 130%;
  right: -10px; /* Align near the right edge */
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
  border: 1px solid rgba(177, 111, 240, 0.3);
  font-size: 0.75rem;
  line-height: 1.4;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  transform: translateY(-5px);
  pointer-events: none;
}

/* Tooltip Arrow */
.tooltip-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 35px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(177, 111, 240, 0.3) transparent;
}

.tooltip-container:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
