:root {
  --primary-color: #007bff;
  --accent-color: #ff7a59;
  --bg-color: #ffffff;
  --text-color: #333;
  --heading-color: #111;
  --border-color: #eee;
  --section-bg-color: #f9f9f9;
  --nav-height: 70px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height); 
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header / Navbar --- */
.navbar {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--text-color);
  transition: all 0.3s ease-in-out;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* --- Main Content --- */
main {
  padding-top: var(--nav-height);
}

.hero {
  text-align: center;
  padding: 80px 0;
  background-color: var(--bg-color);
}

.hero h1 {
  font-size: 2.8em;
  color: var(--heading-color);
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2em;
  color: #555;
}

.hero-actions {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.content-section {
  padding: 60px 20px;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.content-section:nth-child(even) {
  background-color: var(--section-bg-color);
}

.content-section h2 {
  font-size: 2.2em;
  color: var(--heading-color);
  margin-bottom: 30px;
  text-align: center;
}

.content-section ul, 
.content-section ol {
  padding-left: 20px;
}

.content-section li {
  margin-bottom: 10px;
}
.content-section h4 {
    margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-color), #4ba3ff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.25);
}

.btn.ghost {
  background: transparent;
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn.full {
  width: 100%;
}

.btn:hover {
  transform: translateY(-1px);
}

/* --- Card Styles --- */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 1.2em;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
}

/* --- Footer --- */
.footer {
  background-color: #222;
  color: #aaa;
  text-align: center;
  padding: 20px 0;
}

/* --- Scroll-to-top Button --- */
#scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .nav-links a,
  .hamburger-menu .bar,
  #scroll-to-top {
    transition: none;
  }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    right: 0;
    background-color: var(--bg-color);
    width: 100%;
    flex-direction: column;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    padding: 10px 0;
  }

  .hero h1 {
    font-size: 2.2em;
  }
  
  .content-section h2 {
    font-size: 1.8em;
  }

  .hero-actions {
    flex-direction: column;
  }

  .panel-actions {
    flex-direction: column;
  }
}

/* --- New Content Specific Styles --- */
.example-box, .summary-box {
    background-color: var(--section-bg-color);
    border-left: 5px solid var(--primary-color);
    padding: 15px 20px;
    margin-top: 30px;
    border-radius: 5px;
}

.example-box h4, .summary-box h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tool-item {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.tool-item strong {
    color: var(--primary-color);
}

/* --- Engagement Section --- */
.engagement-section {
  position: relative;
  background: radial-gradient(circle at top, rgba(0, 123, 255, 0.08), transparent 60%),
              radial-gradient(circle at 20% 20%, rgba(255, 122, 89, 0.12), transparent 50%);
}

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.panel {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel h3 {
  margin: 0;
  font-size: 1.2em;
}

.chip {
  background: rgba(0, 123, 255, 0.12);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 600;
}

.chip.accent {
  background: rgba(255, 122, 89, 0.12);
  color: var(--accent-color);
}

.daily-prompt {
  font-size: 1.05em;
  line-height: 1.5;
  background: var(--section-bg-color);
  padding: 15px;
  border-radius: 12px;
  border: 1px dashed rgba(0,0,0,0.08);
}

.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.streak-box {
  background: #0b1f38;
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  display: grid;
  gap: 10px;
}

.streak-box strong {
  font-size: 1.4em;
}

.progress-wrap {
  background: rgba(255,255,255,0.2);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.progress-wrap.tall {
  height: 12px;
  background: var(--section-bg-color);
  border: 1px solid rgba(0,0,0,0.05);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transition: width 0.3s ease;
}

.challenge-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.challenge-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--section-bg-color);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.challenge-list input {
  accent-color: var(--primary-color);
}

.builder-panel label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.builder-panel input,
.builder-panel textarea {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95em;
}

.builder-panel textarea {
  resize: vertical;
}

.library-list {
  display: grid;
  gap: 12px;
}

.library-item {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  background: var(--section-bg-color);
}

.library-item h4 {
  margin: 0 0 8px 0;
  font-size: 0.95em;
  color: var(--heading-color);
}

.library-item p {
  margin: 0 0 10px 0;
  font-size: 0.9em;
}

.library-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.library-actions button {
  font-size: 0.85em;
}
