@media print {
  body { margin: 0; padding: 0; }
  .footer { display: none !important; }
  .a4-page { box-shadow: none !important; padding: 10mm !important; margin: 0 !important; width: 210mm !important; height: 297mm !important; }
  .bingo-grid { gap: 2px !important; }
  .bingo-cell { border: 2px solid #555 !important; break-inside: avoid; }
  .bingo-cell:hover { transform: none !important; }
  .cell-photo img { max-height: 100px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #e8f5e9;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.a4-page {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  padding: 10mm 12mm;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 5mm;
}

.header h1 {
  font-size: 26px;
  color: #2e7d32;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.header .subtitle {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  flex: 1;
}

.bingo-cell {
  border: 2.5px solid #a5d6a7;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: #fff;
  user-select: none;
  overflow: hidden;
}

.bingo-cell:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(46,125,50,0.15);
}

.bingo-cell.checked {
  background: #e8f5e9;
}

.bingo-cell.checked::after {
  content: '\2714';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 24px;
  color: #2e7d32;
  font-weight: bold;
  text-shadow: 0 0 4px #fff, 0 0 8px #fff;
  z-index: 2;
}

.cell-photo {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.cell-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  max-height: 130px;
}

.cell-label {
  font-size: 12px;
  font-weight: 600;
  color: #2e7d32;
  text-align: center;
  margin-top: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 6mm;
  padding-bottom: 4mm;
}

.footer button {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-shuffle {
  background: #a5d6a7;
  color: #1b5e20;
}
.btn-shuffle:hover {
  background: #81c784;
}

.btn-print {
  background: #2e7d32;
  color: #fff;
}
.btn-print:hover {
  background: #1b5e20;
}
