
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #020617;
  padding: 0.75rem 1.5rem;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f172a;
  --fg: #e5e7eb;
  --accent: #38bdf8;
  --muted: #94a3b8;
}
:root {
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}
:root[data-theme="light"] {
  --bg: #f8fafc;
  --fg: #020617;
  --accent: #0284c7;
  --muted: #475569;
}

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(56, 189, 248, 0.5));
  width: 0%;
  z-index: 2000;
  transition: width 0.1s ease;
}

section {
  min-height: auto;
  padding: 3rem 1rem;
  max-width: 900px;
  margin: auto;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}
section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

section:first-of-type {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  section {
    min-height: 100vh;
    padding: 6rem 2rem;
  }
}


section.visible {
  opacity: 1;
  transform: translateY(0);
}

h1, h2 {
  margin-bottom: 1rem;
}
h1 {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  letter-spacing: -0.015em;
}

p {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}


p {
  color: var(--muted);
  max-width: 65ch;
}

.accent {
  color: var(--accent);
}

.choices {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .choices {
    gap: 0.5rem;
  }
  .choices button {
    flex: 1;
    min-width: 120px;
  }
}

button {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
  min-height: 44px;
  border-radius: 6px;
}

@media (max-width: 480px) {
  button {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
}

button:active {
  transform: translateY(1px);
}

.result {
  margin-top: 1.5rem;
  display: none;
}

.demo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--accent);
  padding: 1rem;
  margin-top: 2rem;
}

.demo-nav.broken {
  justify-content: center;
}

#fixBugBtn {
  margin-top: 1.5rem;
}

.bug-demo .result {
  display: block;
  margin-top: 1rem;
  color: var(--accent);
}
.playground-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .playground-controls {
    gap: 0.75rem;
  }
}

.ui-btn {
  background: var(--accent);
  color: #020617;
  border: none;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ui-btn.primary {
  background: var(--accent);
  color: #020617;
}

.ui-btn.secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.ui-btn:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.35);
}

.ui-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}


.toggle {
  display: flex;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--muted);
}

.component-group {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.component-group h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.component-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.cards-row {
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
  flex: 1;
  min-width: 250px;
  transition: background 0.3s, transform 0.3s;
}

.card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}

