/* ===== Home CSS ===== */

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.player-name,
.app-name {
    position: relative;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
}

.title,
.app .subtitle {
    position: relative;
    display: inline-block;
    padding: 6px 16px;
}

.title::before,
.app .subtitle::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: -1;
}



/* GAME TILES */

.home-tile {
    position: relative;
    min-height: 120px;
    padding: 54px 12px 14px;
    border-radius: 22px;
    font-size: clamp(14px, 3.8vw, 18px);
    font-weight: 800;
    line-height: 1.15;
    color: #111827;
    text-decoration: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.15);
    transition: transform .15s ease, box-shadow .15s ease;
}

.home-tile.run-game{
  background: linear-gradient(135deg,#6ae3ff,#a7f3d0,#fde68a);
  box-shadow:
    0 14px 32px rgba(16,185,129,0.35),
    inset 0 0 0 2px rgba(255,255,255,0.7);
}

.home-tile.run-game::before{
  content:"🏃‍♂️";
  font-size:42px;
}

.home-tile.run-game::after{
  content:"NEW";
  position:absolute;
  top:10px;
  left:10px;
  padding:6px 10px;
  font-size:11px;
  font-weight:900;
  border-radius:999px;
  background:linear-gradient(135deg,#fb7185,#f472b6);
  color:#fff;
  box-shadow:0 6px 14px rgba(236,72,153,0.45);
}

.home-tile::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
}

.home-tile:active {
    transform: scale(0.96);
}

.home-tile:hover {
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.2);
}

/* COLORS + ICONS */

