*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --gray: #a0a0a0;
  --gray-light: #e5e5e5;
  --gray-dark: #666;
  --radius: 16px;
  --transition: 400ms cubic-bezier(0.22, 1, 0.36, 1);
  --acc-1: #0a0a0a;
  --acc-2: #7a7a7a;
  --acc-3: #333;
  --acc-4: #999;
  --acc-5: #1a1a1a;
  --acc-6: #555;
}

.container--wide {
  max-width: 1240px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--black);
  color: var(--white);
}

.code-block::selection,
.code-block ::selection {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.code-block::-moz-selection,
.code-block ::-moz-selection {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
body > nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1120px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

body > nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--black);
  z-index: 101;
}

.logo span {
  font-weight: 400;
  color: var(--gray);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--black);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--black);
}

.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--black);
  margin: 5px 0;
  transition: all 300ms ease;
  border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(20, 20, 20, 0.06), transparent 65%);
}

.hero::after {
  width: 560px;
  height: 560px;
  bottom: -200px;
  right: -140px;
  background: radial-gradient(circle, rgba(120, 120, 120, 0.06), transparent 65%);
}

.hero .hero-grid {
  position: relative;
  z-index: 1;
}

.hero-dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.05) 1px, transparent 0);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 72%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content {
  animation: heroFade 800ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.hero-badge svg {
  width: 12px;
  height: 12px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero h1 .outline {
  font-weight: 400;
  background: linear-gradient(120deg, var(--black) 15%, var(--gray) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--gray);
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gray-dark);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.hero-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--gray-light));
  flex-shrink: 0;
}

.hero-chip[data-cat="botones"] { --dot: #0a0a0a; }
.hero-chip[data-cat="tarjetas"] { --dot: #333; }
.hero-chip[data-cat="formularios"] { --dot: #999; }
.hero-chip[data-cat="navegacion"] { --dot: #1a1a1a; }
.hero-chip[data-cat="animaciones"] { --dot: #7a7a7a; }
.hero-chip[data-cat="layouts"] { --dot: #555; }
.hero-chip[data-cat="glassmorphism"] { --dot: linear-gradient(135deg, #fff, #0a0a0a); }

.hero-chip:hover {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  position: relative;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
  flex-shrink: 0;
}

.btn-primary:hover {
  background: #222;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
  border-color: var(--black);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--gray);
  padding: 12px 4px;
}

.btn-ghost:hover {
  color: var(--black);
}

.hero-visual {
  animation: heroFade 800ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-float-chip {
  position: absolute;
  top: -14px;
  right: -8px;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  color: var(--black);
  animation: floatChip 6s ease-in-out infinite;
}

@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* CODE BLOCK */
.code-wrapper {
  position: relative;
  width: 100%;
  background: var(--black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), box-shadow var(--transition);
}

.code-wrapper:hover {
  transform: scale(1.01);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

/* bloques grandes (detalle + demo): sin scale en hover, demasiado caro de repintar */
.detail-code .code-wrapper:hover,
.preview-code .code-wrapper:hover {
  transform: none;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #151515;
  border-bottom: 1px solid #222;
}

.code-dots {
  display: flex;
  gap: 7px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-filename {
  font-size: 12px;
  color: #8b8b8b;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #b0b0b0;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  font-family: inherit;
}

.copy-btn:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.copy-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.copy-btn.copied {
  color: #27c93f;
  border-color: #27c93f;
  background: rgba(39, 201, 63, 0.1);
  animation: popIn 350ms cubic-bezier(0.22, 1, 0.36, 1);
}

.code-block {
  padding: 24px;
  color: var(--white);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
  margin: 0;
  tab-size: 2;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.code-block::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.code-block::-webkit-scrollbar-track {
  background: transparent;
}

.code-block::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.code-block .comment { color: #5c6370; }
.code-block .keyword { color: #c678dd; }
.code-block .string { color: #98c379; }
.code-block .tag { color: #e06c75; }
.code-block .attr { color: #d19a66; }

/* FEATURES */
.features {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--gray);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

.section-header--compact {
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  text-decoration: none;
  color: var(--black);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0, 0, 0, 0.025), transparent 60%),
    var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.feature-card.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feature-card:nth-child(2).visible { animation-delay: 80ms; }
.feature-card:nth-child(3).visible { animation-delay: 160ms; }
.feature-card:nth-child(4).visible { animation-delay: 240ms; }
.feature-card:nth-child(5).visible { animation-delay: 320ms; }
.feature-card:nth-child(6).visible { animation-delay: 400ms; }
.feature-card:nth-child(7).visible { animation-delay: 480ms; }

.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--black), var(--gray));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: rgba(0, 0, 0, 0.18);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-index {
  position: absolute;
  top: 22px;
  right: 26px;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.12);
  transition: -webkit-text-stroke var(--transition);
  user-select: none;
  pointer-events: none;
}

.feature-card:hover .feature-index {
  -webkit-text-stroke: 1px var(--black);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--black);
  transition: all var(--transition);
  flex-shrink: 0;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.feature-card:hover .feature-icon {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.feature-card:hover .feature-icon svg {
  color: var(--white);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}

.feature-arrow {
  margin-top: 20px;
  font-size: 14px;
  color: var(--gray-light);
  transition: all var(--transition);
}

.feature-card:hover .feature-arrow {
  color: var(--black);
}

/* Wide (full-width) feature card */
.feature-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 28px;
  text-align: left;
}

.feature-card--wide .feature-icon {
  margin-bottom: 0;
}

.feature-card--wide .feature-card-text {
  flex: 1;
  min-width: 0;
}

.feature-card--wide p {
  max-width: 640px;
}

.feature-card--wide .feature-arrow {
  margin-top: 0;
  flex-shrink: 0;
}

/* HOW IT WORKS */
.steps {
  padding: 100px 0;
  background: #f5f5f5;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
}

.step {
  text-align: center;
  padding: 48px 32px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}

.step.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.step:nth-child(1).visible { animation-delay: 0ms; }
.step:nth-child(3).visible { animation-delay: 150ms; }
.step:nth-child(5).visible { animation-delay: 300ms; }

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-number {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--black), var(--gray));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-light);
  margin-bottom: 20px;
  color: var(--black);
  transition: all var(--transition);
}

.step-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.step:hover .step-icon {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.06);
}

.step:hover .step-icon svg {
  color: var(--white);
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--gray);
  max-width: 240px;
  margin: 0 auto;
  line-height: 1.7;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 0;
}

.step-connector::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--black), transparent);
  opacity: 0.25;
}

/* LIVE PREVIEW */
.preview {
  padding: 100px 0;
}

.preview-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(0, 0, 0, 0.02), transparent 55%),
    var(--white);
}

.preview-box.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  border: 1px dashed var(--gray-light);
  border-radius: 12px;
  min-height: 200px;
  min-width: 0;
}

/* Card estilo Balatro: tilt 3D por zonas + shine (clon de CodePen twogrey/qEWpoeX) */
@property --angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 135deg;
}

