/**
 * Sudoku Game CSS
 * PuzzleDepot.com Sudoku Library
 * Dark theme matching trivia puzzle styling
 */

/* ===== CSS RESET AND BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f5;
  padding-top: 52px;
  min-height: 100vh;
  overflow-x: hidden;
}

body.has-navbar-fixed-top {
  background-image: url('https://puzzledepot.com/pics/xword_ba.gif');
  background-repeat: repeat;
  background-size: 64px 64px;
  background-color: #e0e0e0;
  padding-top: 52px;
}

/* ===== LAYOUT UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.columns {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.columns.is-centered {
  justify-content: center;
}

.column {
  flex: 1;
  padding: 0 0.5rem;
  min-width: 0;
}

.column.is-narrow {
  flex: none;
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: #3273dc;
  color: white;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  contain: layout style;
}

.navbar-brand {
  display: flex;
  align-items: stretch;
  min-height: 3.25rem;
}

.navbar-item {
  display: flex;
  align-items: center;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
}

.navbar-item:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.navbar-item.is-active {
  background-color: rgba(0, 0, 0, 0.2);
  font-weight: bold;
}

.navbar-burger {
  color: white;
  cursor: pointer;
  display: block;
  height: 3.25rem;
  position: relative;
  width: 3.25rem;
  margin-left: auto;
  background: none;
  border: none;
}

.navbar-burger span {
  background-color: currentColor;
  display: block;
  height: 1px;
  left: calc(50% - 8px);
  position: absolute;
  transform-origin: center;
  transition: all 86ms ease-out;
  width: 16px;
}

.navbar-burger span:nth-child(1) {
  top: calc(50% - 6px);
}

.navbar-burger span:nth-child(2) {
  top: calc(50% - 1px);
}

.navbar-burger span:nth-child(3) {
  top: calc(50% + 4px);
}

.navbar-burger.is-active span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.navbar-burger.is-active span:nth-child(2) {
  opacity: 0;
}

.navbar-burger.is-active span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.navbar-menu {
  display: none;
}

.navbar-menu.is-active {
  display: block;
  background-color: #3273dc;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.5rem 0;
}

@media screen and (min-width: 1024px) {
  .navbar {
    display: flex;
    align-items: stretch;
  }

  .navbar-burger {
    display: none;
  }

  .navbar-menu {
    display: flex;
    flex-grow: 1;
    align-items: stretch;
  }

  .navbar-start {
    display: flex;
    justify-content: flex-start;
    margin-right: auto;
    align-items: stretch;
  }

  .navbar-end {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
    align-items: stretch;
  }
}

/* ===== BUTTONS ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: calc(0.5em - 1px) 1em;
  text-align: center;
  white-space: nowrap;
  font-size: 1rem;
  height: 2.5em;
  line-height: 1.5;
  position: relative;
  vertical-align: top;
  user-select: none;
  transition: all 0.15s ease;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.is-small {
  font-size: 0.75rem;
  border-radius: 2px;
}

.button.is-medium {
  font-size: 1.25rem;
  min-width: 100px;
  min-height: 40px;
}

.button.is-link {
  background-color: #3273dc;
  border-color: transparent;
  color: #fff;
}

.button.is-link:hover:not(:disabled) {
  background-color: #276cda;
}

.button.is-primary {
  background-color: #0f8f8f !important;
  border-color: #0c7070 !important;
  color: #fefefe !important;
  font-weight: 800 !important;
}

.button.is-primary:hover:not(:disabled) {
  background-color: #0c7a7a !important;
}

.button.is-warning {
  background-color: #ffdd57;
  border-color: transparent;
  color: rgba(0, 0, 0, 0.7);
}

.button.is-warning:hover:not(:disabled) {
  background-color: #ffdb4a;
}

.button.is-info {
  background-color: #3298dc;
  border-color: transparent;
  color: #fff;
}

.button.is-success {
  background-color: #146b2c !important;
  border-color: #0f5621 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

.button.is-success:hover:not(:disabled) {
  background-color: #0f5621 !important;
}

.button.is-danger {
  background-color: #f14668;
  border-color: transparent;
  color: #fff;
}

.button.is-danger:hover:not(:disabled) {
  background-color: #ef3d5d;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Navigation buttons - horizontal layout */