.home-tile.pink {
    background: linear-gradient(135deg, #ff9acb, #ffd1eb);
}

.home-tile.pink::before {
    content: "🧠";
}

.home-tile.wordmatch {
    background: linear-gradient(135deg, #a7f3d0, #ecfeff);
}

.home-tile.wordmatch::before {
    content: "🔗";
}

.home-tile.storybook {
    background: linear-gradient(135deg, #fbcfe8, #ddd6fe, #bfdbfe);
}

.home-tile.storybook::before {
    content: "📚";
}
.home-tile.translationChoise {
    background: linear-gradient(135deg, #fde68a, #fca5a5, #fdba74);
}

.home-tile.translationChoise::before {
    content: "📝";
}


.home-tile.green {
    background: linear-gradient(135deg, #86efac, #dcfce7);
}

.home-tile.green::before {
    content: "✏️";
}

.home-tile.blue {
    background: linear-gradient(135deg, #93c5fd, #e0f2fe);
}

.home-tile.blue::before {
    content: "📘";
}

.home-tile.translation {
    background: linear-gradient(135deg, #646496, #ecfeff);
}

.home-tile.translation::before {
    content: "🌍";
}

.home-tile.purple {
    background: linear-gradient(135deg, #d8b4fe, #f3e8ff);
}

.home-tile.purple::before {
    content: "📖";
}

.home-tile.yellow {
    background: linear-gradient(135deg, #fde047, #fff7cc);
}

.home-tile.yellow::before {
    content: "📝";
}

/* COMING SOON */

.home-tile.yellow {
    pointer-events: none;
    opacity: 0.6;
}



.home-tile.yellow::after {
    content: "Coming soon";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.btn-start {
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-start.is-ready {
    background: linear-gradient(135deg, #f472b6, #fb7185);
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
    animation: pulseBtn 1.6s ease-in-out infinite;
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}


/* RESET SCORE */

.home-tile.gray {
    grid-column: 1 / -1;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    background: #f8fafc;
    color: #374151;
    box-shadow: inset 0 0 0 2px #e5e7eb;
    border-radius: 14px;
    align-items: center;
}



.home-tile.gray::before {
    content: "🧹";
    position: static;
    transform: none;
    margin-right: 6px;
    font-size: 18px;
}

.home-tile.change-name::before {
    font-size: 18px;
}


.home-tile.gray:hover {
    box-shadow: none;
}

/* ===== TITLE MAGIC ===== */
.title {
    position: relative;
    font-size: 40px;
    font-weight: 900;
    color: #ec4899;
    background: none;
    -webkit-text-fill-color: unset;
    animation: none;
    z-index: 1;
    text-shadow:
        0 2px 0 #ffffff,
        0 6px 14px rgba(0, 0, 0, 0.25);
}

.title {
    text-shadow:
        -2px -2px 0 #ffffff,
        2px -2px 0 #ffffff,
        -2px 2px 0 #ffffff,
        2px 2px 0 #ffffff,
        0px 3px 10px rgba(0, 0, 0, 0.35);
}


@keyframes titleColorDance {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}


.title::before {
    z-index: -1;
}



@keyframes titleGlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.title::after {
    content: "✨ ⭐ 💖 ⭐ ✨";
    display: block;
    font-size: 16px;
    margin-top: 6px;
}

/* ===== SUBTITLE REPLACE ===== */
.app .subtitle {
    position: relative;
    margin: 6px 0 18px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    color: #1f2937;
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
    text-shadow:
        0 1px 0 #fff,
        0 2px 6px rgba(0, 0, 0, 0.25);
}



.app .subtitle:empty::after {
    content: "Pick your magic game!";
    position: relative;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 105, 180, 0.18), rgba(147, 197, 253, 0.18), rgba(134, 239, 172, 0.18));
    color: #374151;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin: 0 auto;
}




/* ===== SCORE BOX ===== */

.card {
    position: relative;
}

.card::before {
    content: "";
    display: none;
}



.home-score {
    position: relative;
    margin: 10px auto 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 900;
    color: #be185d;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.home-tile.change-name {
    background: #fffaf0;
    color: #9a3412;
    box-shadow: inset 0 0 0 2px #fed7aa;
}


.home-tile.change-name::before {
    content: "✏️";
}

.kid-select {
    width: 100%;
    margin: 6px 0 22px;
    padding: 16px 48px 16px 18px;
    font-size: 18px;
    font-weight: 900;
    border-radius: 20px;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #fff0f6, #eef2ff);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><polygon points='6,9 12,15 18,9' fill='%236b7280'/></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 18px;
    color: #1f2937;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
    appearance: none;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.kid-select:active {
    transform: scale(0.97);
}

.kid-select:focus {
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.35);
}

.kid-select:hover {
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}


.kid-select option {
    font-weight: 700;
}

.grade-label {
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
}

.grade-label {
    margin: 16px 0 8px;
    font-weight: 700;
}

.grade-pick {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 18px;
}

.grade-btn {
    padding: 12px 20px;
    border-radius: 20px;
    border: 2px solid #f9a8d4;
    background: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.grade-btn:active {
    transform: scale(0.95);
}

.grade-btn.is-active {
    background: linear-gradient(135deg, #f9a8d4, #f472b6);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.home-sound {
    position: absolute;
    top: 14px;
    left: 14px;
}

.name-hint {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px dashed rgba(236, 72, 153, 0.35);
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    display: none;
}

.name-hint.show {
    display: inline-block;
}

@keyframes hintPop {
    0% {
        transform: scale(0.98);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.name-hint.show {
    animation: hintPop 160ms ease-out;
}

@keyframes inputShake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    50% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-4px);
    }

    100% {
        transform: translateX(0);
    }
}

#nameInput.shake {
    animation: inputShake 300ms ease;
    border-color: #ec4899;
}

.home-coins {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
    font-weight: 900;
}

.home-coins span {
    direction: ltr;
}

.coin-pop {
    animation: coinJump 420ms ease-out;
}

@keyframes coinJump {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.25) rotate(-6deg);
    }

    70% {
        transform: scale(0.95) rotate(4deg);
    }

    100% {
        transform: scale(1);
    }
}

.legal-mini {
    display: block;
    margin-top: 12px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0.5;
    text-align: center;
}

.legal-mini a {
    color: inherit;
    text-decoration: none;
}

.legal-mini a:hover {
    text-decoration: underline;
}

/* ===== WORDS MODE (PARENTS) ===== */

.words-mode {
    margin: 12px auto 18px;
    padding: 10px 14px;
    max-width: 320px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    font-weight: 800;
    color: #9a3412;
}

.words-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.words-mode-toggle input {
    appearance: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #e5e7eb;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.words-mode-toggle input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.words-mode-toggle input:checked {
    background: linear-gradient(135deg, #fb7185, #f472b6);
}

.words-mode-toggle input:checked::after {
    transform: translateX(16px);
}

/*.words-mode{
  display:none;
}*/


/* ===== Magical Leaderboard Button ===== */
#showLeaderboardBtn {
    position: relative;
    margin: 12px auto;
    display: block;
    padding: 14px 24px;
    font-size: 18px;
    font-weight: 900;
    border-radius: 24px;
    border: none;
    background: linear-gradient(135deg, #ff9acb, #ffd1eb);
    color: #fff;
    text-shadow: 0 0 6px #fff;
    box-shadow: 0 8px 28px rgba(255, 105, 180, 0.6);
    cursor: pointer;
    animation: pulseBtn 1.6s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    text-align: center;
    z-index: 10;
}

#showLeaderboardBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 32px rgba(255, 105, 180, 0.8);
    background: linear-gradient(135deg, #ffd1eb, #ff9acb);
}

#showLeaderboardBtn:active {
    transform: scale(0.95);
    box-shadow: 0 6px 18px rgba(255, 105, 180, 0.5);
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== Magical Leaderboard Button ===== */
.leaderboard-btn {
    display: block;
    margin: 0 auto 24px auto;
    /* באמצע, מעל הכרטיס */
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 900;
    border-radius: 32px;
    border: none;
    background: linear-gradient(135deg, #ff9acb, #ffd1eb);
    color: #fff;
    text-shadow: 0 0 6px #fff;
    box-shadow: 0 12px 32px rgba(255, 105, 180, 0.7);
    cursor: pointer;
    animation: pulseBtn 1.6s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 10;
}

.leaderboard-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 18px 40px rgba(255, 105, 180, 0.8);
    background: linear-gradient(135deg, #ffd1eb, #ff9acb);
}

.leaderboard-btn:active {
    transform: scale(0.95);
    box-shadow: 0 6px 18px rgba(255, 105, 180, 0.5);
}

@keyframes pulseBtn {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

#homeScreen {
    position: relative;
    z-index: 1;
}

.home-score span {
    direction: ltr;
    min-width: 24px;
    text-align: center;
}

.home-score::before,
.home-score::after {
    content: "";
}

.home-score span {
    transition: transform 0.2s ease;
}

.home-score span.pop {
    transform: scale(1.3);
}


.player-name {
    display: block;
    font-size: 42px;
    font-weight: 900;
    color: #ec4899;
    -webkit-text-fill-color: unset;
}

.app-name {
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin-top: 4px;
    color: #6b7280;
}

.home-score {
    perspective: 600px;
}




@keyframes floatSpinDiamond {
    0% {
        transform: translateY(0) rotateY(0deg) scale(1);
    }

    50% {
        transform: translateY(-5px) rotateY(180deg) scale(1.05);
    }

    100% {
        transform: translateY(0) rotateY(360deg) scale(1);
    }
}

@keyframes floatSpinCoin {
    0% {
        transform: rotateZ(0deg);
    }

    100% {
        transform: rotateZ(360deg);
    }
}

.score-icon {
    display: inline-block;
    transform-style: preserve-3d;
}

.score-icon.diamond {
    animation: floatSpinDiamond 4s ease-in-out infinite;
}

.score-icon.coin {
    animation: floatSpinCoin 3s linear infinite;
}

.lang-quest {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.lang-quest-title {
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
    font-size: 16px;
    color: #2b1c50;
}

.lang-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lang-card {
    border-radius: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.lang-label {
    font-weight: 900;
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-align: center;
}

.lang-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.lang-pill {
    border: 2px solid rgba(255, 105, 180, 0.45);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    padding: 8px 10px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
    min-width: 84px;
    text-align: center;
}

.lang-pill:active {
    transform: scale(0.98);
}

.lang-pill.is-active {
    border-color: rgba(255, 105, 180, 0.95);
    filter: drop-shadow(0 6px 10px rgba(255, 105, 180, 0.25));
}

.lang-hint {
    margin-top: 10px;
    text-align: center;
    font-weight: 800;
    font-size: 12px;
    opacity: 0.85;
}

/* ===== Language selection visual separation ===== */

.lang-card:first-child {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    border: 2px solid #38bdf8;
}

.lang-card:last-child {
    background: linear-gradient(135deg, #fce7f3, #fff1f2);
    border: 2px solid #fb7185;
}

.lang-card:first-child .lang-label::before {
    content: "🧠 ";
}

.lang-card:last-child .lang-label::before {
    content: "🎯 ";
}

.lang-card:first-child .lang-pill.is-active {
    background: #38bdf8;
    color: #fff;
    border-color: #0284c7;
}

.lang-card:last-child .lang-pill.is-active {
    background: #fb7185;
    color: #fff;
    border-color: #be123c;


}

.extra-langs-aux {
  margin: 8px 0 4px;
  text-align: center;
}

.extra-langs-aux .extra-langs-inline {
  display: inline-flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #7c3aed;
  opacity: 0.85;
  cursor: pointer;
  user-select: none;
}


.extra-langs-aux input[type="checkbox"] {
  margin: 0;
  transform: scale(0.95);
  accent-color: #a855f7;
}



.extra-langs-aux .extra-langs-inline::after {
    content: "✨";
    font-size: 12px;
    opacity: 0.6;
}.back-mini-btn {
    background: #ffe4f1;
    border: 2px solid #ff8fc7;
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #c2187a;
    box-shadow: 0 3px 8px rgba(255, 143, 199, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.back-mini-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(255, 143, 199, 0.45);
}

.back-mini-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 143, 199, 0.35);
}

.back-mini-cta {
    font-size: 10px;
    color: #ff5fa2;
}

.back-mini-text {
    font-size: 12px;
    font-weight: 600;
}
/* ===== SPECIAL BINGO TILE ===== */

.home-tile[href*="bingo-listening"] {
    background: linear-gradient(135deg, #f472b6, #a855f7, #22d3ee);
    box-shadow:
        0 18px 36px rgba(168,85,247,0.45),
        inset 0 0 0 3px rgba(255,255,255,0.75);
    color: #fff;
}

.home-tile[href*="bingo-listening"]::before {
    content: "🎧";
    font-size: 44px;
}



/* ===== SPECIAL WORD MATCH TILE ===== */

.home-tile.wordmatch {
    background: linear-gradient(135deg, #34d399, #22c55e, #86efac);
    box-shadow:
        0 16px 34px rgba(34,197,94,0.45),
        inset 0 0 0 3px rgba(255,255,255,0.75);
    color: #065f46;
}

.home-tile.wordmatch::before {
    content: "🧩";
    font-size: 44px;
}


.my-stuff-link{
  margin-left: 10px;
  padding: 6px 12px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 900;
  text-decoration: none;

  color: #4a2a10;
  background: linear-gradient(180deg,#fff7dc,#ffe29a);

  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.9),
    0 4px 10px rgba(0,0,0,0.25);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.my-stuff-link:hover{
  transform: translateY(-2px) scale(1.05);
  filter: saturate(1.15);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.9),
    0 8px 16px rgba(0,0,0,0.3);
}

.my-stuff-link:active{
  transform: translateY(1px) scale(0.96);
}
/* ===== TREASURES TILE (MY COLLECTION) - LEGEND MODE ===== */
/* ===== TREASURES TILE (MY COLLECTION) - STORY CARD ===== */

.home-tile.treasures{
  grid-column: 1 / -1;
  min-height: clamp(120px, 24vw, 160px);
  padding: 18px 16px 16px;

  color: #2b1407;
  font-weight: 900;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)),
    url("../img/shop/my_product.webp") center / cover no-repeat;

  border-radius: 24px;

  box-shadow:
    0 18px 44px rgba(0,0,0,0.32),
    inset 0 0 0 2px rgba(255,255,255,0.75);

  overflow: hidden;
  position: relative;

  animation: collectionFloat 3.2s ease-in-out infinite;
}

.home-tile.treasures > span,
.home-tile.treasures > div{
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,0.72);
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.9),
    0 2px 3px rgba(0,0,0,0.22);
  font-size: clamp(16px, 4vw, 20px);
}




.shop-gate{
  grid-column: 1 / -1;
  min-height: clamp(120px, 24vw, 160px);
  padding: 18px 16px 16px;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  border-radius: 24px;
  position: relative;
  overflow: hidden;

  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)),
    url("../img/shop/shop_btn.webp") center / cover no-repeat;

  box-shadow:
    0 18px 44px rgba(0,0,0,0.32),
    inset 0 0 0 2px rgba(255,255,255,0.75);

  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}


.shop-gate:hover{
  transform: translateY(-4px) scale(1.03);
}

.shop-gate:active{
  transform: scale(0.97);
}


.shop-gate-inner{
  position: relative;
  z-index: 2;

  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}


.shop-gate-title{
  background: rgba(255,255,255,0.72);
  padding: 10px 18px;
  border-radius: 999px;

  font-size: clamp(16px, 4vw, 20px);
  font-weight: 900;
  color: #2b1407;

  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.9),
    0 2px 3px rgba(0,0,0,0.22);
}

.magic-sound-btn{
  position: absolute;
  top: 10px;
  right: 10px;

  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;

  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.6)),
    linear-gradient(135deg, #fbcfe8, #e0e7ff);

  box-shadow:
    0 6px 14px rgba(0,0,0,0.18),
    inset 0 2px 4px rgba(255,255,255,0.8);

  cursor: pointer;
  opacity: 0.65;

  transition:
    transform 120ms ease,
    opacity 120ms ease,
    box-shadow 120ms ease;
}

.magic-sound-btn::before{
  content: "✨";
  font-size: 16px;
}
.magic-sound-btn{
  z-index: 50;
  pointer-events: auto;
}

.magic-sound-btn:hover{
  opacity: 0.9;
  transform: scale(1.08);
}
.magic-sound-btn.is-off{
  opacity: 0.3;
  filter: grayscale(1);
}

.magic-sound-btn.is-off::before{
  content: "🔇";
}

.magic-sound-btn:active{
  transform: scale(0.95);
  box-shadow:
    0 3px 8px rgba(0,0,0,0.2),
    inset 0 1px 3px rgba(255,255,255,0.7);
}

.shop-gate-sub{
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  opacity: 0.9;
}



.home-tile.treasures::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 24px;

  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.55), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(255,220,255,0.45), transparent 48%);

  opacity: 0.85;
  pointer-events:none;
}

.home-tile.treasures::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 24px;

  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.02));

  opacity: 0.45;
  pointer-events:none;
}