.balatro-stage {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  background-color: #356d55;
  perspective: 560px;
  transition: scale 0.1s;
}

.balatro-stage:has(.balatro-grid :hover) {
  scale: 1.05;
}

/* Manchas difuminadas (fondo tipo tienda de Balatro) */
.balatro-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: blur(10px);
  background-image:
    radial-gradient(circle at 16% 65%, rgba(250, 250, 250, 0.1) 0, rgba(148, 148, 148, 0.1) 50%, rgba(63, 63, 63, 0.1) 0, rgba(63, 63, 63, 0.1) 100%),
    radial-gradient(circle at 98% 57%, rgba(66, 66, 66, 0.3) 0, rgba(66, 66, 66, 0.3) 50%, rgba(105, 105, 105, 0.1) 0, rgba(105, 105, 105, 0.1) 100%);
}

/* Scanlines estilo CRT */
.balatro-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 50%, transparent 0%);
  background-size: 3px 3px;
  pointer-events: none;
}

.balatro-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: min(230px, 60vw);
  border: 5px solid #fff;
  aspect-ratio: 200 / 280;
  border-radius: 14px;
  box-shadow: 0 0 0 2px black, -24px 50px 13px 0 rgba(0, 0, 0, 0.2);
  background-image:
    linear-gradient(135deg, black 25%, transparent 25%),
    linear-gradient(225deg, black 25%, transparent 25%),
    linear-gradient(45deg, black 25%, transparent 25%),
    linear-gradient(315deg, black 25%, transparent 25%);
  background-position: 10px 0px, 10px 0px, 0px 0px, 0px 0px;
  background-size: 20px 20px;
  background-repeat: repeat;
  background-color: #1b1b1b;
  transition: transform 0.2s;
  transform: rotate3d(var(--x), var(--y), 0, var(--r));
  cursor: pointer;
  user-select: none;
}

.balatro-card::before,
.balatro-card::after {
  position: absolute;
  font-family: Sancreek, "Times New Roman", serif;
  letter-spacing: -0.4em;
  font-size: 21px;
  writing-mode: vertical-lr;
  text-orientation: upright;
  color: #fff;
}