.card-header {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.card p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.badge.warning {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.badge.info {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.alert span {
  font-weight: 700;
  font-size: 1.1rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-left: 4px solid #22c55e;
}

.alert-warning {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
  border-left: 4px solid #fb923c;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-left: 4px solid #ef4444;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--fg);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.2s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--fg);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid var(--muted);
}

.switch-slider::before {
  position: absolute;
  content: '';
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .switch-slider {
  background-color: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .switch-slider::before {
  transform: translateX(22px);
}

.progress-group {
  margin-bottom: 1.5rem;
}

.progress-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(56, 189, 248, 0.6));
  border-radius: 4px;
  transition: width 0.6s ease;
}

.insight-list {
  margin-top: 2rem;
  padding-left: 1.25rem;
  color: var(--muted);
  max-width: 70ch;
}

.insight-list li {
  margin-bottom: 0.75rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.insight-list strong {
  color: var(--fg);
}
/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--fg);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  z-index: 1001;
  font-size: 1.25rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-source-btn {
  display: block;
  margin: 4rem auto 0;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--accent);
  padding: 1.5rem;
  max-width: 600px;
  width: 90%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .modal-content {
    padding: 2.5rem;
  }
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.25rem;
  cursor: pointer;
}

.source-list {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
}

@media (max-width: 480px) {
  .source-list {
    padding-left: 1rem;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.1);
}

.project-header {
  font-weight: 600;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.project-card p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.tech-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tech-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.project-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s;
}

.metric-card:hover {
  transform: scale(1.05);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.metric-badge {
  font-size: 2rem;
}

.code-snippet-group {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.code-snippet {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  background: rgba(56, 189, 248, 0.1);
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-header span {
  color: var(--accent);
  font-weight: 600;
}

.copy-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: #020617;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 0.8;
}

.code-snippet pre {
  padding: 1rem;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

.code-snippet code {
  color: var(--fg);
}

/* Layout Demo */
.layout-demo {
  margin-top: 2rem;
}

.layout-demo h3 {
  margin-bottom: 1rem;
  color: var(--accent);
}

.grid-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
}

.grid-item {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--accent);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.flex-demo {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  border-radius: 8px;
  flex-wrap: wrap;
}

.flex-item {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid var(--accent);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
  flex: 1;
  min-width: 120px;
}

.animation-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.animation-demo {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  font-weight: 600;
  color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 1s ease-in-out infinite;
}

@keyframes slideIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in {
  animation: slideIn 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.bounce {
  animation: bounce 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotate {
  animation: rotate 3s linear infinite;
}

@keyframes scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.scale {
  animation: scale 1s ease-in-out infinite;
}

.validation-demo {
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 1.5rem;
}

.validation-demo .form-group {
  margin-bottom: 1.5rem;
}

.validation-demo label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--fg);
}

.validation-demo input,
.validation-demo textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  transition: border 0.2s;
}

.validation-demo input:focus,
.validation-demo textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.error-msg {
  display: block;
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.password-strength {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.password-strength.weak {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.password-strength.fair {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.password-strength.good {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.password-strength.strong {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

#formResult {
  margin-top: 1rem;
}

/* Loading States */
.loading-demo {
  margin-top: 2rem;
}

.skeleton-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
  animation: shimmer 2s infinite;
}

.skeleton-line.header {
  height: 20px;
  margin-bottom: 1rem;
}

.skeleton-line.short {
  width: 60%;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loaded-card {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.loaded-card.hidden {
  display: none;
}

.skeleton-card.hidden {
  display: none;
}

.checklist {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checklist-item label {
  cursor: pointer;
  flex: 1;
  color: var(--fg);
}

.test-showcase {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.test-case {
  border-radius: 8px;
  overflow: hidden;
}

.test-header {
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.test-header.passed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border-left: 4px solid #22c55e;
}

.test-case pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  overflow-x: auto;
  margin: 0;
}

.test-case code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--fg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.testimonial {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
}

.stars {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.testimonial p {
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-size: 0.9rem;
  color: var(--muted);
}

.skills-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-category {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-category h4 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-tag.expert {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.skill-tag.advanced {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.skill-tag.intermediate {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.footer {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1rem;
  margin-top: 4rem;
  color: var(--muted);
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--fg);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer-section p {
  font-size: 0.9rem;
}

.footer-section a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-section a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 2rem;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.github-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.github-link:hover {
  opacity: 0.7;
}

@media (max-width: 480px) {
  .footer {
    padding: 2rem 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.debug-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.debug-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
}

@media (min-width: 768px) {
  .debug-card {
    padding: 1.5rem;
  }
}

.debug-card h3 {
  margin-bottom: 0.5rem;
}

.debug-card p {
  margin-bottom: 1rem;
}

.debug-card button {
  margin-top: 0.5rem;
}

.sample-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 0.75rem;
}

.sample-wrapper {
  max-width: 100%;
  width: 100%;
}
.sample-wrapper > * {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sample-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: not-allowed;
}

.sample-btn:enabled {
  background: var(--accent);
  color: #020617;
  cursor: pointer;
}

.sample-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  pointer-events: auto;
}

.overflow-sample .overflow-box {
  background: rgba(255,255,255,0.03);
  padding: 1rem;
  white-space: nowrap;
}
.overflow-box.fixed-width {
  width: 720px;
  max-width: 100%;
  white-space: normal;
}

.hidden-text {
  color: var(--bg); /* matches background to simulate invisibility */
  max-width: 100%;
  overflow-wrap: anywhere;
}

.anim-box {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: inline-block;
  background: rgba(255,255,255,0.03);
}
.anim-box.heavy-shadow:hover {
  box-shadow: 0 40px 60px rgba(0,0,0,0.6);
  transition: box-shadow 0.6s cubic-bezier(.2,.8,.2,1);
}
.anim-box.fast-transform:hover {
  transform: translateY(-6px) scale(1.02);
  transition: transform 0.18s ease;
  box-shadow: 0 10px 25px rgba(56,189,248,0.18);
}

.nav-broken {
  justify-content: center !important;
  outline: 1px dashed #f87171;
}

.form-sample form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.form-sample input {
  flex: 1;
  min-width: 150px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--fg);
}

.img-sample img {
  width: 100%;
  height: auto;
  object-fit: fill; /* initial problematic behavior */
  display: block;
  border-radius: 6px;
  max-width: 100%;
}

.theme-sample button {
  padding: 0.5rem 0.75rem;
}

.motion-bar {
  width: 180px;
  height: 28px;
  background: linear-gradient(90deg, rgba(56,189,248,0.2), rgba(56,189,248,0.6));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slide 1.2s linear infinite;
}
@keyframes slide { from { transform: translateX(0);} to { transform: translateX(8px);} }

.motion-bar.respects-reduced-motion {
  animation: none;
}