.home-tile.treasures:hover{
  transform: translateY(-4px) scale(1.03);
}

.home-tile.treasures:active{
  transform: scale(0.97);
  animation: none;
}

@keyframes collectionFloat{
  0%{ transform: translateY(0) }
  50%{ transform: translateY(-5px) }
  100%{ transform: translateY(0) }
}
.home-tile.space-translate{
  background: linear-gradient(135deg,#a78bfa,#60a5fa,#f472b6);
  box-shadow:
    0 16px 34px rgba(99,102,241,0.35),
    inset 0 0 0 3px rgba(255,255,255,0.75);
  color:#1f2937;
}

.home-tile.space-translate::before{
  content:"🚀";
  font-size:44px;
}

.home-tile.word-path{
  background: linear-gradient(135deg, #fde68a, #86efac, #93c5fd);
  box-shadow:
    0 16px 36px rgba(34,197,94,0.35),
    inset 0 0 0 3px rgba(255,255,255,0.75);
  color: #1f2937;
  position: relative;
}

.home-tile.word-path::before{
  content: "🐻";
  font-size: 42px;
}

.home-tile.word-path::after{
  content: "NEW";
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #22c55e);
  color: #fff;
  box-shadow: 0 6px 14px rgba(16,185,129,0.45);
}
.home-words-frame{
    margin: 18px 0 22px;
    padding: 12px 12px 14px;
    border-radius: 24px;
    background: rgba(255,255,255,0.55);
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
    position: relative;
    overflow: hidden;
}

.home-words-frame::before{
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,154,203,0.16), rgba(255,154,203,0.00) 55%),
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.65), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255,200,220,0.18), transparent 55%);
    pointer-events: none;
}