.balatro-card::before {
  content: "JOKER";
  top: 3%;
  left: 1%;
}

.balatro-card::after {
  content: "JOKER";
  bottom: 3%;
  right: 1%;
  scale: -1;
}

.balatro-card > img {
  width: 70%;
  height: auto;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
}

.balatro-tag {
  color: #fff;
  font-size: 36px;
  font-family: "Courier New", Courier, monospace;
}

.balatro-tag img {
  width: 0.75em;
  height: auto;
  image-rendering: -moz-crisp-edges;
  image-rendering: pixelated;
}

.balatro-edition {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 2px 7px;
  pointer-events: none;
}

/* Barrido brillante (shine) que sigue el ángulo de cada zona */
.balatro-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: var(--s-o, 0);
  pointer-events: none;
  transition: --angle 0.2s, opacity 0.6s, background-size 0.3s;
  background-size: var(--s-s, 400%);
  background-image:
    linear-gradient(var(--angle), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25) 15%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0.75) 100%),
    linear-gradient(calc(var(--angle) - 180deg), rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1) 15%, rgba(255, 255, 255, 0.8) 20%, rgba(255, 255, 255, 0.8) 25%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.3) 100%),
    linear-gradient(var(--angle), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15) 30%, rgba(255, 255, 255, 0.75) 33%, rgba(255, 255, 255, 0.75) 33%, rgba(255, 255, 255, 0.15) 35%, rgba(255, 255, 255, 0.25) 100%);
}

/* Tilt 3D por zonas (grid 4x4) */
.balatro-grid {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(230px, 60vw);
  aspect-ratio: 200 / 280;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(1), :nth-child(2), :nth-child(5), :nth-child(6)):hover) {
  --x: -1;
  --y: 1;
  --angle: 125deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(3), :nth-child(4), :nth-child(7), :nth-child(8)):hover) {
  --x: -1;
  --y: -1;
  --angle: 130deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(9), :nth-child(10), :nth-child(13), :nth-child(14)):hover) {
  --x: 1;
  --y: 1;
  --angle: 135deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(11), :nth-child(12), :nth-child(15), :nth-child(16)):hover) {
  --x: 1;
  --y: -1;
  --angle: 140deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(1), :nth-child(4), :nth-child(13), :nth-child(16)):hover) {
  --r: 8deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(2), :nth-child(3), :nth-child(5), :nth-child(8), :nth-child(9), :nth-child(12), :nth-child(14), :nth-child(15)):hover) {
  --r: 4deg;
}

.balatro-card:has(+ .balatro-grid i:is(:nth-child(6), :nth-child(7), :nth-child(10), :nth-child(11)):hover) {
  --r: 2deg;
}

.balatro-card:has(+ .balatro-grid :hover) {
  --s-o: 0.5;
  --s-s: 100%;
}

/* Ediciones: cambian el borde y el brillo */
.balatro-card.is-foil {
  border-color: #dfe0ea;
  box-shadow: 0 0 0 2px black, -24px 50px 13px 0 rgba(0, 0, 0, 0.2), 0 0 26px rgba(230, 230, 240, 0.55);
}

.balatro-card.is-holo {
  border-color: #7ad7ff;
  box-shadow: 0 0 0 2px black, -24px 50px 13px 0 rgba(0, 0, 0, 0.2), 0 0 26px rgba(122, 215, 255, 0.5);
}

.balatro-card.is-poly {
  border-color: #ff7ad7;
  box-shadow: 0 0 0 2px black, -24px 50px 13px 0 rgba(0, 0, 0, 0.2), 0 0 28px rgba(255, 80, 160, 0.55);
}

.balatro-card.is-foil .balatro-edition {
  border-color: #dfe0ea;
  color: #f2f2f8;
}

.balatro-card.is-holo .balatro-edition {
  border-color: #7ad7ff;
  color: #7ad7ff;
}

.balatro-card.is-poly .balatro-edition {
  border-color: #ff7ad7;
  color: #ff7ad7;
}

/* Sacudida al cambiar de edición */
.balatro-card.balatro-purchase {
  animation: purchaseWobble 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes purchaseWobble {
  0% { transform: translateY(-8px) scale(1); }
  25% { transform: translateY(-16px) scale(1.06); }
  55% { transform: translateY(-8px) scale(0.96); }
  100% { transform: translateY(-8px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .balatro-stage,
  .balatro-card,
  .balatro-shine {
    transition: none;
  }

  .balatro-card.balatro-purchase {
    animation: none;
  }
}

.preview-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  align-self: flex-start;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--black);
  margin-right: 8px;
  vertical-align: middle;
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.28); }
  55% { box-shadow: 0 0 0 7px rgba(0, 0, 0, 0); }
}

