/* === Global / Layout === */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap');

#wave-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  color: #000;
  overflow-x: hidden;

  /* add left padding for fixed sidebar */
  padding-left: 11rem;
  transition: padding-left 0.3s ease;
  box-sizing: border-box;
  display: block; /* remove flex from body */
}

.container {
  max-width: 900px; /* your max width */
  margin: 0 auto;   /* center horizontally */
  padding: 0 3rem;
  box-sizing: border-box;
  text-align: center;

  /* optional if you want gap between content elements */
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* === Left Sidebar === */

.sidebar-left {
  width: 16rem;
  height: 100vh; /* full viewport height */
  padding: 2rem 1.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed; /* sticks to the left */
  top: 0;
  left: 0;
  align-items: center; /* Horizontally center all child elements */
  text-align: center;  /* Center text inside those elements */
  border-right: 1px solid #000;
}

.title-block {
  margin-bottom: 2rem;
}

.menu-title {
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 2.2rem); /* Adjust values as needed */
  letter-spacing: 2px;
  margin: 0;
  color: #000;
  text-align: left;
}

/* Tagline */
.tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
    color: #000;
    margin-top: 1rem; /* or whatever you need */
}

.cursor {
    display: inline-block;
    margin-left: 2px;
    color: #000;
    animation: blink 0.8s steps(1) infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Nav */
.nav-items {
    display: flex;
    flex-direction: column;
    align-items: center;  /* centers <li> horizontally */
    gap: 0.5rem;          /* optional: space between items */
    padding: 0;
    margin: 0;
}

.nav-items li {
    list-style: none;
    width: 100%;          /* or auto if you want tighter fit */
    text-align: center;   /* center text inside li */
}

.nav-items li:hover {
    color: #777;
    transform: translateX(6px);
}

.nav-items a {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 0;
    text-align: center;
    transition: color 0.3s, transform 0.3s;
}

.nav-items a:hover {
    color: #777;
    transform: scale(1.05); /* center-friendly hover */
}

/* Dropdown Structure */
/* Dropdown hidden by default */
.has-dropdown .dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
    padding: 0;
    margin: 0;
}

/* Dropdown items style */
.has-dropdown .dropdown li a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: #777; /* Slightly lighter */
    background-color: transparent;
    transition: background 0.3s;
}

.has-dropdown .dropdown li a:hover {
    background: transparent;
    color: #000;
}

/* When hovered (after class toggle) */
.has-dropdown.hover-active .dropdown {
    max-height: 500px; /* large enough to show all items */
    opacity: 1;
}

.social-icons a {
  color: #000;
  margin-right: 1rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.social-icons a:hover {
  color: #777;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Ensure vertical centering if needed */
  margin: 0 auto;
  width: 100%;
  max-width: 1000px;
  padding: 1rem;
  box-sizing: border-box;
}

/* === Main Content === */

#page-content {
  padding: 1rem 3rem 2rem 3rem; /* Top, Right, Bottom, Left */
  box-sizing: border-box;
  overflow-y: auto;
  max-width: 100vw;
  flex: 1 1 auto;
  max-width: 90%;  /* constrain max width */
  margin: 0 auto;    /* center horizontally */
  min-height: 100vh;
}

.sudoku-container {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}
  
table {
  border-collapse: collapse;
  width: 70vmin;
  aspect-ratio: 1 / 1;
  border: 7px solid #000;
  table-layout: fixed;
}  

td {
  width: 11.11%;
  height: 11.11%;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
  font-size: min(4vmin, 40px); /* Responsive but capped */
  border: 1px solid #000;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  }

/* Hover effect to lighten the square when hovering over it */
td:hover {
    background-color: #ccc; /* Lighter background color on hover */
}

/* Style for the input fields */
input {
  width: 100%;
  height: 100%;
  text-align: center; 
  font-size: min(4vmin, 40px); /* responsive and smaller */
  border: 0px solid #000; /* White border for the input */
  background-color: transparent; /* Transparent input background */
  color: white; /* White text inside the input fields */
  font-family: 'Montserrat', sans-serif; /* Apply Montserrat font to the input */
  font-weight: 200; /* Extra light weight for numbers */
}

/* Remove number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield; /* For Firefox */
  appearance: textfield; /* For other browsers */
}