.parent-tool-btn {
  display: block;
  margin: 28px auto 12px;
  max-width: 360px;
  padding: 18px 22px;
  border-radius: 22px;

  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;

  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
  text-align: center;
  text-decoration: none;

  box-shadow:
    0 14px 30px rgba(99,102,241,0.45),
    inset 0 1px 0 rgba(255,255,255,0.25);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.parent-tool-btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.1);
  box-shadow:
    0 18px 38px rgba(99,102,241,0.55),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

.parent-tool-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 10px 22px rgba(99,102,241,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
}









.home-words-frame::after{
    content: "";
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,154,203,0.55), rgba(167,243,208,0.45), rgba(147,197,253,0.45));
    pointer-events: none;
    opacity: 0.9;
}

.home-words-frame .home-grid{
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.home-words-frame .words-mode{
    margin: 0 auto 8px;
    position: relative;
    z-index: 1;
}
.player-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-inline-end: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.avatar-option {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255,255,255,0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.avatar-option:hover {
    transform: scale(1.08);
}

.avatar-option.selected {
    box-shadow: 0 0 0 3px #ff69b4;
    background: #fff;
}
/* ===== BIG AVATAR PICK ON HOME ===== */

.avatar-picker {
    justify-content: flex-start;
    gap: 18px;
    padding-inline: 24px;
}


.avatar-option {
    width: 96px;
    height: 96px;
    border-radius: 50%;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.avatar-option.selected {
    box-shadow: 0 0 0 4px #ff69b4, 0 10px 24px rgba(0,0,0,0.25);
    transform: scale(1.05);
}
.avatar-picker {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.avatar-option {
    flex: 0 0 auto;
    scroll-snap-align: center;
}
/* ===== AVATAR STEP TITLE ===== */

.avatar-title{
    margin: 6px auto 14px;
    text-align: center;

    font-size: clamp(22px, 5vw, 28px);
    font-weight: 900;
    color: #ec4899 !important;
    text-shadow:
        0 1px 0 #ffffff,
        0 3px 8px rgba(0,0,0,0.25) !important;


    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;

    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.7) 55%),
        linear-gradient(135deg, #ffe4f1, #fce7f3);

    box-shadow:
        0 10px 24px rgba(236,72,153,0.35),
        inset 0 2px 4px rgba(255,255,255,0.8);

    text-shadow:
        0 1px 0 #ffffff,
        0 3px 8px rgba(0,0,0,0.25);

    animation: avatarTitleFloat 3.2s ease-in-out infinite;
}



@keyframes avatarTitleFloat{
    0%{ transform: translateY(0) }
    50%{ transform: translateY(-4px) }
    100%{ transform: translateY(0) }
}
/* ===== SETUP SCREENS AS REAL SCREENS ===== */

#nameScreen{
    position: fixed;
    inset: 0;
    z-index: 100;
}

/* כל שלב הוא מסך מלא */
#nameScreen .setup-step{
    position: absolute;
    inset: 0;
    display: none;
    padding: 20px 16px;
}

/* רק שלב פעיל מוצג */
#nameScreen .setup-step:not([hidden]){
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== AVATAR STEP FULL SCREEN ===== */

#stepAvatar{
    justify-content: space-between;
}

