body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.lobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.code-block {
  display: flex;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.code-char {
  width: 72px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 44px;
  font-weight: 700;
  color: #f0f0f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  pointer-events: none;
}

.code-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 12px;
}

.start-btn {
  padding: 14px 52px;
  font-size: 15px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.14);
}

.start-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Image Selector List */
.image-grid {
  display: flex;
  flex-direction: column; 
  gap: 12px;
  margin: 5px 0 15px 0;
  max-width: 500px;
  max-height: 400px;
  overflow-y: auto; 
  /* We removed overflow-x: hidden; so the shadows don't get sliced off */
  /* Added padding to give the hover scale and 40px shadow room to breathe */
  padding: 10px 20px 20px 20px; 
  box-sizing: border-box; 
}

.canvas-option img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 20px;
  flex-shrink: 0; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
  /* NEW: Establish a base layer so z-index works on hover */
  position: relative; 
  z-index: 1; 
  
  /* NEW: Optional - makes the image scale to the right instead of overlapping the left edge */
  transform-origin: center left; 
}

.canvas-option img:hover {
  transform: scale(1.25); /* Bumped it to 1.25 to make the effect slightly more noticeable! */
  
  /* NEW: Forces the hovered image to pop OVER the text and other rows */
  z-index: 10; 
}
.canvas-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  background-color: #2a2a2a;
  color: #fff;
  transition: border-color 0.1s ease;
  text-align: left;
  box-sizing: border-box;
  /* Ensure padding doesn't push width out of bounds */
  width: 100%;
}

.canvas-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.2;
}

.canvas-option.selected {
  border-color: #00ff88;
  background-color: #1a1a1a;
}

/* 3-Column Interactive Section - Neutral & Readable */
.lobby-interactive-section {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 40px; /* Increased gap to accommodate larger panels */
  width: 100%;
  max-width: 1400px; /* Widened to let the bigger text fit nicely */
  padding: 0 20px;
  box-sizing: border-box;
  font-family: 'Syne', sans-serif; /* Cleaner, more modern font */
}

/* The side instruction panels */
.instruction-side {
  flex: 1; 
  max-width: 420px; /* Allowed to be wider for bigger text */
  background: rgba(255, 255, 255, 0.05); /* A subtle, neutral grey transparency */
  border: 1px solid rgba(255, 255, 255, 0.15); /* Clean, simple border */
  border-radius: 12px;
  padding: 30px; /* More breathing room */
  box-sizing: border-box;
  font-size: 18px; /* Significantly larger text for distance reading */
  color: #eaeaea; /* Soft neutral white */
  line-height: 1.6;
}

.canvas-center {
  flex: 0 0 auto; 
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-center h3 {
  margin-top: 0;
  margin-bottom: 0;
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 24px; /* Larger header */
  font-weight: 400; /* Less aggressive font weight */
  color: #ffffff;
}

/* Standard Header Styling */
.lang-title {
  margin: 0 0 20px 0;
  font-size: 20px; /* Larger language titles */
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff; 
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Clean separator line */
  padding-bottom: 15px;
}

.instruction-side ul {
  margin: 0;
  padding-left: 20px; /* Slightly more indent for bigger bullets */
  list-style-type: disc; /* Standard neutral circles instead of squares */
}

.instruction-side li {
  margin-bottom: 20px; 
  color: rgba(255, 255, 255, 0.85);
  
  /* NEW: Force the line-height directly on the text itself */
  line-height: 1.8; 
  
  /* Optional: If it still looks cut off, padding-bottom can give the last line extra room */
  padding-bottom: 2px; 
}


.instruction-side strong {
  color: #ffffff;
  font-weight: 700;
}

/* Mobile & Tablet Responsiveness */
/* Triggered earlier (1024px) because the text and panels are wider now */
@media (max-width: 1024px) {
  .lobby-interactive-section {
    flex-direction: column;
    align-items: center;
  }
  
  .instruction-side {
    max-width: 600px; /* Let panels expand on a vertical layout */
    width: 100%;
    margin-bottom: 30px; 
  }

  /* Force the Canvas to sit at the top on mobile */
  .canvas-center {
    order: -1; 
    margin-bottom: 40px;
  }
}