/* 30DayChartChallenge Website Styles */

:root {
  --primary-color: #3a506b;
  --secondary-color: #5bc0be;
  --accent-color: #f48c06;
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --border-radius: 8px;
  --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.2;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
}

/* Gallery Grid Styling */
.gallery {
  margin-top: 2rem;
  margin-bottom: 4rem;
}

/* Legacy card styles for compatibility */
.card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  height: 100%;
  transition: all var(--transition-speed);
}

.card-img-top {
  height: 220px;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid #eee;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.placeholder-card {
  background-color: var(--empty-thumbnail-bg);
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  text-align: center;
  opacity: 0.7;
}

/* Individual Chart Page Styling */
.chart-details {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.chart-image {
  margin: 2rem 0;
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
}

.chart-image img {
  width: 100%;
  border-radius: var(--border-radius);
}

.chart-metadata {
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

/* Code blocks */
pre {
  border-radius: var(--border-radius);
  margin: 1rem 0 2rem;
}

.sourceCode {
  font-size: 0.9rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding: 2rem 1rem;
  text-align: center;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
}

.footer-content {
  font-size: 0.9rem;
  color: #666;
}

.author {
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Charts on index page */
.featured-chart {
  margin: 2rem 0;
  text-align: center;
}

.featured-chart img {
  max-width: 100%;
  height: auto;
  box-shadow: var(--card-shadow);
  border-radius: var(--border-radius);
}

/* Responsive styling handled in each page's inline CSS */

/* Template for each chart page */
.chart-template {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.chart-nav {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0 3rem;
}

.chart-nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  transition: color var(--transition-speed);
}

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

/* Make the code section more readable */
.code-with-copy {
  position: relative;
}

.code-folding-btn {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .card-img-top {
    height: 180px;
  }
}