    #container { text-align: center }
    table { border-collapse: collapse; font-size: 2em; margin: 0 auto; }
    colgroup, tbody { border: solid medium; }
    td { border: solid thin; height: 1.4em; width: 1.4em; text-align: center; padding: 0; }
    
    padd{padding-bottom: 100px;}
    #solve-button,#clear-button{padding-left:50px;padding-right:50px;
    }
    
    
:root {
      --primary-color: #ffffff;
      --accent-color: #fe5005;
      --board-max-width: 800px;
      --blur-bg: rgba(255,255,255,0.2);
      --blur-filter: blur(10px);
      --radius: 12px;
      --input-shadow: rgba(0,0,0,0.2);
    }
    * { box-sizing: border-box; margin:0; padding:0; }
    body {
      font-family: 'Poppins', sans-serif;
      color: var(--primary-color);
      background: #000;
      overflow-x: hidden;
    }  
     #bg-video {
      position: fixed;
      top:0; left:0;
      width:100vw; height:100vh;
      object-fit: cover;
      z-index:-1;
      filter: brightness(50%);
    }
    header {
      color: white;
      text-align: center;
      padding: 1rem;
      font-size: 2rem;
      font-weight: 700;
      text-shadow: 0 0 10px rgba(0,0,0,0.5);
    }
    .controls {
      display:flex;
      flex-wrap:wrap;
      gap:1rem;
      justify-content: space-between;
      backdrop-filter: var(--blur-filter);
      background: var(--blur-bg);
      padding:1rem;
      border-radius: var(--radius);
      margin:0rem auto;
      max-width: var(--board-max-width);
      align-items: center;
      border: 1px solid rgba(255,255,255,0.4);
    }
    .controls img.logo {
      height:40px;
      border-radius:4px;
    }
    .controls .button-group {
      display:flex;
      gap:0.5rem;
      flex-wrap:wrap;
    }
    .controls button,
    .controls a.link-btn {
      display:inline-flex;
      align-items:center;
      gap:0.5rem;
      padding:0.5rem 5.5rem;
      background: var(--accent-color);
      color:#fff;
      border:none;
      border-radius: var(--radius);
      cursor:pointer;
      font-weight:500;
      text-decoration:none;
      transition:transform 0.2s;
    }
    .controls button:hover,
    .controls a.link-btn:hover {
      transform: translateY(-2px);
    }
    
    
.linkedin-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #0a66c2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
  align-content: center;
}

.linkedin-button:hover {
  background-color: #004182;
}
 
#Iterations {
		margin-top:10px;
      width: 300px;
      max-height: var(--board-max-size);
      overflow-y: auto;
      backdrop-filter: var(--blur-filter);
      background: var(--blur-bg);
      padding: 1rem;
      margin-left:14.5rem ;
      border-radius: var(--board-radius);
      border: 1px solid rgba(255,255,255,0.4);
      background: var(--blur-bg);
      border-radius: var(--radius);
    }

    
.centered-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Full viewport height */
}

/* 1. Wrap your <table> in a .grid-wrapper in your HTML: */
.grid-wrapper {
  /* pick how wide you want it on desktop / mobile... */
  width: 90vmin;        /* 90% of the smaller viewport dimension */
  max-width: 500px;     /* never get wider than 500px */
  aspect-ratio: 1 / 1;  /* enforce a square container */
  margin: 0 auto;       /* center it horizontally */
  overflow: hidden;     /* hide any overflow if your cells slightly bleed */
}

/* 2. Make the table fill that square */
.grid-wrapper table#sudoku-board {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;  /* so columns divide evenly */
}

/* 3. Force each of the 9×9 cells to fill 1/9th of the width AND height */
.grid-wrapper table#sudoku-board td {
  width: calc(100% / 9);
  height: calc(100% / 9);
  text-align: center;
  padding: 0;
  border: 1px solid #fff;
  font-size: 1.2rem; /* tweak so text fits nicely */
}


/*====================================
  Mobile portraits up to 600px wide
====================================*/
@media only screen and (max-width: 600px) {
  /* scale the whole main area */
  .centered-container {
    transform: scale(0.85);
    transform-origin: top center;
  }

  /* tighten up the controls bar */
  .controls {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  .controls button,
  .controls a.link-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  /* shrink the sidebar */
  #Iterations {
    width: 200px;
    padding: 0.7rem;
    margin-left: 0;
  }

  /* maintain the same board‐cell proportions */
  #sudoku-board td {
    width: 1.2em;
    height: 1.2em;
    font-size: 1.6em;
  }
}

/*====================================
  Even smaller phones up to 400px wide
====================================*/
@media only screen and (max-width: 400px) {
  .centered-container {
    transform: scale(0.75);
  }
  /* optional: make text a hair smaller on tiny screens */
  header {
    font-size: 1.6rem;
  }
}
