body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a);
  color: #ffffff;
}

/* ===== Header ===== */
.labs-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.labs-logo {
  width: 144px;
}

.labs-title-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 600;
}

.labs-subtitle-text {
  margin-top: 6px;
  font-size: 24px;
  opacity: 0.9;
}

/* ===== Main Layout ===== */
.main-layout {
  display: flex;
  flex-direction: column;     /* STACK VERTICALLY */
  align-items: center;        /* CENTER EVERYTHING */
  padding: 40px 20px;
}

/* ===== Instruction Box ===== */
.instruction-box {
  width: 420px;               /* same width as game */
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 22px 24px;
}

.instruction-box h3 {
  margin-top: 0;
  font-size: 22px;
}

.instruction-box p {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
}

/* ===== Vertical spacing ===== */
.vertical-gap {
  height: 24px;   /* one gap */
}

/* ===== Game Area ===== */
.game-area {
  width: 420px;
  text-align: center;
}

h1 {
  font-size: 36px;
  margin-top: 0;
}

#instruction {
  font-size: 22px;
  margin-bottom: 24px;
}

/* ===== Grid ===== */
#grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.cell {
  background: #1e293b;
  padding: 18px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: bold;
}

/* ===== Buttons ===== */
#buttons button,
#playAgain {
  margin: 8px;
  padding: 14px 24px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #2563eb;
  color: white;
}

#buttons button:hover,
#playAgain:hover {
  background: #1d4ed8;
}

#roundInfo {
  font-size: 18px;
  margin-top: 12px;
  opacity: 0.9;
}

/* ===== Reveal Card ===== */
.reveal-card {
  padding: 48px 32px;
  background: #22c55e;
  color: #022c22;
  border-radius: 18px;
  font-size: 44px;
  line-height: 1.25;
  animation: magicReveal 0.8s ease-out forwards;
}

@keyframes magicReveal {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== Footer ===== */
.labs-footer {
  text-align: center;
  padding: 18px;
  font-size: 15px;
  opacity: 0.6;
  border-top: 1px solid rgba(255,255,255,0.08);
}
