/* main.css — The Tikee Music Game (match your reference image) */

html, body{
  margin: 0;
  padding: 0;
  background:#000;
  color:#fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

/* ===== TOP BAR ===== */
.topbar{
  height: 108px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  background: #000;
  border-bottom: 2px solid #111;
}

.brand-title{
  font-family: Impact, Haettenschweiler, "Arial Black", "Franklin Gothic Heavy", sans-serif;
  font-size: 30px;
  letter-spacing: 0.5px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.topbar-center{
  display:flex;
  justify-content:center;
  align-items:center;
}

.lives{
  display:flex;
  gap: 14px;
  font-size: 38px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  user-select: none;
}

.topbar-right{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

/* START button like image */
.start-btn{
  background: #16e000;
  color: #000;
  border: none;
  padding: 18px 42px;
  border-radius: 999px;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 44px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0,0,0,0.55),
    inset 0 -6px 0 rgba(0,0,0,0.25);
}

.start-btn:active{
  transform: translateY(1px);
  box-shadow:
    0 8px 18px rgba(0,0,0,0.55),
    inset 0 -3px 0 rgba(0,0,0,0.25);
}

/* ===== LAYOUT ===== */
.game-wrap{
  min-height: calc(100vh - 108px);
  min-height: calc(100svh - 108px);
  min-height: calc(100dvh - 108px);
  display: flex;
  flex-direction: column;
}

/* ===== STAFF (BIG WHITE PANEL) ===== */
.staff-wrap{
  padding: 12px 0 0 0;
}

.staff-panel{
  width: 100%;
  background: #fff;
  border-top: 6px solid #000;
  border-bottom: 6px solid #000;
}

/* canvas should fill the white panel */
#staffCanvas{
  display:block;
  width: 100%;
  height: 430px;         /* big like image */
}

/* ===== BOTTOM AREA ===== */
.bottom-wrap{
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  gap: 24px;
  padding: 16px 24px 24px 24px;

  /* iPhone safe area */
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

/* HUD left/right */
.hud{
  height: 240px;
  display:flex;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  background: #000;
}

.hud-label{
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 64px;
  line-height: 1;
  margin-bottom: 18px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.hud-value{
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 86px;
  line-height: 1;
  color: #16e000; /* neon green */
  text-shadow: 0 2px 14px rgba(22,224,0,0.25);
}

/* KEYBOARD FRAME (center) */
.keyboard-frame{
  height: 240px;
  background: #000;
  display:flex;
  align-items:center;
  justify-content:center;
}

.piano-keys{
  width: min(900px, 92vw);
  height: 220px;
  background: #111;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.65);
  border: 2px solid #1a1a1a;
  display:flex;
  padding: 12px;
  gap: 10px;
}

/* Simple clickable keys (JS can replace with your image later) */
.key{
  flex:1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding-bottom: 10px;
  user-select:none;
}

.key.white{
  background: linear-gradient(#f5f5f5, #cfcfcf);
  color:#111;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,0.18);
}

.key.white:active{
  transform: translateY(1px);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.18);
}

/* ===== HINT (small line like your prototype, optional) ===== */
.hint{
  text-align:center;
  font-size: 12px;
  opacity: 0.55;
  padding: 0 14px 14px 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px){
  .brand-title{ font-size: 44px; }
  .start-btn{ font-size: 38px; padding: 16px 36px; }
  .lives{ font-size: 32px; gap: 10px; }
  #staffCanvas{ height: 360px; }
  .hud-label{ font-size: 54px; }
  .hud-value{ font-size: 74px; }
  .bottom-wrap{ grid-template-columns: 200px 1fr 200px; }
}

@media (max-width: 680px){
  .topbar{
    height: 92px;
    padding: 0 16px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title start"
      "hearts hearts";
    row-gap: 8px;
  }

  .topbar-left{ grid-area: title; }
  .topbar-center{ grid-area: hearts; }
  .topbar-right{ grid-area: start; }

  .brand-title{ font-size: 34px; }
  .start-btn{ font-size: 30px; padding: 12px 24px; }
  .lives{ font-size: 28px; }

  #staffCanvas{ height: 320px; }

  .bottom-wrap{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px 18px 14px;
  }

  .hud{
    height: auto;
    flex-direction: row;
    gap: 16px;
    justify-content: space-between;
    padding: 8px 10px;
  }

  .hud-label{ font-size: 34px; margin: 0; }
  .hud-value{ font-size: 44px; }

  .keyboard-frame{ height: auto; }
  .piano-keys{ height: 160px; }
}

