.wc-host { 
  width: 100%; 
  max-width: 900px; 
  margin: 0 auto; 
}

.wc-board {
  position: relative; 
  width: 100%; 
  height: 100%;
  --cell: 40px;
  background:
    repeating-conic-gradient(var(--fg) 0% 25%, var(--bg) 0% 50%) 0 0 /
    calc(var(--cell) * 2) calc(var(--cell) * 2);
  border: 2px solid var(--border);
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

.wc-board.wc-fixed-aspect {
  aspect-ratio: 1 / 1;
}

.wc-layer { 
  position: absolute; 
  inset: 0; 
  pointer-events: none; 
}

.wc-word {
  position: absolute;
  left: 0; 
  top: 0;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
  font-weight: 800;
  line-height: 1.05;
  white-space: pre;
  text-align: center;
  user-select: none;
  will-change: transform;
  color: var(--bg);
  mix-blend-mode: difference;
  transition: transform 300ms linear;
}

/* Section-specific word chess boards */
.section-word-chess {
  margin: 1rem 0 2rem 0;
  height: 150px;
  width: 100%;
}

.section-word-chess .wc-board {
  height: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Theme-aware styling */
[data-theme="dark"] .wc-word {
  color: var(--fg);
}

[data-theme="dark"] .section-word-chess .wc-board {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-word-chess {
    height: 120px;
    margin: 0.5rem 0 1.5rem 0;
  }
  
  .wc-board {
    --cell: 30px;
  }
}
