:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --text-dark: #1f2937;
  --text-light: #4b5563;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Header Navbar */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero .cta-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 2rem;      /* Generous padding for a premium hero button */
  font-size: 1.2rem;            /* Larger text to balance the big heading */
  color: black;/* Blue text inside the white capsule */
  background-color: white;    /* Crisp white background against the blue gradient */
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.hero .cta-btn:hover {
  background-color: #f3f4f6;  /* Soft off-white transition */
  transform: translateY(-2px); /* Subtle premium lift effect */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Stats / TLD Badges Grid */
.metrics-container {
  max-width: var(--max-width);
  margin: 2rem auto 3rem auto;
  padding: 0 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.tld-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border-color);
}

.tld-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tld-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.tld-meta {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

/* Controls Bar (Search & Sort) */
.controls-bar {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.sort-select {
  padding: 0.75rem 2rem 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
}

/* Domain Listing Grid */
.domain-section {
  max-width: var(--max-width);
  margin: 0 auto 4rem auto;
  padding: 0 2rem;
}

#list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: grid;
  grid-template-areas: 
    "title title"
    "price button";
  gap: 1rem;
  align-items: center;
}

.domain-title {
  grid-area: title;
  font-weight: 700;
  font-size: 1.5rem;
}

.domain-price {
  grid-area: price;
  font-weight: 700;
  color: #10b981;
  font-size: 1.25rem;
}

.buy-btn {
  grid-area: button;
  justify-self: end;
  background-color: var(--bg-main);
  color: black;
  text-decoration: none;
  padding: 0.4rem 1rem;              /* Increased horizontal padding for the pill look */
  border: 1px solid var(--border-color);
  border-radius: 999px;              /* CHANGED: Forces the perfect capsule shape */
  font-size: 0.75rem;                /* Slightly increased to match the image balance */
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.buy-btn:hover {
  background-color: var(--border-color); /* Added a subtle background shift on hover */
}

/* Footer Section */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.875rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}