.preview-hint {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 12px;
  color: #98c379;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  padding: 8px 14px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
  box-sizing: border-box;
  transition: background 300ms ease;
}

.preview-hint.is-visible {
  background: rgba(0, 0, 0, 0.07);
}

.preview-code {
  display: flex;
  align-items: center;
  min-width: 0;
}

.preview-code .code-wrapper {
  width: 100%;
}

.preview-code .code-block {
  font-size: 12px;
  padding: 20px;
  max-height: 560px;
  overflow-y: auto;
}

/* STATS */
.stats {
  padding: 80px 0;
  border-top: 1px solid var(--gray-light);
  border-bottom: 1px solid var(--gray-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item.visible {
  animation: fadeUp 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
  background: linear-gradient(180deg, var(--black), var(--gray));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 16px;
  color: var(--black);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

.stat-item:hover .stat-icon {
  background: var(--black);
  color: var(--white);
}

.stat-label {
  font-size: 13px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CTA */
.cta {
  padding: 100px 0 56px;
  text-align: center;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0),
    var(--black);
  background-size: 26px 26px, auto;
  border-radius: 28px;
  padding: 88px 48px;
  color: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.cta-panel.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cta-panel::before,
.cta-panel::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.cta-panel::before {
  width: 420px;
  height: 420px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 65%);
}

.cta-panel::after {
  width: 380px;
  height: 380px;
  bottom: -180px;
  left: -100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 65%);
}

.cta-panel > * {
  position: relative;
  z-index: 1;
}

.cta-panel h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  color: var(--white);
}

.cta-panel p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 36px;
}

.btn-cta {
  background: var(--white);
  color: var(--black);
  overflow: hidden;
}

.btn-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(0, 0, 0, 0.05), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-cta:hover {
  background: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.btn-cta:hover::after {
  left: 170%;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--gray-light);
  padding: 48px 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--gray);
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

footer p {
  font-size: 13px;
  color: var(--gray);
}

footer a {
  color: var(--black);
  text-decoration: none;
  font-size: 13px;
}

footer a:hover {
  text-decoration: underline;
}

/* ANIMATIONS */
@keyframes heroFade {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardFade {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MENU OVERLAY */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 250, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.menu-overlay.open {
  display: flex;
  animation: fadeIn 300ms ease forwards;
}

.menu-overlay a {
  font-size: 24px;
  text-decoration: none;
  color: var(--black);
  font-weight: 500;
  transition: opacity var(--transition);
}

.menu-overlay a:hover {
  opacity: 0.5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================
   COMPONENTES PAGE
   ============================ */

.comp-header {
  padding: 128px 0 48px;
  position: relative;
  overflow: hidden;
}

.comp-header::before,
.comp-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.comp-header::before {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -100px;
  background: radial-gradient(circle, rgba(20, 20, 20, 0.07), transparent 65%);
}

.comp-header::after {
  width: 420px;
  height: 420px;
  bottom: -220px;
  left: -120px;
  background: radial-gradient(circle, rgba(120, 120, 120, 0.06), transparent 65%);
}

.comp-header .container {
  position: relative;
  z-index: 1;
}

.comp-header-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.comp-eyebrow,
.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--acc-1), var(--acc-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 12px;
}

.section-eyebrow {
  text-align: center;
}

.section-eyebrow--light {
  background-image: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.55));
}

.comp-header h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 8px;
}

.grad-dot {
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.comp-header p {
  color: var(--gray);
  font-size: 16px;
}

.comp-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.comp-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.comp-stat svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  color: var(--acc-1);
}

.comp-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  padding: 0 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.05);
  transition: all var(--transition);
  flex-shrink: 0;
}

.comp-search:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(10, 10, 10, 0.28), 0 8px 28px rgba(10, 10, 10, 0.1);
}

.comp-search:focus-within svg {
  color: var(--acc-1);
}

.comp-search svg {
  width: 16px;
  height: 16px;
  color: var(--gray);
  flex-shrink: 0;
  transition: color var(--transition);
}

.comp-search input {
  border: none;
  background: none;
  padding: 14px 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--black);
  outline: none;
  min-width: 220px;
}

.comp-search input::placeholder {
  color: var(--gray);
}

/* FILTERS */
.comp-filters {
  padding: 0 0 40px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--gray-dark);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.filter-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--gray-light));
  display: inline-block;
  margin-right: 7px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.filter-chip[data-filter="botones"] { --dot: var(--acc-1); }