.field.is-grouped {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field.is-grouped.is-grouped-centered {
  justify-content: center;
}

.field.is-grouped .control {
  flex: 0 0 auto;
}

/* ===== GAME CONTAINER ===== */
.game-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  contain: paint;
}

.game-container.dark-theme {
  background: #1d1f26;
  color: #f0f2f7;
  border: 1px solid #2a2d38;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* ===== HERO INTRO ===== */
.hero-intro {
  background: linear-gradient(135deg, #1f1f2b 0%, #252c3b 100%);
  color: #f5f7fb;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  min-height: 200px;
}

.hero-intro h1,
.hero-intro p,
.hero-intro span {
  color: #f5f7fb !important;
}

.hero-intro .title {
  color: #f5f7fb !important;
  font-weight: 700;
}

.hero-intro .subtitle {
  color: #f5f7fb !important;
  font-weight: 700;
}

/* ===== SUDOKU GRID ===== */
.sudoku-board {
  background: #252836;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sudoku-grid-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0;
  background: #1a1c24;
  border: 3px solid #3273dc;
  border-radius: 8px;
  overflow: hidden;
  max-width: 450px;
  width: 100%;
  aspect-ratio: 1;
}

.sudoku-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 4vw, 1.75rem);
  font-weight: 700;
  background: #2b2f3c;
  color: #f0f2f7;
  border: 1px solid #3a3f52;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

/* Box borders - thicker lines for 3x3 boxes */
.sudoku-cell:nth-child(3n) {
  border-right: 2px solid #3273dc;
}

.sudoku-cell:nth-child(9n) {
  border-right: none;
}

.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: 2px solid #3273dc;
}

/* First column */
.sudoku-cell:nth-child(9n+1) {
  border-left: none;
}

/* Top row */
.sudoku-cell:nth-child(-n+9) {
  border-top: none;
}

/* Bottom row */
.sudoku-cell:nth-child(n+73) {
  border-bottom: none;
}

/* Cell states */
.sudoku-cell.given {
  background: #1e2130;
  color: #a8b3cf;
  cursor: default;
}

.sudoku-cell.selected {
  background: #3273dc;
  color: white;
}

.sudoku-cell.highlighted {
  background: #363b4f;
}

.sudoku-cell.same-number {
  background: #4a5068;
}

.sudoku-cell.error {
  background: #f14668;
  color: white;
  animation: shake 0.3s ease;
}

.sudoku-cell.success {
  background: #48c774;
  color: white;
}

.sudoku-cell:hover:not(.given):not(.selected) {
  background: #3a4059;
}

/* Pencil marks */
.sudoku-cell .pencil-marks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  font-size: clamp(0.45rem, 1.5vw, 0.7rem);
  color: #8b9cc4;
  width: 100%;
  height: 100%;
  padding: 2px;
}

