/* COMPONENTES — botões, cartões, chips, modais, nós do mapa, mascote */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--sun); color: var(--ink); font-weight: 700; font-size: 1.1rem; padding: 14px 28px; border-radius: 999px; box-shadow: 0 6px 0 var(--sun-d), 0 10px 18px rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s, filter .15s; min-height: 52px; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--sun-d), 0 3px 6px rgba(0, 0, 0, .2); }
.btn-big { font-size: 1.3rem; padding: 16px 34px; min-height: 60px; }
.btn-small { font-size: .95rem; padding: 8px 16px; min-height: 40px; box-shadow: 0 4px 0 var(--sun-d); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 6px 0 var(--violet-d), 0 10px 18px rgba(0, 0, 0, .18); }
.btn-violet.btn-small { box-shadow: 0 4px 0 var(--violet-d); }
.btn-violet:active { box-shadow: 0 1px 0 var(--violet-d); }
.btn-ghost { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.btn-ghost-dark { background: #ece6ff; color: var(--violet-d); box-shadow: 0 5px 0 #cfc3ff; }
.btn-danger { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #c94437; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 1.3rem; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }

.card { background: #fff; color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; }
.card h3 { color: var(--ink); }
.muted { color: var(--ink-soft); font-size: .92rem; }
.chip { background: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .3); padding: 8px 14px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.chip b { font-size: 1.1em; }
.pill { display: inline-block; background: #ece6ff; color: var(--violet-d); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .9rem; margin: 2px; }
.pill.ok { background: #d5f7ea; color: #0a7a58; } .pill.warn { background: #fff0c9; color: #8a5d00; }
.pill.bad { background: #ffe0e0; color: #b3202a; } .pill.lock { background: #eee; color: #777; }
.stat { text-align: center; padding: 16px; display: grid; gap: 2px; }
.stat b { font-size: 2rem; color: var(--violet-d); line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: .95rem; }

/* nós do mapa */
.node { position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 6px 10px; border-radius: 22px; background: color-mix(in srgb, var(--c) 14%, #fff); border: 3px solid color-mix(in srgb, var(--c) 40%, #fff); transition: transform .15s, box-shadow .15s; }
.node:hover:not(.locked) { transform: translateY(-4px) scale(1.03); box-shadow: 0 10px 18px rgba(0, 0, 0, .15); }
.node-label { font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.node small { color: var(--ink-soft); text-align: center; line-height: 1.1; min-height: 2.2em; font-weight: 500; }
.node-stars { display: flex; gap: 2px; font-size: 1.3rem; }
.node-stars i { font-style: normal; color: #ddd5f5; }
.node-stars i.on { color: var(--sun); text-shadow: 0 2px 0 var(--sun-d); }
.node.done { background: color-mix(in srgb, var(--mint) 18%, #fff); border-color: var(--mint); }
.node.current { background: #fff; border-color: var(--violet); box-shadow: 0 0 0 5px rgba(108, 77, 255, .22); animation: glow 2s ease-in-out infinite; }
.node.locked { opacity: .55; background: #eee; border-color: #ddd; filter: grayscale(.6); cursor: not-allowed; }
.node .you { position: absolute; top: -34px; right: -8px; width: 46px; animation: hop 1.1s ease-in-out infinite; z-index: 2; }

/* medalhas e loja */
.medal { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 16px; }
.medal .mi { font-size: 2.6rem; }
.medal small { color: var(--ink-soft); }
.medal.off { opacity: .55; filter: grayscale(.7); }
.medal.on { background: linear-gradient(180deg, #fff, #fff6d6); }
.played { display: flex; flex-wrap: wrap; gap: 8px; }
.played .pill { background: color-mix(in srgb, var(--c) 18%, #fff); color: var(--ink); }
.shop-item { background: var(--paper-2); border: 3px solid transparent; border-radius: 20px; padding: 12px 6px; display: grid; justify-items: center; gap: 4px; color: var(--ink); transition: transform .12s; }
.shop-item:hover { transform: translateY(-3px); }
.shop-item .big { font-size: 2.8rem; line-height: 1.1; }
.shop-item small { font-weight: 600; color: var(--ink-soft); }
.shop-item.sel { border-color: var(--mint); background: #e4fbf3; }
.shop-item.buy { background: #fff7dd; }
.swatch { width: 100%; height: 46px; border-radius: 12px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(25, 10, 70, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fadein .2s; overflow-y: auto; }
.modal-wrap.out { opacity: 0; transition: opacity .2s; }
.modal { background: #fff; color: var(--ink); border-radius: 30px; padding: 26px; width: min(460px, 100%); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); text-align: center; animation: pop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
.modal.wide { width: min(780px, 100%); }
.modal h2 { font-size: 1.7rem; color: var(--violet-d); }
.modal p { color: var(--ink-soft); margin: 8px 0; }
.modal-emoji { font-size: 3rem; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.picker .sub { color: var(--ink); font-weight: 600; margin-top: 0; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 12px; text-align: left; }
.game-card { position: relative; background: color-mix(in srgb, var(--c) 14%, #fff); border: 3px solid color-mix(in srgb, var(--c) 55%, #fff); border-radius: 22px; padding: 14px; display: grid; gap: 4px; transition: transform .12s; }
.game-card:hover:not(.locked) { transform: translateY(-4px) rotate(-.6deg); }
.game-card .gc-emoji { font-size: 2.4rem; }
.game-card b { font-size: 1.1rem; }
.game-card small { color: var(--ink-soft); font-size: .85rem; }
.game-card.locked { opacity: .55; filter: grayscale(.7); }
.rec { position: absolute; top: -10px; right: 10px; background: var(--pink); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }

/* toasts e texto flutuante */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 95; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #fff; color: var(--ink); padding: 12px 18px; border-radius: 18px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: slidedown .3s cubic-bezier(.2, 1.3, .4, 1); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .4s; }
.toast span { font-size: 1.5rem; }
.float-text { position: fixed; z-index: 96; transform: translate(-50%, -50%); font-weight: 700; font-size: 1.8rem; color: #fff; -webkit-text-stroke: 1.5px #5b3df0; text-shadow: 0 3px 0 #5b3df0; pointer-events: none; animation: floatup 1.1s ease-out forwards; }

/* tabelas (orientador) */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; color: var(--ink); }
.tbl th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid #ece6ff; white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #f0ecff; }
.stars-c { color: var(--sun-d); letter-spacing: 1px; white-space: nowrap; }
.rec-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); }
.weak { margin-top: 12px; }
.heat { display: grid; grid-template-columns: 26px repeat(10, 1fr); gap: 3px; font-size: .8rem; max-width: 520px; }
.heat b { text-align: center; color: var(--ink-soft); align-self: center; }
.heat i { font-style: normal; text-align: center; border-radius: 7px; padding: 7px 0; font-weight: 700; cursor: help; }
.h-new { background: #efecf7; color: #aaa; } .h-learning { background: #ffe9a8; color: #8a5d00; }
.h-hard { background: #ffb8b8; color: #a1171f; } .h-mastered { background: #aef0d5; color: #0a7a58; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: .85rem; color: var(--ink-soft); }
.legend i { font-style: normal; display: inline-block; width: 22px; text-align: center; border-radius: 6px; margin-right: 4px; font-weight: 700; }

/* resultado */
.stars-row { display: flex; justify-content: center; gap: 10px; font-size: 4.2rem; line-height: 1; }
.rstar { color: #e4dcff; transform: scale(.9); }
.rstar.on { color: #e4dcff; }
.rstar.on.pop-in { color: var(--sun); text-shadow: 0 5px 0 var(--sun-d); animation: starpop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.result-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.result-stats div { background: var(--paper-2); border-radius: 18px; padding: 12px; display: grid; }
.result-stats b { font-size: 1.7rem; color: var(--violet-d); }
.result-stats span { font-size: .85rem; color: var(--ink-soft); }
.notice { text-align: left; border-radius: 16px; padding: 12px 16px; font-weight: 500; animation: pop-in .4s both; animation-delay: 1.2s; }
.notice.unlock { background: #dff5ff; color: #0b5d86; }
.notice.medal { background: #fff3c4; color: #7a5200; display: flex; gap: 12px; align-items: center; }
.notice.medal span { font-size: 2rem; } .notice.medal small { display: block; font-weight: 400; }
.notice.mission { background: #dcf9ee; color: #0a6b4c; }
.notice.tip { background: #ffeaf3; color: #9b1c58; }

/* mascote */
.mascot { width: 100%; height: auto; display: block; overflow: visible; }
.m-bob { animation: bob 2.4s ease-in-out infinite; transform-origin: 60px 110px; }
.m-eyes { animation: blink 4.5s infinite; transform-origin: 60px 54px; }
.m-star { animation: twinkle 1.6s ease-in-out infinite; transform-origin: 60px 4px; }
