:root {
  --asd-bg:           #f5f7fa;
  --asd-card-bg:      #fff;
  --asd-primary:      #3f51b5;
  --asd-secondary:    #ff9800;
  --asd-text:         #333;
  --asd-subtext:      #666;
  --asd-shadow-light: rgba(0,0,0,0.05);
  --asd-shadow-dark:  rgba(0,0,0,0.1);
}

/* Container: input + button inline, then results full-width below */
.asd-container {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-gap: 0.5rem;
  align-items: center;

  max-width: 1024px;
  margin: 2rem auto;
  padding: 2rem 1rem 0 1rem;
  background: var(--asd-bg);
}

/* Make input fill the remaining space */
#asd-domain-input {
  width: 100%;
  max-width: none;
}

/* Prevent the button from wrapping */
#asd-fetch-button {
  white-space: nowrap;
}

/* Results start on a new full-width row with breathing room */
#asd-results {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
}

#asd-results h4 {
  margin-top: 20px;
}

/* Space between metric sections */
.asd-card-group + .asd-card-group {
  margin-top: 2rem;
}

/* Section header styling */
.asd-card-group h3 {
  font-size: 1.25rem;
  color: var(--asd-text);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--asd-primary);
  padding-left: 0.5rem;
}

/* Card grid */
.asd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

/* Individual card */
.asd-card {
  position: relative;
  background: var(--asd-card-bg);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 4px 12px var(--asd-shadow-light);
  transition: transform .2s, box-shadow .2s;
}
.asd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--asd-shadow-dark);
}

/* Accent bar at top of card: now spans full width */
.asd-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--asd-secondary);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

/* Metric label */
.asd-card h4 {
  margin: 0;
  font-size: 0.75rem;
  color: var(--asd-subtext);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Metric value */
.asd-value {
  display: block;
  margin-top: 0.5rem;
  font-size: 2rem;
  font-weight: 600;
  color: var(--asd-primary);
  line-height: 1;
}

/* Chart container */
.asd-chart-container {
  margin-top: 2rem;
  background: var(--asd-card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--asd-shadow-light);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .asd-card {
    padding: 1rem;
  }
  .asd-value {
    font-size: 1.5rem;
  }
}
