/* Base styles */
:root {
  --primary-color: #0f814d; /* Chia Green */
  --secondary-color: #025cfa; /* Chia Blue */
  --dark-color: #1e1e1e;
  --light-color: #f8f9fa;
  --prefarm-color: #5768d8; /* For the prefarm in charts */
  --mined-color: #2eb56b; /* For the mined coins in charts */
  --chart-line: #ff6b4a; /* Orange for inflation rate line */
  --font-main: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --primary-color-rgb: 15, 129, 77;
  --secondary-color-rgb: 2, 92, 250;
}

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

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary-color);
}

/* Header */
header {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: var(--light-color);
  padding: 8px;
  border-radius: 4px;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Hero section */
.hero {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  color: var(--light-color);
  padding: 100px 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

/* About section */
.about {
  padding: 80px 0;
  background-color: var(--light-color);
}

.about h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.about p {
  max-width: 800px;
  margin: 0 auto 20px;
  text-align: center;
}

/* Inflation section */
.inflation {
  padding: 80px 0;
  background-color: #f5f5f5;
}

.inflation h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary-color);
}

.inflation p {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.chart-container {
  width: 100%;
  max-width: 1000px;
  height: 500px;
  margin: 0 auto 50px;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.block-rewards {
  max-width: 600px;
  margin: 0 auto;
}

.block-rewards h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table th,
table td {
  padding: 12px 15px;
  text-align: center;
}

table th {
  background-color: var(--primary-color);
  color: var(--light-color);
}

table tr:nth-child(even) {
  background-color: #f2f2f2;
}

/* Links section */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.link-card {
  background-color: white;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.link-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-card h3 .material-icons {
  font-size: 20px;
  color: var(--primary-color);
}

.link-card p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.link-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--primary-color);
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: auto;
}

.link-card a .material-icons {
  font-size: 18px;
}

.link-card a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Remove old color variations */
.link-dexie .link-card-header,
.link-chia .link-card-header,
.link-tibet .link-card-header,
.link-mintgarden .link-card-header,
.link-tanstack .link-card-header {
  background-color: transparent;
}

.link-dexie a,
.link-tibet a,
.link-mintgarden a,
.link-tanstack a {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.link-dexie a:hover,
.link-tibet a:hover,
.link-mintgarden a:hover,
.link-tanstack a:hover {
  background-color: var(--primary-color);
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 50px 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  color: var(--light-color);
  font-size: 0.9rem;
}

.social-link img {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  filter: invert(1);
}

footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  nav ul li {
    margin-left: 10px;
  }

  .hero {
    padding: 60px 0;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .chart-container {
    height: 400px;
  }
}

@media (max-width: 576px) {
  header .container {
    flex-direction: column;
  }

  nav {
    margin-top: 15px;
  }

  nav ul {
    justify-content: center;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .chart-container {
    height: 300px;
  }
}