.sudoku-cell .pencil-marks span {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animation */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

@keyframes cellReveal {
  0% {
    transform: scale(1.2);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.sudoku-cell.revealed {
  animation: cellReveal 0.3s ease;
}

/* ===== NUMBER PAD ===== */
.number-pad {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.number-btn {
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 8px;
  background: #3273dc;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-btn:hover {
  background: #276cda;
  transform: scale(1.05);
}

.number-btn:active {
  transform: scale(0.95);
}

.number-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.number-btn.disabled:hover {
  transform: none;
}

/* ===== CONTROL BUTTONS ===== */
.game-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.control-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.control-btn.pencil-mode {
  background: #252836;
  color: #8b9cc4;
  border-color: #3a3f52;
}

.control-btn.pencil-mode.active {
  background: #ffd447;
  color: #1a1c24;
  border-color: #ffd447;
}

.control-btn.undo-btn,
.control-btn.redo-btn {
  background: #363b4f;
  color: #f0f2f7;
}

.control-btn.undo-btn:hover,
.control-btn.redo-btn:hover {
  background: #4a5068;
}

.control-btn.erase-btn {
  background: #f14668;
  color: white;
}

.control-btn.erase-btn:hover {
  background: #ef3d5d;
}

.control-btn.hint-btn {
  background: #48c774;
  color: white;
}

.control-btn.hint-btn:hover {
  background: #3eb368;
}

/* ===== TIMER & STATS ===== */
.game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 0.75rem;
  color: #8b9cc4;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffd447;
}

.timer {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #ffd447;
  text-align: center;
  margin: 1rem 0;
}

.timer.paused {
  color: #8b9cc4;
}

/* ===== DIFFICULTY TABS ===== */
.difficulty-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.difficulty-tab {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 20px;
  background: #252836;
  color: #8b9cc4;
  border: 2px solid #3a3f52;
  cursor: pointer;
  transition: all 0.15s ease;
}

.difficulty-tab:hover {
  background: #363b4f;
}

.difficulty-tab.active {
  background: #3273dc;
  color: white;
  border-color: #3273dc;
}

.difficulty-tab.easy.active {
  background: #48c774;
  border-color: #48c774;
}

.difficulty-tab.medium.active {
  background: #ffdd57;
  border-color: #ffdd57;
  color: #1a1c24;
}

.difficulty-tab.hard.active {
  background: #ff9f43;
  border-color: #ff9f43;
}

.difficulty-tab.expert.active {
  background: #f14668;
  border-color: #f14668;
}

.difficulty-tab.evil.active {
  background: #9b59b6;
  border-color: #9b59b6;
}

/* ===== MODALS ===== */
.modal {
  display: none;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
}

.modal.is-active {
  display: flex;
}

.modal-background {
  background-color: rgba(10, 10, 10, 0.86);
  position: absolute;
  inset: 0;
}

.modal-card {
  margin: 0 auto;
  max-height: calc(100vh - 40px);
  width: 640px;
  background-color: white;
  border-radius: 6px;
  box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.modal-card-head {
  background-color: #3273dc;
  border-bottom: 1px solid #dbdbdb;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-shrink: 0;
  justify-content: flex-start;
  padding: 20px;
  position: relative;
}

.modal-card-title {
  color: white;
  flex-grow: 1;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-card-body {
  background-color: white;
  flex-grow: 1;
  overflow: auto;
  padding: 20px;
}

.modal-card-foot {
  background-color: #f5f5f5;
  border-top: 1px solid #dbdbdb;
  border-radius: 0 0 6px 6px;
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  padding: 20px;
  gap: 0.5rem;
}

.delete {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  height: 24px;
  width: 24px;
  position: relative;
}

.delete::before,
.delete::after {
  background-color: white;
  content: "";
  display: block;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}

.delete::before {
  height: 2px;
  width: 50%;
}

.delete::after {
  height: 50%;
  width: 2px;
}

.delete:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* ===== COMPLETION OVERLAY ===== */
.completion-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-out;
}

.completion-overlay.is-success {
  background: linear-gradient(135deg, #48c774 0%, #3eb368 100%);
  color: white;
}

.completion-overlay h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.completion-overlay .stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: 1rem;
  white-space: nowrap;
}

.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li+li::before {
  content: "/";
  color: rgba(255, 255, 255, 0.7);
  padding: 0 0.75em;
}

.breadcrumb a {
  color: #ffdd57;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #ffd447;
}

/* ===== AD CONTAINER ===== */
.puzzle-ad-display {
  min-height: 250px;
  min-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  contain: strict;
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 1.5rem;
  background-color: #363636;
  color: #fefefe;
}

.footer a {
  color: #fefefe !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:hover {
  color: #ffd447 !important;
}

/* ===== UTILITIES ===== */
.has-text-centered {
  text-align: center;
}

.has-text-white {
  color: white !important;
}

.has-text-warning {
  color: #ffdd57 !important;
}

.has-text-weight-bold {
  font-weight: 700 !important;
}

.has-background-dark {
  background-color: #363636 !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 0.75rem !important;
}

.mb-4 {
  margin-bottom: 1rem !important;
}

.mb-5 {
  margin-bottom: 1.5rem !important;
}

.mt-3 {
  margin-top: 0.75rem !important;
}

.mt-4 {
  margin-top: 1rem !important;
}

.mt-5 {
  margin-top: 1.5rem !important;
}

.p-3 {
  padding: 0.75rem !important;
}

.p-5 {
  padding: 1.5rem !important;
}

.title {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.125;
  margin-bottom: 1.5rem;
}

.title.is-2 {
  font-size: 2.5rem;
}

.title.is-4 {
  font-size: 1.5rem;
}

.title.is-5 {
  font-size: 1.25rem;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 1.5rem;
}

.section {
  padding: 1.5rem 1rem;
  overflow-x: hidden;
}

/* ===== DIFFICULTY BADGE ===== */
.difficulty-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 800;
  margin-bottom: 0;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.difficulty-badge.easy {
  background: #48c774;
  color: white;
}

.difficulty-badge.medium {
  background: #ffdd57;
  color: #1a1c24;
}

.difficulty-badge.hard {
  background: #ff9f43;
  color: white;
}

.difficulty-badge.expert {
  background: #f14668;
  color: white;
}

.difficulty-badge.evil {
  background: #9b59b6;
  color: white;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {

  body,
  body.has-navbar-fixed-top {
    padding-top: 52px;
  }

  .game-container {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .sudoku-board {
    padding: 1rem;
  }

  .sudoku-grid {
    max-width: 100%;
  }

  .sudoku-cell {
    font-size: clamp(0.9rem, 3.5vw, 1.5rem);
  }

  .number-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .game-stats {
    gap: 1rem;
  }

  .timer {
    font-size: 1.5rem;
  }

  .modal-card {
    width: calc(100% - 40px);
    max-height: calc(100vh - 100px);
  }

  .column.is-narrow {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .number-btn {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }

  .control-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .difficulty-tab {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }

  /* Hide UI elements */
  .navbar,
  .footer,
  .game-controls,
  .number-pad,
  .difficulty-tabs,
  .puzzle-ad-display,
  .button,
  .breadcrumb,
  .timer,
  .difficulty-badge,
  .field.is-grouped {
    display: none !important;
  }

  /* Container styling - minimal padding */
  .game-container {
    box-shadow: none !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    background: white !important;
    border: none !important;
    max-width: 100% !important;
  }

  /* Hero intro - minimal spacing */
  .hero-intro {
    background: white !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0.25rem 0.5rem !important;
    margin-bottom: 0.5rem !important;
    min-height: auto !important;
  }

  /* Title styling */
  .hero-intro .title {
    color: black !important;
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.2 !important;
  }

  /* Info text */
  .hero-intro p {
    color: black !important;
    font-size: 0.9rem !important;
    margin: 0.125rem 0 !important;
    line-height: 1.2 !important;
  }

  /* Board styling - minimal padding */
  .sudoku-board {
    background: white !important;
    padding: 0.5rem !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  .sudoku-grid-container {
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* Grid styling - fixed dimensions, no flex */
  .sudoku-grid {
    display: grid !important;
    grid-template-columns: repeat(9, 55.5px) !important;
    grid-template-rows: repeat(9, 55.5px) !important;
    width: 500px !important;
    height: 500px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 3px solid black !important;
    border-radius: 0 !important;
    background: white !important;
    gap: 0 !important;
    box-sizing: border-box !important;
  }

  /* Cell styling - fixed dimensions */
  .sudoku-cell {
    width: 55.5px !important;
    height: 55.5px !important;
    min-width: 55.5px !important;
    min-height: 55.5px !important;
    max-width: 55.5px !important;
    max-height: 55.5px !important;
    background: white !important;
    color: black !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: none !important;
    line-height: 1 !important;
    aspect-ratio: auto !important;
  }

  /* Cell border system - no double borders */
  /* Right borders */
  .sudoku-cell {
    border-right: 1px solid #999 !important;
  }

  /* Bottom borders */
  .sudoku-cell {
    border-bottom: 1px solid #999 !important;
  }

  /* Remove right border on last column */
  .sudoku-cell:nth-child(9n) {
    border-right: none !important;
  }

  /* Remove bottom border on last row */
  .sudoku-cell:nth-child(n+73) {
    border-bottom: none !important;
  }

  /* 3x3 box right borders - thicker */
  .sudoku-cell:nth-child(3n):not(:nth-child(9n)) {
    border-right: 2px solid black !important;
  }

  /* 3x3 box bottom borders - thicker */
  .sudoku-cell:nth-child(n+19):nth-child(-n+27),
  .sudoku-cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid black !important;
  }

  /* Given numbers - slightly shaded */
  .sudoku-cell.given {
    background: #f5f5f5 !important;
    color: black !important;
    font-weight: 900 !important;
  }

  /* Remove pencil marks in print */
  .pencil-marks {
    display: none !important;
  }

  /* Page break settings */
  .game-container {
    page-break-inside: avoid !important;
  }

  /* Hide any filled-in user answers for clean puzzle print */
  .sudoku-cell:not(.given) {
    color: transparent !important;
  }
}