.filter-chip[data-filter="tarjetas"] { --dot: var(--acc-3); }
.filter-chip[data-filter="formularios"] { --dot: var(--acc-4); }
.filter-chip[data-filter="navegacion"] { --dot: var(--acc-5); }
.filter-chip[data-filter="animaciones"] { --dot: var(--acc-2); }
.filter-chip[data-filter="layouts"] { --dot: var(--acc-6); }
.filter-chip[data-filter="glassmorphism"] { --dot: linear-gradient(135deg, #fff, var(--acc-1)); }
.filter-chip[data-filter="especial"] { --dot: linear-gradient(135deg, #39C5BB, #FF77B8); }

.filter-chip:hover {
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--black);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.filter-chip.active::before {
  background: rgba(255, 255, 255, 0.9);
}

/* COMP COUNT */
.comp-count {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 13px;
  color: var(--gray);
  padding: 10px 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 100px;
  margin-bottom: 28px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.comp-count::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2));
  flex-shrink: 0;
}

.comp-count strong {
  color: var(--black);
  font-weight: 600;
}

/* COMPONENT CARDS GRID */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 100px;
}

.comp-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--transition);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.comp-card--in {
  animation: compCardIn 450ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.comp-card--in:nth-child(2) { animation-delay: 60ms; }
.comp-card--in:nth-child(3) { animation-delay: 120ms; }
.comp-card--in:nth-child(4) { animation-delay: 180ms; }
.comp-card--in:nth-child(5) { animation-delay: 240ms; }
.comp-card--in:nth-child(6) { animation-delay: 300ms; }
.comp-card--in:nth-child(7) { animation-delay: 360ms; }
.comp-card--in:nth-child(8) { animation-delay: 420ms; }
.comp-card--in:nth-child(9) { animation-delay: 480ms; }
.comp-card--in:nth-child(10) { animation-delay: 540ms; }
.comp-card--in:nth-child(11) { animation-delay: 600ms; }
.comp-card--in:nth-child(12) { animation-delay: 660ms; }
.comp-card--in:nth-child(13) { animation-delay: 720ms; }
.comp-card--in:nth-child(14) { animation-delay: 780ms; }
.comp-card--in:nth-child(15) { animation-delay: 840ms; }
.comp-card--in:nth-child(16) { animation-delay: 900ms; }
.comp-card--in:nth-child(17) { animation-delay: 960ms; }
.comp-card--in:nth-child(18) { animation-delay: 1020ms; }
.comp-card--in:nth-child(19) { animation-delay: 1080ms; }
.comp-card--in:nth-child(20) { animation-delay: 1140ms; }
.comp-card--in:nth-child(21) { animation-delay: 1200ms; }
.comp-card--in:nth-child(22) { animation-delay: 1260ms; }
.comp-card--in:nth-child(23) { animation-delay: 1320ms; }
.comp-card--in:nth-child(24) { animation-delay: 1380ms; }
.comp-card--in:nth-child(25) { animation-delay: 1440ms; }
.comp-card--in:nth-child(26) { animation-delay: 1500ms; }

.comp-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 0, 0, 0.2);
  border-color: color-mix(in srgb, var(--a1, #000) 40%, transparent);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  box-shadow:
    0 20px 60px color-mix(in srgb, var(--a1, #000) 16%, transparent),
    0 8px 24px rgba(0, 0, 0, 0.06);
}

@keyframes compCardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comp-preview {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #fafafa, #f4f4f5);
  background:
    radial-gradient(120% 90% at 15% 0%, color-mix(in srgb, var(--a1, #d4d4d8) 16%, #fff), transparent 55%),
    radial-gradient(120% 100% at 100% 100%, color-mix(in srgb, var(--a2, #d4d4d8) 14%, #fff), transparent 60%),
    linear-gradient(180deg, #fafafa, #f4f4f5);
  overflow: hidden;
  position: relative;
}

.comp-card:nth-child(6n + 1) { --a1: #0a0a0a; --a2: #555; }
.comp-card:nth-child(6n + 2) { --a1: #333; --a2: #777; }
.comp-card:nth-child(6n + 3) { --a1: #666; --a2: #999; }
.comp-card:nth-child(6n + 4) { --a1: #1a1a1a; --a2: #444; }
.comp-card:nth-child(6n + 5) { --a1: #444; --a2: #0a0a0a; }
.comp-card:nth-child(6n) { --a1: #2a2a2a; --a2: #666; }

.comp-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--a1, transparent), var(--a2, transparent));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}

.comp-card:hover .comp-preview::before {
  opacity: 1;
}

.comp-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
}

.comp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 170px;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  z-index: 3;
  pointer-events: none;
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-card:hover::before {
  left: 165%;
}

.comp-preview-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.comp-card-body {
  padding: 24px;
}

.comp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.comp-card-title {
  font-size: 16px;
  font-weight: 600;
}

.comp-tags {
  display: flex;
  gap: 4px;
}

.comp-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--gray-light);
  color: var(--gray-dark);
}

.comp-tag.html { color: #e44d26; background: rgba(228, 77, 38, 0.08); }
.comp-tag.css { color: #1572b6; background: rgba(21, 114, 182, 0.08); }
.comp-tag.js { color: #f7df1e; background: rgba(247, 223, 30, 0.15); }

.comp-card-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
}

.comp-card-actions {
  display: flex;
  gap: 8px;
}

.comp-card-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 8px 16px;
  font-size: 12px;
}

.comp-card-actions .btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.comp-card-actions .btn:hover svg {
  transform: translateX(3px);
}

.comp-card-actions .btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-light);
}

.comp-card-actions .btn-secondary:hover {
  border-color: var(--black);
}

/* EMPTY STATE */
.comp-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  text-align: center;
  grid-column: 1 / -1;
}

.comp-empty.show {
  display: flex;
  animation: compCardIn 400ms ease forwards;
}

.comp-empty svg {
  width: 40px;
  height: 40px;
  color: var(--gray-light);
  margin-bottom: 16px;
}

.comp-empty p {
  color: var(--gray);
  font-size: 14px;
}

/* DETAIL PAGE */
.detail-header {
  padding: 132px 0 40px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.detail-back i {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.detail-back:hover {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.detail-back:hover i {
  transform: translateX(-3px);
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-title-row h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
}

.detail-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-dark);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.detail-category:hover {
  color: var(--black);
  border-color: rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.detail-desc {
  color: var(--gray-dark);
  font-size: 16px;
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 56px;
}

.detail-preview,
.detail-code {
  min-width: 0;
}

.detail-header.visible .detail-back {
  animation: fadeSlideUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-header.visible .detail-title-row {
  animation: fadeSlideUp 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 90ms;
}

.detail-header.visible .detail-desc {
  animation: fadeSlideUp 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 160ms;
}

.detail-preview-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27c93f;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.detail-preview {
  position: sticky;
  top: 84px;
}

.preview-window {
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  transition: box-shadow var(--transition);
}

.preview-window:hover {
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.15);
}

.preview-window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #151515;
  border-bottom: 1px solid #222;
}

.preview-window-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #9a9a9a;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-preview-host {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.045) 1px, transparent 0),
    #fff;
  background-size: 18px 18px;
  overflow: auto;
  transform: translateZ(0);
}

.detail-preview-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray);
  font-style: italic;
  line-height: 1.5;
}

.preview-window:has(.live-preview-host--glass) {
  background: #1a1a2e;
  border-color: #2a2a4a;
}

.live-preview-host--glass {
  background:
    radial-gradient(circle at 20% 15%, rgba(0, 212, 255, 0.45), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.42), transparent 45%),
    radial-gradient(circle at 75% 20%, rgba(255, 122, 89, 0.3), transparent 40%),
    linear-gradient(135deg, #1a1a2e, #16213e);
  overflow: hidden;
}

.live-preview-host--glass > *:not(.glass-toast-region):not(.preview-js-error) {
  position: relative;
  z-index: 1;
}

.preview-js-error {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92%;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.94);
  color: #fff;
  font-size: 12px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 50;
}

.detail-grid.visible .detail-preview-label {
  animation: fadeSlideUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-grid.visible .preview-window {
  animation: windowPop 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 140ms;
}

.detail-grid.visible .detail-preview-note:not([hidden]) {
  animation: fadeSlideUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 300ms;
}

.detail-grid.visible .detail-code .code-wrapper {
  animation: fadeSlideUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 240ms;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes windowPop {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.45); }
  55% { box-shadow: 0 0 0 6px rgba(39, 201, 63, 0); }
}

@keyframes popIn {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .detail-header.visible .detail-back,
  .detail-header.visible .detail-title-row,
  .detail-header.visible .detail-desc,
  .detail-grid.visible .detail-preview-label,
  .detail-grid.visible .preview-window,
  .detail-grid.visible .detail-code .code-wrapper,
  .preview-live-dot {
    animation: none;
  }
}

/* Bloque de código con scroll interno (detalle + demo balatro) */
.detail-code .code-block {
  max-height: 520px;
  overflow: auto;
}

.code-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.code-lines {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 11px;
  color: #6e6e6e;
  white-space: nowrap;
}

/* DONAR */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-donar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.92);
  color: #fafafa;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease, background 300ms ease;
}

.nav-donar:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

.nav-donar:focus-visible {
  outline: 2px solid #ff5e5b;
  outline-offset: 2px;
}

.nav-donar svg {
  width: 15px;
  height: 15px;
}

.donar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 8px 0 72px;
  padding: 28px 32px;
  border-radius: 20px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 154, 90, 0.12), transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(255, 94, 91, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 20px 60px rgba(0, 0, 0, 0.06);
}

.donar-card.visible {
  animation: cardFade 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.donar-card-text h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 6px 0 6px;
}

.donar-card-text p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}

.btn-donar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 100px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.5);
  color: #fafafa;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease, border-color 300ms ease, background 300ms ease;
}