#stepAvatar .avatar-picker{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 6vw, 48px);
    padding: 0 24px;
}

#stepAvatar .avatar-option{
    width: clamp(220px, 60vw, 420px);
    height: clamp(220px, 60vw, 420px);
}


#stepAvatar .btn-start{
    margin: 0 auto;
    width: min(320px, 90%);
}
.paywall-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 300ms ease;
}


.paywall-modal.is-visible{
  display: flex;
  opacity: 1;
}


.paywall-backdrop{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,105,180,0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(99,102,241,0.25), transparent 45%),
    rgba(10,12,20,0.75);
  backdrop-filter: blur(14px);
}

.paywall-box{
  position: relative;
  width: min(520px, 92%);
  padding: 56px 48px;
  border-radius: 36px;
opacity: 0;

  background: linear-gradient(145deg,#ffffff,#f8f9ff);

  box-shadow:
    0 60px 120px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.6) inset;

  text-align: center;

  transform: translateY(40px) scale(0.92);
  transition: transform 420ms cubic-bezier(.16,1,.3,1);
}

.paywall-modal.is-visible .paywall-box{
  transform: translateY(0) scale(1);
  opacity: 1;

}

.paywall-box h2{
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 16px;
  background-clip: text;
text-shadow:
  0 4px 18px rgba(139,92,246,0.35),
  0 2px 8px rgba(236,72,153,0.35);
letter-spacing: 0.5px;

  background: linear-gradient(90deg,#ec4899,#8b5cf6,#3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.paywall-box p{
  font-size: 17px;
  color: #4b5563;
  margin-bottom: 40px;
  line-height: 1.5;
}

.paywall-actions{
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}


.paywall-box .btn-pink{
  border: none;
  padding: 16px 38px;
  border-radius: 999px;

  font-size: 16px;
  font-weight: 800;

  background: linear-gradient(135deg,#ec4899,#8b5cf6);
  color: #fff;

 box-shadow:
  0 80px 160px rgba(0,0,0,0.55),
  0 20px 60px rgba(139,92,246,0.35),
  0 0 0 1px rgba(255,255,255,0.7) inset;


  transition: transform 180ms ease, box-shadow 180ms ease;
}

.paywall-box .btn-pink:hover{
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 30px 60px rgba(139,92,246,0.55),
    0 0 0 1px rgba(255,255,255,0.5) inset;
}

.paywall-box .btn-soft{
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 700;
  color: #6b7280;
  padding: 12px 16px;
  transition: color 160ms ease;
}

.paywall-box .btn-soft:hover{
  color: #111827;
}

body.modal-open{
  overflow: hidden;
}



/* ===== PREMIUM LOCKED TILE - LUXURY (no milky blob behind lock) ===== */

.home-tile.is-premium{
  position: relative;
  overflow: hidden;

  /* keep it premium אבל בלי כתם בפינה של המנעול */
  background-image:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,0.10), transparent 42%),
    radial-gradient(circle at 72% 88%, rgba(255,255,255,0.08), transparent 44%);
  background-blend-mode: screen;
}

