/* CodeLibs Project — www.codelibs.org */

:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #0f9b8e;
  --accent-hover: #0d8377;
  --text: #212529;
  --text-light: #6c757d;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-dark: #1a1a2e;
  --border: #dee2e6;
}

/* ── Typography ───────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar-codelibs {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar-codelibs.scrolled {
  background-color: var(--primary) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.navbar-codelibs .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.navbar-codelibs .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.navbar-codelibs .nav-link:hover,
.navbar-codelibs .nav-link:focus {
  color: #fff;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 8rem 0 5rem;
  text-align: center;
}
.hero h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero .lead {
  max-width: 640px;
  margin: 1.25rem auto 2rem;
  opacity: 0.9;
  font-size: 1.15rem;
}

.hero-compact {
  padding: 6rem 0 3rem;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-accent {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
}
.btn-accent:hover,
.btn-accent:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-outline-light {
  border-radius: 6px;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
}

/* ── Stats Bar ────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Section spacing ──────────────────────────────────── */
.section {
  padding: 4rem 0;
}
.section-alt {
  background-color: var(--bg-alt);
}
.section-heading {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-subheading {
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

/* ── Cards ────────────────────────────────────────────── */
.card-project {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.card-project:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.card-project .card-body {
  padding: 1.5rem;
}
.card-project .card-title {
  font-weight: 700;
  font-size: 1.15rem;
}
.card-project .card-text {
  color: var(--text-light);
  font-size: 0.95rem;
}
.card-project img {
  border-radius: 8px 8px 0 0;
}

/* ── Library card (compact) ───────────────────────────── */
.card-library {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.card-library:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.card-library h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.card-library p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* ── Badges ───────────────────────────────────────────── */
.badge-stars {
  background-color: #ffc107;
  color: #212529;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 0.25em 0.6em;
}
.badge-lang {
  background-color: #e9ecef;
  color: #495057;
  font-weight: 500;
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 0.2em 0.6em;
}

/* ── Community CTA ────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0f3460 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.cta-section h2 {
  font-weight: 700;
}
.cta-section p {
  opacity: 0.9;
  max-width: 560px;
  margin: 0.75rem auto 1.5rem;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0 1.5rem;
}
.footer h6 {
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer a:hover {
  color: var(--accent);
}
.footer ul {
  list-style: none;
  padding: 0;
}
.footer ul li {
  margin-bottom: 0.4rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

/* ── Product page ─────────────────────────────────────── */
.product-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 7rem 0 4rem;
}
.product-hero h1 {
  font-weight: 800;
}
.product-hero .lead {
  opacity: 0.9;
  max-width: 600px;
}
.feature-icon {
  width: 48px;
  height: 48px;
  background-color: rgba(15, 155, 142, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}
.quickstart-block {
  background: #1e1e2e;
  border-radius: 8px;
  padding: 1.5rem;
  color: #e0e0e0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  overflow-x: auto;
}
.quickstart-block code {
  color: #e0e0e0;
}

/* ── Screenshot ───────────────────────────────────────── */
.screenshot {
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-width: 100%;
  height: auto;
}

/* ── Category section on projects page ────────────────── */
.category-heading {
  font-weight: 700;
  font-size: 1.35rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── Link ─────────────────────────────────────────────── */
a.text-accent {
  color: var(--accent);
}
a.text-accent:hover {
  color: var(--accent-hover);
}

/* ── Utilities ────────────────────────────────────────── */
.text-accent { color: var(--accent) !important; }
.bg-accent { background-color: var(--accent) !important; }
