/* ═══════════ Tela-título (GOD) — arte aprovada: portal + logo + botões ═══════════ */
#titlescreen {
  position: absolute; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#titlescreen.hidden { display: none !important; }

.ts-bg {
  position: absolute; inset: 0;
  background: url("../assets/menu/main-menu-background.png") center center / cover no-repeat;
  animation: ts-bg-in 1.2s ease both;
}
.ts-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 42%, transparent 34%, rgba(6,3,12,.5) 100%),
              linear-gradient(180deg, rgba(6,3,12,.35), transparent 30%, rgba(6,3,12,.4));
}
@keyframes ts-bg-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; } }

.ts-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%; justify-content: center; gap: 1vh; padding: 3vh 0;
}
.ts-logo {
  width: min(58%, 660px); height: auto; margin-top: 1vh;
  filter: drop-shadow(0 10px 34px rgba(120,55,190,.55));
  animation: ts-logo-in 1s ease .2s both;
}
@keyframes ts-logo-in { from { opacity: 0; transform: translateY(-16px) scale(.98); } to { opacity: 1; transform: none; } }

.ts-buttons { display: flex; flex-direction: column; align-items: center; gap: 1.3vh; margin-top: 3vh; }
.ts-btn {
  background: none; border: 0; padding: 0; cursor: pointer; line-height: 0;
  opacity: 0; animation: ts-btn-in .5s ease forwards;
}
.ts-btn:nth-child(1) { animation-delay: .55s; }
.ts-btn:nth-child(2) { animation-delay: .70s; }
.ts-btn:nth-child(3) { animation-delay: .85s; }
@keyframes ts-btn-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ts-btn img {
  width: min(46vw, 310px); height: auto; display: block;
  transition: transform .12s ease, filter .12s ease;
}
.ts-btn:hover img { transform: scale(1.05); filter: drop-shadow(0 0 16px rgba(150,80,210,.75)); }
.ts-btn:active img { transform: scale(.98); }

.ts-foot {
  position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
  color: #9a86b4; font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  font-family: var(--font-title); text-shadow: 0 1px 3px #000; z-index: 2;
}

/* ═══ Viewport baixo (paisagem de celular ~375px de altura): compacta logo+botões p/ tudo caber
   no 812×375 sem cortar a logo nem empurrar o 3º botão/rodapé pra fora (fix varredura 16/07).
   Só a MESMA linguagem, mais compacta — PC (altura > 500) fica intacto. ═══ */
@media (max-height: 500px) {
  .ts-inner { justify-content: center; gap: 0; padding: 6px 0; }
  .ts-logo  { width: min(40vw, 300px); margin-top: 0; }
  .ts-buttons { margin-top: 12px; gap: 7px; }
  .ts-btn img { width: min(34vw, 216px); }
  .ts-foot  { bottom: 5px; font-size: 9px; letter-spacing: 1.5px; }
}

/* ═══════════ Seletor de espaços de save (kit escuro: mármore/aço + brasa âmbar) ═══════════ */
#save-slots { position: absolute; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center;
  font-family: var(--game-font); }
#save-slots.hidden { display: none !important; }
.ss-scrim { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(10,6,4,.72), rgba(4,3,6,.92)); backdrop-filter: blur(3px); }
.ss-panel {
  position: relative; z-index: 1; width: min(92vw, 860px); max-height: 88vh; overflow-y: auto;
  padding: 22px 24px 20px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(28,23,17,.98), rgba(17,14,11,.98));
  border: 1px solid rgba(217,178,76,.35);
  box-shadow: 0 24px 70px rgba(0,0,0,.7), inset 0 1px 0 rgba(240,212,136,.12);
  animation: ss-in .22s ease both;
}
@keyframes ss-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.ss-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
  border-bottom: 1px solid rgba(217,178,76,.18); padding-bottom: 12px; }
.ss-head h2 { margin: 0; font-family: var(--font-title); font-size: 18px; color: var(--gold-soft); letter-spacing: 1px; text-shadow: 0 2px 6px #000; }
.ss-x { background: rgba(0,0,0,.35); border: 1px solid rgba(217,178,76,.3); color: #e9d9a8; width: 34px; height: 34px;
  border-radius: 9px; font-size: 15px; cursor: pointer; line-height: 1; transition: all .12s ease; }
.ss-x:hover { background: rgba(217,178,76,.18); border-color: var(--gold); }
.ss-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .ss-cards { grid-template-columns: 1fr; } }
.ss-card {
  display: flex; flex-direction: column; min-height: 190px; padding: 14px 13px;
  border-radius: 12px; border: 1px solid rgba(217,178,76,.22);
  background: linear-gradient(180deg, rgba(46,38,28,.6), rgba(24,20,15,.7));
  box-shadow: inset 0 1px 0 rgba(240,212,136,.08);
}
.ss-card.occ { border-color: rgba(217,178,76,.4); }
.ss-card.current { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217,178,76,.35), inset 0 1px 0 rgba(240,212,136,.14), 0 0 24px rgba(217,178,76,.18); }
.ss-card.empty { border-style: dashed; border-color: rgba(217,178,76,.28); }
.ss-num { font-family: var(--font-title); font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #cdb87a; text-transform: uppercase; }
.ss-cur { font-size: 10px; color: #0b0a08; background: var(--gold); padding: 1px 7px; border-radius: 20px; vertical-align: middle; margin-left: 4px; }
.ss-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 2px; }
.ss-lvl { font-size: 26px; font-weight: 900; color: #f2e6c8; text-shadow: 0 2px 5px #000; }
.ss-test { font-size: 12px; color: #ff9a4d; text-shadow: 0 0 10px rgba(255,120,40,.5); display: block; }
.ss-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: #c9bda0; }
.ss-vazio { align-items: center; justify-content: center; color: #7d715a; font-size: 17px; font-style: italic; letter-spacing: 1px; }
.ss-actions { display: flex; gap: 8px; }
.ss-actions.col { flex-direction: column; }
.ss-btn {
  flex: 1; padding: 9px 8px; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(217,178,76,.35); color: #e9dcb6; background: rgba(0,0,0,.3); transition: all .12s ease;
}
.ss-btn:hover { background: rgba(217,178,76,.16); border-color: var(--gold); color: #fff5da; transform: translateY(-1px); }
.ss-btn.play, .ss-btn.new { background: linear-gradient(180deg, rgba(122,90,32,.55), rgba(80,58,20,.55)); border-color: rgba(240,212,136,.5); color: #ffeeb8; }
.ss-btn.play:hover, .ss-btn.new:hover { background: linear-gradient(180deg, rgba(160,120,44,.7), rgba(110,80,28,.7)); }
.ss-btn.test { background: linear-gradient(180deg, rgba(120,50,24,.5), rgba(70,28,14,.5)); border-color: rgba(255,140,70,.45); color: #ffcba0; }
.ss-btn.test:hover { background: linear-gradient(180deg, rgba(160,66,30,.7), rgba(96,38,18,.7)); border-color: #ff9a4d; }
.ss-btn.del.confirm { background: rgba(150,40,40,.55); border-color: #e05a5a; color: #ffdada; animation: ss-pulse .9s ease infinite; }
@keyframes ss-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,90,90,.5); } 50% { box-shadow: 0 0 0 4px rgba(224,90,90,0); } }
.ss-note { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(217,178,76,.14);
  font-size: 12px; color: #9a8a6a; text-align: center; }
.ss-note b { color: #cdb87a; }