input:focus {
  background-color: #ccc; /* Change input focus color */
}

button {
  margin-top: 10px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  background-color: #000; /* Button background */
  color: #fff; /* Button text color */
}

.button-row {
  display: flex;
  justify-content: center;
  gap: clamp(0.4rem, 1vmin, 0.7rem) clamp(0.7rem, 3vmin, 1.6rem);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.button-row button {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  background-color: #000;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.button-row button .arrow {
  display: inline-flex;
  align-items: center;
  /* optionally: */
  vertical-align: middle;
  line-height: 1;
  margin-left: 0.25em;
  margin-right: 0.25em;
}

/* Invert on hover */
.button-row button:hover {
  background: #777;
  transform: scale(1.05);
}

/* Slight enlarge on click */
.button-row button:active {
  transform: scale(1.05);
}

button:hover {
  background-color: #f0f0f0;
}

.cell-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
  
.cell-wrapper input {
  text-align: center;
  font-size: 1.2em;
}  

.cell-notes {
  position: absolute;
  bottom: -0.5vh;
  right: 0.25vw;
  font-size: 0.6em;
  opacity: 0.5;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
  color: #000;
}  

/* Thicker darker borders for the 3x3 block separation */
td:nth-child(3n) {
  border-right: 5px solid #000e; /* Thicker border for right side of 3-cell groups */
}

tr:nth-child(3n) td {
  border-bottom: 5px solid #000; /* Thicker border for bottom of 3-cell groups */
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.pulse {
  animation: pulse 1.5s ease-in-out 3;
}

/* Animated Difficulty Label */
.difficulty {
  font-size: clamp(0.75rem, 2vmin, 1.25rem);
  animation: wave 3s ease-in-out infinite;
  display: inline-block;
  font-weight: 400;
  color: #777;
  margin-top: 0.5rem; /* Reduce this to lessen the space */
}

@keyframes wave {
  0% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

.page-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* Default (off) state */
#notes-toggle-button {
  background-color: #000;
  color: #fff;
  transition: background-color 0.3s, color 0.3s;
}

/* Active (on) state */
#notes-toggle-button.active {
  background-color: #fff;
  color: #000;
  border: 2px solid#000;
}


.highlight-match {
  background-color: #bbb;
  box-shadow: 0 0 5px 2px rgba(255, 255, 255, 0.25);
}
  
td.glow {
  box-shadow: 0 0 10px rgba(255, 255, 255, 3);
}  
  
#sudoku-grid td input {
  width: 100%;
  height: 100%;
  font-size: min(3.5vmin, 30px);
  font-family: 'Montserrat', sans-serif;
  font-weight: 200;
  color: #000;
  background: transparent;
  border: none;
  text-align: center;
  outline: none;
}

td.hover-trail {
  background-color: #ccc;
  box-shadow: 0 0 6px 2px #ccc;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.board-solved td {
  background-color: #bbb !important;
  box-shadow: 0 0 6px 2px #bbb;
}
  
input:focus {
  outline: none;
}

@keyframes pulse {
  from {
    box-shadow: 0 0 10px #fff;
  }
  to {
    box-shadow: 0 0 30px #000;
  }
}

@media (max-width: 768px) {
  body {
    padding-left: 0;
  }

  .sidebar-left {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #000;
    padding: 1.5rem 1rem;
    text-align: center;
    align-items: center;
  }

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

  .puzzle-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
}

.sudoku-indicator {
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.sudoku-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s;
}

.sudoku-indicator .dot.active {
  background: #000;
}

/* Sidebar mini‑footer */
.site-footer {
  width: 100%;
  padding: 0.5rem 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 300;
  color: #777;
}