/**
 * Board Game Generator - Premium Modern Style Sheet (Static Version)
 */

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

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  padding: 0.75rem 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

/* Mobile menu button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 100;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand-silver {
  font-size: 1.75rem;
  font-weight: 700;
  color: #A0AEC0;
  margin-right: 0.25rem;
}

.navbar-brand-logo {
  height: 2.5rem;
  margin: 0 0.25rem;
}

.navbar-brand-elt {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3748;
  margin-left: 0.25rem;
}

.navbar-nav {
  display: flex;
  gap: 1rem;
  margin-right: 5rem;
}

.navbar-nav-item {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, #3a72ca 0%, #5c33a2 100%);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.navbar-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #5c33a2 0%, #3a72ca 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.navbar-nav-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.navbar-nav-item:hover::before {
  left: 0;
}

.navbar-nav-item:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

:root {
  /* Grid dimensions */
  --cell-size: 80px;
  --cell-gap: 0px;
  
  /* Interface colors */
  --primary-color: #3a72ca;
  --primary-hover: #2e60b3;
  --secondary-color: #5c33a2;
  --secondary-hover: #482787;
  --accent-color: #50c8c6;
  --accent-hover: #41a7a5;
  
  /* UI colors */
  --text-dark: #2d3748;
  --text-light: #e2e8f0;
  --text-muted: #718096;
  --background-main: #f8fafc;
  --card-bg: #ffffff;
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --divider-color: #edf2f7;
  
  /* Special cells */
  --highlight-color: rgba(92, 51, 162, 0.15);
  --active-color: #f9fafc;
  --start-color: #38a169;
  --finish-color: #e53e3e;
  
  /* Tile background colors - refined for premium look */
  --red-color: #F56565;
  --green-color: #68D391;
  --blue-color: #63B3ED;
  --yellow-color: #F6E05E;
  --orange-color: #ED8936;
  --brown-color: #8D6C63;
  --pink-color: #F687B3;
  --purple-color: #B794F4;
  --grey-color: #A0AEC0;
  --default-color: #EDF2F7;
  --cutty-sark-color: #5F9EA0;
  --lightning-yellow-color: #F6AD55;
  
  /* Text colors - vibrant for better readability */
  --text-red-color: #E53E3E;
  --text-green-color: #38A169;
  --text-blue-color: #3182CE;
  --text-yellow-color: #D69E2E;
  --text-orange-color: #DD6B20;
  --text-brown-color: #7B341E;
  --text-pink-color: #D53F8C;
  --text-purple-color: #805AD5;
  --text-grey-color: #4A5568;
  --text-silver-color: #A0AEC0;
  --text-white-color: #FFFFFF;
  --text-black-color: #1A202C;
  
  /* Highlight versions (transparent) */
  --red-highlight: rgba(245, 101, 101, 0.15);
  --green-highlight: rgba(104, 211, 145, 0.15);
  --blue-highlight: rgba(99, 179, 237, 0.15);
  --yellow-highlight: rgba(246, 224, 94, 0.15);
  --orange-highlight: rgba(237, 137, 54, 0.15);
  --brown-highlight: rgba(141, 108, 99, 0.15);
  --pink-highlight: rgba(246, 135, 179, 0.15);
  --purple-highlight: rgba(183, 148, 244, 0.15);
  --grey-highlight: rgba(160, 174, 192, 0.15);
  --default-highlight: rgba(237, 242, 247, 0.15);
  --cutty-sark-highlight: rgba(95, 158, 160, 0.15);
  --lightning-yellow-highlight: rgba(246, 173, 85, 0.15);
}

/* Base Styles */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e6f0ff 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0.5rem 0;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  position: relative;
}

h3::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  border-radius: 3px;
}

h4 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

/* Layout and Container Styles */
.page-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 1700px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background-color: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.info-box {
  width: 350px;
  background-color: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
  position: sticky;
  top: 2rem;
  transition: transform 0.3s ease;
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
}

.info-box:hover {
  transform: translateY(-5px);
}

.info-box h3 {
  text-align: center;
  color: var(--secondary-color);
  margin-top: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--divider-color);
  font-size: 1.5rem;
}

.info-box h3::after {
  display: none;
}

.info-box p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

.info-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem 0;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.info-box img:hover {
  transform: scale(1.02);
}

/* Common Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: rgba(237, 242, 247, 0.5);
  border-radius: 10px;
}

/* Ensure all buttons in the controls section are aligned */
.controls > button,
.controls > div > button,
.controls button#clear-grid,
.controls #save-grid {
  align-self: center;
  margin-top: 1rem;
}

.controls label {
  font-weight: 500;
  color: var(--text-dark);
}

.controls input {
  width: 60px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.controls input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 114, 202, 0.15);
}

