:root {
  font-family: "Inter", "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: #f6f6ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(255, 64, 183, 0.15), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(255, 144, 126, 0.18), transparent 40%),
    linear-gradient(180deg, #05030a, #03010a 45%, #12011e);
  color: #f5f4ff;
}

.navbar {
  background: rgba(5, 2, 12, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.navbar-brand .site-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
}

.btn-pink {
  background: linear-gradient(135deg, #ff6ec4, #fb5b7c);
  border: none;
  color: #fff;
  box-shadow: 0 20px 30px rgba(255, 108, 196, 0.35);
}

.hero {
  padding: 4rem 0;
  background: linear-gradient(120deg, rgba(255, 0, 126, 0.2), rgba(5, 5, 12, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  font-weight: 700;
}

.hero .lead {
  font-size: 1.15rem;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: -1.5rem auto 1rem;
  max-width: 960px;
}

.section-nav .btn {
  flex: 1 1 140px;
  min-width: 120px;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
}

.section-nav .btn.active {
  background: linear-gradient(135deg, #ff6ec4, #fb5b7c);
  border-color: transparent;
}

.panel {
  background: rgba(10, 10, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
}

.panel h2 {
  margin-bottom: 0.35rem;
}

.panel p.lead {
  color: rgba(255, 255, 255, 0.6);
}

.generator-grid,
.utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.generator-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.generator-panel-section + .generator-panel-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
}

.generator-panel-section h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.generator-link-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 170px;
}

.generator-link-card .btn {
  font-size: 0.85rem;
}

.generator-icon {
  width: 38px;
  height: 38px;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #060606;
}

.worksheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 12, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 15px 30px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 1.2rem;
}

.card h5 {
  margin-bottom: 0.35rem;
}

.card small.copy-feedback,
.card .copy-feedback {
  display: block;
  color: #78f7d4;
  font-size: 0.75rem;
  min-height: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.copy-feedback.visible {
  opacity: 1;
}

button.copy-tooltip-button {
  position: relative;
}

button.copy-tooltip-button::after {
  content: attr(data-copy-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  border-radius: 0.35rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

button.copy-tooltip-button.copied::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.generator-output li {
  padding: 0.15rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.generator-output li:last-child {
  border-bottom: none;
}

.color-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.color-stack span {
  border-radius: 0.6rem;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.gradient-preview {
  height: 150px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.08);
}

.canvas-wrapper {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #02030b;
  max-width: 640px;
  margin: 0 auto;
}

canvas {
  width: 100% !important;
  display: block;
}

#image-canvas {
  max-width: 640px;
}

.utility-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#barcode-result {
  background: #fff;
}

footer {
  margin-top: 2rem;
  padding: 3rem 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

.badge-pill {
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
}

@media (max-width: 576px) {
  .section-nav {
    margin-top: 1rem;
  }
}

.api-docs-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.api-docs-table {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
}
.api-docs-table thead th {
  background: transparent !important;
}
.api-docs-table th,
.api-docs-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent !important;
  white-space: nowrap;
}
.api-docs-table tbody tr {
  background: transparent !important;
}
.api-docs-table tr:last-child td {
  border-bottom: none;
}
@media (max-width: 768px) {
  .api-docs-table th,
  .api-docs-table td {
    white-space: normal;
  }
}