.home-tile.is-premium::after{
  content: "🔒";
  position: absolute;
  top: 4px;
  right: 4px;

  font-size: 13px;
  line-height: 1;

  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;

  text-shadow:
    0 2px 4px rgba(0,0,0,0.45),
    0 0 7px rgba(245,158,11,0.35);

  z-index: 999;

  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;

  animation: lockGem 2.6s ease-in-out infinite;
}

@keyframes lockGem{
  0%   { transform: rotateZ(0deg)   rotateY(0deg)   scale(1); }
  50%  { transform: rotateZ(10deg)  rotateY(180deg) scale(1.08); }
  100% { transform: rotateZ(0deg)   rotateY(360deg) scale(1); }
}
.parent-entry-btn{
  position: absolute;
  top: 16px;
  left: 16px;

  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: rgba(255,255,255,0.85);

  font-size: 20px;
  text-decoration: none;

  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);

  transition: transform .18s ease, box-shadow .18s ease;
  z-index: 60;
}


.parent-entry-btn:hover{
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
/* ===== SCORE LOADING STATE ===== */

.home-score span {
    opacity: 1;
    transition: opacity 280ms ease, transform 280ms ease;
}

.home-score span.loading {
    opacity: 0.45;
}

.home-score span.loaded {
    opacity: 1;
    animation: scoreFadeIn 320ms ease;
}

@keyframes scoreFadeIn {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