.controls select {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  background-color: white;
  min-width: 240px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233a72ca' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.controls select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(58, 114, 202, 0.15);
}

/* Button Styles */
.controls button,
.submit-btn,
.print-button,
.special-button,
.back-link,
.download-button {
  padding: 0.75rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.controls button,
.submit-btn,
.print-button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.controls button::before,
.submit-btn::before,
.print-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  transition: left 0.3s ease;
  z-index: -1;
}

.controls button:hover::before,
.submit-btn:hover::before,
.print-button:hover::before {
  left: 0;
}

.controls button:hover,
.submit-btn:hover,
.print-button:hover,
.special-button:hover,
.back-link:hover,
.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.controls button:active,
.submit-btn:active,
.print-button:active,
.special-button:active,
.back-link:active,
.download-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.controls button:disabled {
  background: linear-gradient(135deg, #b3b3b3 0%, #8c8c8c 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.clear-btn {
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
}

.clear-btn::before {
  background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%) !important;
}

#save-grid {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  font-size: 1rem;
  padding: 0.85rem 2rem;
  margin-top: 1rem;
}

#save-grid::before {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* Grid Structure */
.grid-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  perspective: 1000px;
}

#grid, .result-grid {
  display: grid;
  grid-template-rows: repeat(var(--rows), var(--cell-size));
  grid-template-columns: repeat(var(--cols), var(--cell-size));
  gap: var(--cell-gap);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #e2e8f0;
  padding: 10px;
  transition: transform 0.5s ease;
}

/* Cell Styling */
.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.cell.active {
  background-color: var(--active-color);
  box-shadow: 0 0 0 2px var(--primary-color) inset, 0 3px 8px rgba(0, 0, 0, 0.1);
}

.cell.highlight {
  background-color: var(--highlight-color);
  box-shadow: 0 0 0 2px var(--accent-color) inset;
}

