/* ============================================================
   welcome.css — Cartao de boas-vindas do visitante (14/11/2026)
   #welcome-card-overlay (index.html), aberto por showWelcomeCard (js/visitor.js) quando o jogo entra no mapa sem login.
   Cena animada em SVG (navios trocando tiros, soldados atirando, missil) + texto do jogo + Entrar. Overlay transparente
   (padrao do jogo); o cartao ocupa ~80% da tela. Fica abaixo da folha de login (#splash-auth, z-index 10002).
   ============================================================ */
#welcome-card-overlay {
    position: fixed; inset: 0; z-index: 10001; background: transparent;
    display: none; align-items: center; justify-content: center;
}
#welcome-card-overlay.open { display: flex; }

.wc-card {
    position: relative; width: min(80vw, 1000px); height: min(80vh, 760px);
    display: flex; flex-direction: column; overflow: hidden;
    background: linear-gradient(180deg, #11122b 0%, #0b0b1f 100%);
    border: 1px solid rgba(240, 192, 64, 0.45); border-radius: 18px;
    box-shadow: 0 0 0 1px rgba(240, 192, 64, 0.12) inset, 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 60px rgba(240, 192, 64, 0.12);
    font-family: 'IM Fell English', Georgia, serif; color: rgba(255, 255, 255, 0.86);
    animation: wc-in 0.55s cubic-bezier(.2, .9, .3, 1.2) both;
}
#welcome-card-overlay.closing .wc-card { animation: wc-out 0.25s ease-in both; }
@keyframes wc-in { from { opacity: 0; transform: translateY(30px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes wc-out { to { opacity: 0; transform: translateY(16px) scale(0.97); } }

/* X ocupando o botao inteiro, como os outros dialogos do jogo (skin3d.css) */
.wc-close {
    position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer; background: none; border: none; padding: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7));
}
.wc-close img { width: 100%; height: 100%; display: block; pointer-events: none; }
.wc-close:hover { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)) brightness(1.2); }

