/* main.css */

/* =========================
   ALAP HANGULAT / TÉMA
   ========================= */
:root{
  --bg1:#fcd59373;
  --bg2:#81530d;

  /* Üveg/soft kártyák */
  --glass: rgba(255,255,255,0.55);
  --glass2: rgba(255,255,255,0.38);

  /* Xilofon doboz: finom kékes–rózsaszínes (nem túl erős) */
  --boardA: rgba(185, 215, 255, 0.34);
  --boardB: rgba(255, 200, 225, 0.26);
  --boardC: rgba(255, 255, 255, 0.22);

  --shadow: rgba(0,0,0,0.12);
  --text:#1a1a1a;
  --muted: rgba(0,0,0,0.55);

  --gap: 14px;
  --radius: 22px;
}

.wrapper{
  max-width: 980px;
  max-height: 400px;   /* ⬅ EZ A KULCS */
  margin: 0 auto;
  padding: 12px 14px 14px;
  box-sizing: border-box;
}


/* =========================
   FEJLÉC: cím középen pill
   ========================= */
.game-header{
  display:flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.title-pill{
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: .4px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 16px 26px rgba(0,0,0,0.10);
}

.subtitle-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  color: rgba(0,0,0,0.62);
  background: rgba(255, 255, 255, 0.041);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 20px rgba(0,0,0,0.08);
  text-align: center;
}

/* =========================
   SONG BAR
   ========================= */
.songbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.songbtn,
.toolbtn,
.mode{
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(253, 225, 225, 0.78);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0,0,0,0.10);
  transition: transform .10s ease, filter .12s ease, box-shadow .12s ease;
}

.songbtn{ cursor:pointer; }
.toolbtn{ cursor:pointer; }

.songbtn:hover,
.toolbtn:hover,
.mode:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(0,0,0,0.12);
}
.songbtn:active,
.toolbtn:active{
  transform: translateY(1px);
}

.songbar-right{
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}

/* =========================
   LEESŐ KOTTA: ÜVEG/BLUR
   ========================= */
.lane-wrap{
  position: relative;
  height: 180px;         /* nagyobb tér */
  margin: 8px 0 10px;
  pointer-events: none;
}

.lane{
  position:absolute;
  inset:0;
  overflow:hidden;
  border-radius: 20px;

  /* üveg */
  background: rgba(244, 245, 247, 0.22);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 30px rgba(0,0,0,0.08);

  /* blur (glass) */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lane-line{
  position:absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 2px;
  border-radius: 2px;
  background: rgba(0,0,0,0.12);
}

.drop{
  position:absolute;
  top: -50px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  font-size: 30px;

  background: rgba(255,255,255,0.68);
  box-shadow: 0 16px 24px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.10);

  animation: fall var(--dur) linear forwards;
}

.drop .mini{
  position:absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 1000;
  color: rgba(0,0,0,0.55);
}

@keyframes fall{
  from{ transform: translateY(0); }
  to{ transform: translateY(300px); }
}

/* =========================
   XILOFON DOBOZ: finom kék/rózsaszín üveg
   ========================= */
.board{
  position: relative;

  background: linear-gradient(135deg, var(--boardA), var(--boardB), var(--boardC));
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: var(--radius);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.171);
  padding: 12px 14px 14px;
  margin-top: 12px;

  box-sizing: border-box;
}


/* diófa rúd marad “valós” */
.walnut-bar{
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.10) 0px,
      rgba(255,255,255,0.10) 2px,
      rgba(0,0,0,0.08) 8px,
      rgba(0,0,0,0.08) 12px
    ),
    linear-gradient(180deg, #4a2f1f 0%, #24150f 100%);
  box-shadow:
    0 10px 16px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.keys{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--gap);
  align-items: start;
}

/* =========================
   BILLENTYŰK
   ========================= */
.key{
  position: relative;
  width: 100%;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  padding: 10px 0 8px;

  background:
    linear-gradient(180deg, rgb(247, 22, 22), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, var(--k1), var(--k2));

  box-shadow:
    0 14px 18px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.13);

  transform-origin: center bottom;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;

  display: grid;
  grid-template-rows: auto 1fr;
  align-items: center;
  justify-items: center;
}

/* lyuk + zsinór */
.key::before{
  content:"";
  position:absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 2px 4px rgba(0,0,0,0.22);
}
.key::after{
  content:"";
  position:absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: rgba(122, 5, 5, 0.28);
  border-radius: 2px;
}

.key .note{
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: .6px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 4px rgba(0,0,0,0.35);
  line-height: 1;
  margin-top: 2px;
}

.key .icon{
  font-size: 56px;
  line-height: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.25));
}

.key:hover{
  transform: translateY(-6px) rotate(-1.2deg);
  filter: brightness(1.06) saturate(1.08);
  box-shadow:
    0 18px 22px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.30);
}

.key.playing{
  transform: translateY(-2px) rotate(0.8deg) scale(1.01);
  filter: brightness(1.10) saturate(1.12);
  box-shadow:
    0 20px 26px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.34);
}