.btn-donar:hover {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
}

.btn-donar:active {
  transform: translateY(0) scale(0.97);
}

.btn-donar:focus-visible {
  outline: 2px solid #ff5e5b;
  outline-offset: 3px;
}

.btn-donar-cup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9a5a, #ff5e5b);
  color: #fff;
  flex-shrink: 0;
}

.btn-donar-cup svg {
  width: 14px;
  height: 14px;
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 72px;
  border-top: 1px solid var(--gray-light);
}

.detail-nav a {
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.detail-nav a:hover {
  border-color: rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.detail-nav a small {
  display: inline-block;
  color: var(--gray);
  font-weight: 500;
  font-size: 12px;
  transition: transform var(--transition);
}

.detail-nav a:hover small {
  transform: translateX(-4px);
}

.detail-nav .detail-nav-next {
  text-align: right;
  margin-left: auto;
}

.detail-nav .detail-nav-next:hover small {
  transform: translateX(4px);
}

/* GLASSMORPHISM DEMO BACKDROPS */
.glass-demo {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(0, 212, 255, 0.45), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.42), transparent 45%),
    radial-gradient(circle at 75% 20%, rgba(255, 122, 89, 0.3), transparent 40%),
    linear-gradient(135deg, #1a1a2e, #16213e);
  animation: glassShift 12s ease-in-out infinite alternate;
}

.glass-demo > * {
  position: relative;
  z-index: 1;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.04)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 20px rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

@keyframes glassShift {
  from { background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%; }
  to { background-position: 15% 10%, 85% 85%, 60% 40%, 0% 0%; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero p {
    max-width: 100%;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .step-connector {
    display: none;
  }

  .step {
    padding: 32px 24px;
  }

  .preview-box {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .preview-area {
    min-height: 160px;
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .comp-grid {
    grid-template-columns: 1fr 1fr;
  }

  .comp-header-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .comp-search {
    width: 100%;
  }

  .comp-search input {
    min-width: 0;
    width: 100%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-preview {
    position: static;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card--wide {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 16px;
  }

  .feature-card--wide .feature-arrow {
    margin-top: 8px;
  }

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

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .preview-box {
    padding: 20px;
  }

  .preview-area {
    padding: 20px;
    min-height: 140px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .comp-grid {
    grid-template-columns: 1fr;
  }

  .comp-filters {
    gap: 6px;
  }

  .filter-chip {
    font-size: 12px;
    padding: 5px 12px;
  }

  .nav-donar {
    padding: 8px;
  }

  .nav-donar span {
    display: none;
  }

  .donar-card {
    padding: 24px;
  }

  .donar-card .btn-donar {
    width: 100%;
    justify-content: center;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-preview {
    position: static;
  }

  .live-preview-host {
    min-height: 260px;
    padding: 20px;
  }

  .detail-nav {
    flex-direction: column;
  }

  .cta-panel {
    padding: 64px 24px;
    border-radius: 20px;
  }

  .detail-nav .detail-nav-next {
    text-align: left;
    margin-left: 0;
  }

  .code-block {
    font-size: 11px;
    padding: 16px;
  }

  .code-wrapper:hover {
    transform: none;
  }

  footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ===== ESPECIAL / HATSUNE MIKU ===== */
.miku-demo {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    radial-gradient(90% 80% at 80% 0%, rgba(255, 119, 184, 0.35), transparent 55%),
    radial-gradient(90% 80% at 10% 100%, rgba(57, 197, 187, 0.4), transparent 55%),
    linear-gradient(rgba(57, 197, 187, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 197, 187, 0.06) 1px, transparent 1px),
    linear-gradient(160deg, #141a30, #0d1220);
  background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  position: relative;
}

.miku-demo .miku-card {
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px 10px;
  border-radius: 18px;
  border: 1px solid rgba(57, 197, 187, 0.4);
  background: rgba(13, 18, 32, 0.72);
  box-shadow: 0 0 26px rgba(57, 197, 187, 0.25), 0 10px 24px rgba(0, 0, 0, 0.45);
  transition: transform 260ms var(--transition), box-shadow 260ms var(--transition);
}

.miku-demo:hover .miku-card {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 34px rgba(57, 197, 187, 0.38), 0 14px 30px rgba(0, 0, 0, 0.55);
}

.miku-demo .miku-brand {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 8px;
  letter-spacing: 1.5px;
  padding: 3px 10px 3px 8px;
  border-radius: 100px;
  color: #04121f;
  background: linear-gradient(90deg, #39c5bb, #7fe8e0);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}

.miku-demo .miku-avatar-wrap {
  position: relative;
  width: 78px;
  height: 78px;
  margin: 8px auto 6px;
  border-radius: 15px;
  padding: 3px;
  background: conic-gradient(from 0deg, #39c5bb, #ff77b8, #8a63d2, #39c5bb);
  animation: mikuDemoSpin 9s linear infinite;
}

.miku-demo .miku-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 12px;
  background: #0d1220;
}

.miku-demo .miku-avatar {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  border-radius: 12px;
  image-rendering: pixelated;
}

.miku-demo .miku-avatar-fallback {
  display: none;
  position: absolute;
  inset: 3px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: #39c5bb;
  background: #0d1220;
}

.miku-demo .miku-name {
  margin: 0;
  font-family: "Sancreek", cursive;
  font-size: 15px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #39c5bb, #aef3ee, #ff77b8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.miku-demo .miku-sub {
  margin: 2px 0 0;
  font-size: 9px;
  color: rgba(244, 247, 255, 0.55);
}

.miku-demo .miku-ribbon {
  display: flex;
  height: 4px;
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
  width: 100%;
}
.miku-demo .miku-ribbon i { flex: 1; }
.miku-demo .miku-ribbon i:nth-child(1) { background: #39c5bb; }
.miku-demo .miku-ribbon i:nth-child(2) { background: #ff77b8; }
.miku-demo .miku-ribbon i:nth-child(3) { background: #d8e54b; }

@keyframes mikuDemoSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Balatro card - preview del grid (componente especial) */
.balatro-demo {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #356d55;
  position: relative;
  overflow: hidden;
}

/* Manchas difuminadas (fondo tipo tienda de Balatro) */
.balatro-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: blur(10px);
  background-image:
    radial-gradient(circle at 16% 65%, rgba(250, 250, 250, 0.1) 0, rgba(148, 148, 148, 0.1) 50%, rgba(63, 63, 63, 0.1) 0, rgba(63, 63, 63, 0.1) 100%),
    radial-gradient(circle at 98% 57%, rgba(66, 66, 66, 0.3) 0, rgba(66, 66, 66, 0.3) 50%, rgba(105, 105, 105, 0.1) 0, rgba(105, 105, 105, 0.1) 100%);
}

/* Scanlines estilo CRT */
.balatro-demo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.2) 50%, transparent 0%);
  background-size: 3px 3px;
  pointer-events: none;
}

.balatro-demo-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  width: 96px;
  border: 4px solid #fff;
  aspect-ratio: 200 / 280;
  border-radius: 10px;
  box-shadow: 0 0 0 2px black, -10px 22px 12px 0 rgba(0, 0, 0, 0.2);
  background-image:
    linear-gradient(135deg, black 25%, transparent 25%),
    linear-gradient(225deg, black 25%, transparent 25%),
    linear-gradient(45deg, black 25%, transparent 25%),
    linear-gradient(315deg, black 25%, transparent 25%);
  background-position: 6px 0px, 6px 0px, 0px 0px, 0px 0px;
  background-size: 12px 12px;
  background-repeat: repeat;
  background-color: #1b1b1b;
  transition: transform 260ms var(--transition);
}

.balatro-demo:hover .balatro-demo-card {
  transform: translateY(-3px) scale(1.03);
}

.balatro-demo-tag {
  color: #fff;
  font-size: 12px;
  font-family: "Courier New", Courier, monospace;
}

.balatro-demo-tag img {
  width: 0.75em;
  height: auto;
  image-rendering: pixelated;
}

.balatro-demo-art {
  width: 70%;
  height: auto;
  image-rendering: pixelated;
}

.balatro-demo-edition {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 10;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 2px 6px;
  pointer-events: none;
}

/* Barrido brillante sutil animado */
.balatro-demo-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 45%, transparent 60%);
  animation: balatroDemoShine 3.2s ease-in-out infinite;
}

@keyframes balatroDemoShine {
  0%, 100% { opacity: 0; }
  45% { opacity: 0.55; }
  70% { opacity: 0.55; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