/* ---------- cena ---------- */
.wc-scene { position: relative; flex: 0 0 40%; min-height: 150px; overflow: hidden; border-bottom: 1px solid rgba(240, 192, 64, 0.35); }
.wc-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wc-scene::after { /* escurece a base da cena para o texto encostar */
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
    background: linear-gradient(180deg, transparent, rgba(11, 11, 31, 0.85)); pointer-events: none;
}
.wc-scene svg * { transform-box: fill-box; }
/* cena 3D realista (js/welcome3d.js) por cima do SVG; entra com fade quando o 1o quadro fica pronto */
.wc-scene canvas.wc-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
.wc-scene.wc-3d-on canvas.wc-3d { opacity: 1; }
.wc-bob-a { animation: wc-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.wc-bob-b { animation: wc-bob 3.6s ease-in-out -1.4s infinite; transform-origin: 50% 100%; }
@keyframes wc-bob { 0%, 100% { transform: translateY(0) rotate(-1.6deg); } 50% { transform: translateY(4px) rotate(1.6deg); } }
.wc-flag { animation: wc-flag 0.9s ease-in-out infinite alternate; transform-origin: 0% 50%; }
@keyframes wc-flag { from { transform: skewY(-6deg) scaleX(1); } to { transform: skewY(6deg) scaleX(0.86); } }
.wc-cloud-a { animation: wc-drift 46s linear infinite; }
.wc-cloud-b { animation: wc-drift 70s linear -30s infinite; }
@keyframes wc-drift { from { transform: translateX(-260px); } to { transform: translateX(980px); } }
.wc-wave-a { animation: wc-wave 6s linear infinite; }
.wc-wave-b { animation: wc-wave 9s linear infinite reverse; }
@keyframes wc-wave { from { transform: translateX(0); } to { transform: translateX(-80px); } }
.wc-sun { animation: wc-glow 4s ease-in-out infinite alternate; transform-origin: 50% 50%; }
@keyframes wc-glow { from { opacity: 0.75; transform: scale(1); } to { opacity: 1; transform: scale(1.08); } }

/* ---------- texto ---------- */
.wc-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 28px 22px; text-align: center; position: relative; z-index: 1; }
.wc-kicker { margin: 10px 0 0; font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: rgba(240, 192, 64, 0.75); }
.wc-title {
    margin: 0; font-family: 'Almendra', Georgia, serif; font-weight: 700; font-size: clamp(34px, 6vw, 56px); letter-spacing: 4px; line-height: 1.1;
    background: linear-gradient(100deg, #b8862a 0%, #ffe28a 30%, #f0c040 45%, #fff6cf 52%, #f0c040 60%, #b8862a 100%);
    background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: wc-shine 5s linear infinite; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
@keyframes wc-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.wc-sub { margin: 4px 0 12px; font-family: 'Almendra', Georgia, serif; color: #fff3cf; font-size: clamp(16px, 2.2vw, 20px); }
.wc-text { max-width: 640px; margin: 0 auto 16px; line-height: 1.55; font-size: 16px; }
.wc-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 720px; margin: 0 auto 18px; padding: 0; list-style: none; }
.wc-feats li {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px;
    background: rgba(240, 192, 64, 0.06); border: 1px solid rgba(240, 192, 64, 0.22); font-size: 14px; line-height: 1.25;
    animation: wc-rise 0.5s ease-out both;
}
.wc-feats li:nth-child(1) { animation-delay: 0.25s; }
.wc-feats li:nth-child(2) { animation-delay: 0.35s; }
.wc-feats li:nth-child(3) { animation-delay: 0.45s; }
.wc-feats li:nth-child(4) { animation-delay: 0.55s; }
@keyframes wc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* icones do jogo sao pretos: pintados de dourado (#f0c040) para aparecer no fundo escuro */
.wc-feats img { width: 30px; height: 30px; filter: brightness(0) saturate(100%) invert(79%) sepia(53%) saturate(737%) hue-rotate(358deg) brightness(101%) contrast(92%); }
.wc-feats b { color: #f0c040; font-weight: normal; font-family: 'Almendra', Georgia, serif; font-size: 15px; }

/* botoes sempre visiveis: grudam no pe do cartao quando o texto precisa rolar */
.wc-actions {
    position: sticky; bottom: -22px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 6px;
    margin: 0 -28px; padding: 14px 28px 12px; background: linear-gradient(180deg, rgba(11, 11, 31, 0), #0b0b1f 28%);
}
.wc-btn-main {
    position: relative; overflow: hidden; min-width: min(320px, 100%); padding: 14px 26px; border-radius: 12px; cursor: pointer;
    font-family: 'Almendra', Georgia, serif; font-size: 20px; letter-spacing: 1px; color: #1a1205;
    background: linear-gradient(180deg, #ffe08a, #f0c040 55%, #c9952a); border: 1px solid #ffe9a8;
    box-shadow: 0 6px 18px rgba(240, 192, 64, 0.35); animation: wc-pulse 2.4s ease-in-out infinite;
}
.wc-btn-main::after { /* brilho que passa pelo botao */
    content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: wc-sweep 3s ease-in-out infinite;
}
@keyframes wc-sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes wc-pulse { 0%, 100% { box-shadow: 0 6px 18px rgba(240, 192, 64, 0.3); } 50% { box-shadow: 0 6px 28px rgba(240, 192, 64, 0.6); } }
.wc-btn-main small { display: block; font-family: 'IM Fell English', Georgia, serif; font-size: 13px; letter-spacing: 0; opacity: 0.8; }
.wc-btn-alt {
    background: none; border: none; cursor: pointer; padding: 6px 12px; color: rgba(255, 255, 255, 0.65);
    font-family: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.wc-btn-alt:hover { color: #fff; }
.wc-note { margin: 12px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.wc-note a { color: rgba(240, 192, 64, 0.85); }

@media (max-width: 768px) {
    .wc-card { width: 92vw; height: 86vh; height: 86dvh; border-radius: 14px; }
    .wc-scene { flex-basis: 36%; }
    .wc-body { padding: 2px 16px 16px; }
    .wc-actions { bottom: -16px; margin: 0 -16px; padding: 12px 16px 10px; }
    .wc-text { font-size: 15px; margin-bottom: 12px; }
    .wc-feats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
    .wc-feats li { flex-direction: row; justify-content: flex-start; text-align: left; padding: 8px 10px; }
    .wc-feats img { width: 24px; height: 24px; flex: 0 0 auto; }
    .wc-btn-main { font-size: 18px; padding: 12px 20px; }
}
/* tela baixa (notebook): cena menor e destaques em linha, para os 4 caberem acima dos botoes */
@media (max-height: 860px) and (min-width: 769px) {
    .wc-scene { flex-basis: 34%; }
    .wc-kicker { margin-top: 6px; }
    .wc-title { font-size: 44px; }
    .wc-sub { margin-bottom: 8px; }
    .wc-text { font-size: 15px; margin-bottom: 12px; }
    .wc-feats { margin-bottom: 8px; }
    .wc-feats li { flex-direction: row; text-align: left; padding: 7px 10px; }
    .wc-feats img { width: 24px; height: 24px; flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .wc-card, .wc-card *, .wc-scene svg * { animation: none !important; }
}