.key:active{
  transform: translateY(2px) scale(0.99);
  filter: brightness(1.08) saturate(1.06);
  box-shadow:
    0 8px 12px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.20);
}

/* Billentyű-színek (később könnyű cserélni oldalanként) */
.key.c  { height: 220px; --k1:#ff6b6b; --k2:#e63946; }
.key.d  { height: 205px; --k1:#ff9f43; --k2:#f77f00; }
.key.e  { height: 190px; --k1:#ffe66d; --k2:#f2c94c; }
.key.f  { height: 175px; --k1:#7bed9f; --k2:#2ecc71; }
.key.g  { height: 160px; --k1:#70e1d3; --k2:#1abc9c; }
.key.a  { height: 145px; --k1:#74b9ff; --k2:#0984e3; }
.key.h  { height: 130px; --k1:#b197fc; --k2:#6c5ce7; }
.key.c2 { height: 115px; --k1:#ff9ff3; --k2:#e056fd; }

.kb-hint{
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.959);
  text-align: center;
}

/* =========================
   DICSÉRET OVERLAY
   ========================= */
.praise{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  place-items: center;
  z-index: 9999;
  padding: 18px;
}

.praise.is-open{ display: grid; }

.praise-card{
  position: relative;
  width: min(560px, 100%);
  border-radius: 26px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 30px 60px rgba(0,0,0,0.25);
  padding: 18px 18px 14px;
  overflow: hidden;
}

.praise-burst{
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,215,0,0.35), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(0,200,255,0.28), transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(255,0,180,0.22), transparent 45%);
  pointer-events:none;
}

.praise-head{
  position: relative;
  display:flex;
  gap: 12px;
  align-items:center;
}

.praise-avatar{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display:grid;
  place-items:center;
  font-size: 40px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 14px 20px rgba(0,0,0,0.10);
}

.praise-name{
  font-weight: 1000;
  font-size: 18px;
}

.praise-text{
  font-weight: 900;
  font-size: 18px;
  margin-top: 2px;
}

.praise-actions{
  position: relative;
  display:flex;
  justify-content:flex-end;
  margin-top: 12px;
}

.praise-btn{
  border: 0;
  cursor:pointer;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 1000;
  background: #111;
  color: #fff;
  box-shadow: 0 12px 22px rgba(0,0,0,0.18);
}
.praise-btn:active{ transform: translateY(1px); }

@media (max-width: 860px){
  .keys{ grid-template-columns: repeat(4, 1fr); }
  .key.c  { height: 165px; }
  .key.d  { height: 155px; }
  .key.e  { height: 145px; }
  .key.f  { height: 135px; }
  .key.g  { height: 125px; }
  .key.a  { height: 115px; }
  .key.h  { height: 105px; }
  .key.c2 { height: 95px; }
  .key .icon{ font-size: 48px; }

  .songbar-right{ margin-left: 0; width: 100%; justify-content: center; }
}
/* ===== PRAISE AVATAR SIZE FIX ===== */
.praise-avatar{
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px; /* ha szeretnéd kártyásan */
}

/* ha emoji marad */
.praise-avatar{
  font-size: 44px;     /* <-- ezt állítsd ízlés szerint (36-48 jó) */
  line-height: 1;
}

/* ha képet raksz be innerHTML-lel */
.praise-avatar img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* ===== SONG EMOJI BUTTONS ===== */
.songbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.songbtn {
  width: 56px;
  height: 56px;
  font-size: 32px;      /* <-- emoji MÉRET */
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(6px);

  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.songbtn:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.songbtn:active {
  transform: scale(0.95);
}
/* ===== NEON SONG BUTTONS ===== */

.songbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.songbtn {
  width: 60px;
  height: 60px;
  font-size: 34px;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.25);

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,0.25),
      rgba(255,255,255,0.05)
    );

  backdrop-filter: blur(8px);

  box-shadow:
    inset 0 0 0 rgba(255,255,255,0),
    0 4px 10px rgba(0,0,0,0.15);

  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

/* ✨ hover = neon glow */
.songbtn:hover {
  transform: translateY(-2px) scale(1.08);

  box-shadow:
    0 0 6px rgba(0,255,255,0.6),
    0 0 14px rgba(0,255,255,0.45),
    0 8px 18px rgba(0,0,0,0.25);

  background:
    linear-gradient(
      145deg,
      rgba(0,255,255,0.25),
      rgba(255,255,255,0.1)
    );
}

/* ✨ active = neon press */
.songbtn:active {
  transform: scale(0.90);

  box-shadow:
    0 0 4px rgba(0,255,255,0.6),
    0 0 10px rgba(0,255,255,0.35),
    inset 0 0 8px rgba(0,0,0,0.25);
}
.neon-blue:hover {
  box-shadow: 0 0 6px #4af, 0 0 16px #4af, 0 8px 18px rgba(0,0,0,0.25);
}

.neon-pink:hover {
  box-shadow: 0 0 6px #f4a, 0 0 16px #f4a, 0 8px 18px rgba(0,0,0,0.25);
}

.neon-green:hover {
  box-shadow: 0 0 6px #4f8, 0 0 16px #4f8, 0 8px 18px rgba(0,0,0,0.25);
}