/* Special Cells */
.cell.start {
  background: linear-gradient(135deg, var(--start-color) 0%, #2f855a 100%);
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px #2f855a inset, 0 3px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

.cell.finish {
  background: linear-gradient(135deg, var(--finish-color) 0%, #c53030 100%);
  color: white;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 2px #c53030 inset, 0 3px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
}

/* Color Palettes */
.color-palette,
.text-color-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--divider-color);
}

.color-option,
.text-color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.text-color-option {
  font-weight: 700;
  font-size: 1rem;
}

.color-option:hover,
.text-color-option:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.color-option.selected,
.text-color-option.selected,
.special-button.active {
  border: 2px solid var(--text-dark);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
  transform: scale(1.1);
}

/* Cell Color Definitions */
.color-red, .cell.color-red { background-color: var(--red-color); }
.color-green, .cell.color-green { background-color: var(--green-color); }
.color-blue, .cell.color-blue { background-color: var(--blue-color); }
.color-yellow, .cell.color-yellow { background-color: var(--yellow-color); }
.color-orange, .cell.color-orange { background-color: var(--orange-color); }
.color-brown, .cell.color-brown { background-color: var(--brown-color); }
.color-pink, .cell.color-pink { background-color: var(--pink-color); }
.color-purple, .cell.color-purple { background-color: var(--purple-color); }
.color-grey, .cell.color-grey { background-color: var(--grey-color); }
.color-default, .cell.color-default { background-color: var(--default-color); }
.color-cutty-sark, .cell.color-cutty-sark { background-color: var(--cutty-sark-color); }
.color-lightning-yellow, .cell.color-lightning-yellow { background-color: var(--lightning-yellow-color); }

/* Cell Highlight Color Combinations */
.cell.highlight.color-red, .highlight-color-red .cell.highlight { background-color: var(--red-highlight); }
.cell.highlight.color-green, .highlight-color-green .cell.highlight { background-color: var(--green-highlight); }
.cell.highlight.color-blue, .highlight-color-blue .cell.highlight { background-color: var(--blue-highlight); }
.cell.highlight.color-yellow, .highlight-color-yellow .cell.highlight { background-color: var(--yellow-highlight); }
.cell.highlight.color-orange, .highlight-color-orange .cell.highlight { background-color: var(--orange-highlight); }
.cell.highlight.color-brown, .highlight-color-brown .cell.highlight { background-color: var(--brown-highlight); }
.cell.highlight.color-pink, .highlight-color-pink .cell.highlight { background-color: var(--pink-highlight); }
.cell.highlight.color-purple, .highlight-color-purple .cell.highlight { background-color: var(--purple-highlight); }
.cell.highlight.color-grey, .highlight-color-grey .cell.highlight { background-color: var(--grey-highlight); }
.cell.highlight.color-default, .highlight-color-default .cell.highlight { background-color: var(--default-highlight); }
.cell.highlight.color-cutty-sark, .highlight-color-cutty-sark .cell.highlight { background-color: var(--cutty-sark-highlight); }
.cell.highlight.color-lightning-yellow, .highlight-color-lightning-yellow .cell.highlight { background-color: var(--lightning-yellow-highlight); }

/* Start/Finish Buttons */
.start-finish-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

.special-button:hover {
  transform: translateY(-2px) scale(1.05);
}

.start-button {
  background: linear-gradient(135deg, var(--start-color) 0%, #2f855a 100%);
}

.finish-button {
  background: linear-gradient(135deg, var(--finish-color) 0%, #c53030 100%);
}

/* Validation Messages */
.validation-message {
  color: var(--finish-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  background-color: rgba(229, 62, 62, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--finish-color);
  border-right: 3px solid var(--finish-color);
  width: fit-content;
  max-width: 100%;
  display: block;
}

/* Warning Message */
.warning-message {
  color: var(--text-orange-color);
  font-style: italic;
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  background-color: rgba(237, 137, 54, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--text-orange-color);
  border-right: 3px solid var(--text-orange-color);
  width: 100%;
  max-width: 600px;
  display: block;
}

.hidden { display: none; }

/* Puzzle selector styling */
.puzzle-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

/* Step Progress Bar */
.stepper-container {
  display: flex;
  justify-content: center;
  margin: 0 auto 2rem;
  position: relative;
  width: 100%;
  max-width: 700px;
}

.stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 2px;
  width: 100%;
  background: #e2e8f0;
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 0.5rem;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border: 2px solid #f8fafc;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #718096;
  text-align: center;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Active step styling */
.step.active .step-dot {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: 0 3px 8px rgba(58, 114, 202, 0.3);
  transform: scale(1.15);
}

.step.active .step-label {
  color: var(--text-dark);
  font-weight: 600;
}

/* Completed step styling */
.step.completed .step-dot {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  color: transparent;
}

.step.completed .step-dot::after {
  content: '✓';
  position: absolute;
  font-weight: bold;
  color: white;
}

.step.completed .step-label {
  color: var(--text-dark);
}

/* Progress line between steps */
.progress-line {
  position: absolute;
  top: 15px;
  left: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-color), var(--primary-color));
  z-index: 1;
  transition: width 0.5s ease;
}

/* Footer Styles */
.footer {
  background-color: white;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 2rem;
  text-align: center;
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-nav-item {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
}

.footer-nav-item:hover {
  color: var(--primary-color);
}

.footer-nav-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.footer-nav-item:hover::after {
  width: 100%;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Styles */
@media screen and (max-width: 1024px) {
  .page-wrapper {
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }
  
  .info-box {
    width: 100%;
    max-width: 900px;
    margin-bottom: 2rem;
    position: static;
  }
  
  /* Keep right info box at the bottom on tablet/mobile */
  .team-info-box {
    order: 3;
  }
  
  .container {
    order: 2;
  }
  
  /* Make the grid container responsive */
  .grid-container {
    overflow-x: auto;
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  /* Navbar mobile styles */
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .navbar-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 99;
    padding: 5rem 2rem 2rem;
    margin: 0;
    gap: 1.5rem;
    align-items: center;
    overflow-y: auto;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }
  
  .navbar-nav.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
  
  /* Container adjustments */
  .container {
    padding: 1.5rem;
  }
  
  /* Stepper adjustments */
  .stepper-container {
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  
  .step-label {
    font-size: 0.7rem;
  }
  
  /* Controls adjustments */
  .controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .color-palette,
  .text-color-palette {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Footer adjustments */
  .footer-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
}

@media screen and (max-width: 480px) {
  /* Extra small screen adjustments */
  .navbar {
    padding: 0.75rem 0.5rem;
  }
  
  .navbar-brand-silver, .navbar-brand-elt {
    font-size: 1.4rem;
  }
  
  .navbar-brand-logo {
    height: 2rem;
  }
  
  .container {
    padding: 1rem;
    border-radius: 12px;
  }
  
  /* Make buttons bigger for touch */
  .controls button,
  .submit-btn,
  .print-button,
  .special-button,
  .back-link,
  .download-button {
    padding: 0.85rem 1rem;
    width: 100%;
    margin-top: 0.5rem;
  }
  
  /* Adjust cell size for mobile */
  :root {
    --cell-size: 60px;
  }
  
  /* Compact controls */
  .controls label, .controls input, .controls select {
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: center;
  }
  
  .controls select {
    padding: 0.75rem;
    min-width: unset;
    width: 100%;
  }
}

/* Additional styles for the static demo */
.demo-banner {
  background-color: rgba(229, 62, 62, 0.1);
  color: var(--finish-color);
  text-align: center;
  padding: 10px;
  font-weight: bold;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--finish-color);
}