/* ==========================================
   ESTILO FUTURISTA ESPACIAL - TABUADA FÁCIL
   ========================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

:root {
    --bg-dark: #090d16;
    --card-bg: rgba(22, 32, 54, 0.85);
    --card-border: rgba(56, 189, 248, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-bright: #e2e8f0;
    --accent-blue: #38bdf8;
    --accent-purple: #c084fc;
    --accent-green: #22c55e;
    --accent-orange: #fb923c;
    --accent-red: #ef4444;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(ellipse at top, #111827 0%, #070a12 100%) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
}

/* OCULTAR TELAS INATIVAS - REGRA ABSOLUTA */
.oculto, div.oculto, section.oculto, button.oculto, span.oculto {
    display: none !important;
}

/* ESTRUTURA DAS TELAS - MAX LARGURA 420px */
.tela {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 12px 16px 24px 16px;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    animation: fadeInSlide 0.35s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* HEADER */
#top-bar {
    width: 100%;
    max-width: 420px;
    padding: 12px 16px 0 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    z-index: 20;
    box-sizing: border-box;
}

.btn-top-control {
    background: rgba(30, 41, 59, 0.8);
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    color: #f8fafc;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.btn-top-control:active {
    transform: scale(0.92);
}

/* CONTAINERS & CARDS */
.app-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.card-painel-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--card-border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
}

/* SAUDAÇÃO E BADGES */
.user-greeting {
    font-size: 24px;
    color: var(--accent-blue);
    margin-bottom: 6px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.status-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 14px;
}

.badge-treino {
    color: var(--accent-purple);
    background: rgba(192, 132, 252, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(192, 132, 252, 0.3);
}

.badge-relampago {
    color: var(--accent-orange);
    background: rgba(251, 146, 60, 0.12);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

/* WIDGET TABY */
.painel-taby-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    text-align: left;
}

.painel-taby-img {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
    animation: flutuarRobo 3.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes flutuarRobo {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(2deg); }
}

.taby-title {
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 3px;
}

.taby-text {
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--text-bright);
    font-weight: 500;
}

/* RÓTULOS DE SEÇÃO */
.section-label {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 8px;
    text-align: left;
}

/* BOTÕES DE SELEÇÃO E OPÇÃO */
.btn-op-redesign {
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-secondary) !important;
    border-radius: 14px !important;
    padding: 12px 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-op-redesign.selecionado {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.4), 0 4px 0 #075985 !important;
}

/* BOTÃO PRINCIPAL DE TRILHA */
.btn-painel-trilha {
    width: 100%;
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%) !important;
    border: none !important;
    box-shadow: 0 5px 0 #4338ca, 0 10px 22px rgba(168, 85, 247, 0.4) !important;
    color: #ffffff !important;
    padding: 15px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    cursor: pointer;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}

.btn-painel-trilha:active {
    transform: translateY(3px) !important;
    box-shadow: 0 2px 0 #4338ca !important;
}

/* BOTÃO COMEÇAR DESAFIO */
.btn-comecar-desafio {
    width: 100%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    box-shadow: 0 6px 0 #15803d, 0 10px 22px rgba(34, 197, 94, 0.35) !important;
    color: #ffffff !important;
    padding: 16px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    border-radius: 16px !important;
    cursor: pointer;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.btn-comecar-desafio:active {
    transform: translateY(3px) !important;
    box-shadow: 0 3px 0 #15803d !important;
}

/* BOTÕES INFERIORES VIBRANTES */
.btn-ranking-futurista {
    width: 100%;
    background: linear-gradient(135deg, #7e22ce 0%, #6b21a8 100%) !important;
    border: 1.5px solid #c084fc !important;
    color: #ffffff !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(126, 34, 206, 0.4), 0 4px 0 #581c87 !important;
}

.btn-ranking-futurista:active {
    transform: translateY(2px) !important;
    box-shadow: 0 2px 0 #581c87 !important;
}

.btn-compartilhar-futurista {
    width: 100%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
    padding: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35), 0 3px 0 #075985 !important;
}

.btn-sair-futurista {
    width: 100%;
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%) !important;
    border: 1.5px solid #fca5a5 !important;
    color: #ffffff !important;
    padding: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.35), 0 3px 0 #450a0a !important;
}

.btn-voltar-padrao {
    background-color: #c0392b !important;
    box-shadow: 0 5px 0 #641e16, 0 8px 15px rgba(0,0,0,0.3) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    padding: 14px !important;
    font-size: 15px !important;
    border: none;
    cursor: pointer;
}

.btn-voltar-futurista {
    width: 100%;
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
    color: #e2e8f0 !important;
    padding: 13px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

/* INPUTS FUTURISTAS */
.input-futurista {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 15px;
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    text-align: center;
}

.input-futurista:focus {
    border-color: var(--accent-blue);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* ESPAÇO E ESTRELAS */
.espaco-sideral-bg {
    background: radial-gradient(ellipse at bottom, #111827 0%, #030712 100%) !important;
    position: relative;
    overflow: hidden;
}

.estrelas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 400 400"><circle cx="20" cy="40" r="1.5" fill="%23ffffff" opacity="0.8"/><circle cx="150" cy="120" r="1" fill="%2338bdf8" opacity="0.9"/><circle cx="280" cy="70" r="2" fill="%23c084fc" opacity="0.7"/><circle cx="90" cy="250" r="1.2" fill="%23ffffff" opacity="0.6"/><circle cx="320" cy="310" r="1.8" fill="%2338bdf8" opacity="0.8"/><circle cx="220" cy="220" r="1" fill="%23ffffff" opacity="0.5"/><circle cx="50" cy="360" r="1.5" fill="%23c084fc" opacity="0.8"/></svg>') repeat;
    animation: piscarEstrelas 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

@keyframes piscarEstrelas {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.03); }
}

/* PAINEL DE EQUAÇÃO DO JOGO */
.painel-equacao-futurista {
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 20px;
    padding: 18px;
    font-size: 42px;
    font-weight: 900;
    color: #ffffff;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.25), inset 0 0 15px rgba(0, 0, 0, 0.7);
    margin-bottom: 18px;
    letter-spacing: 2px;
}

.painel-equacao-futurista .sinal {
    color: var(--accent-blue);
    margin: 0 4px;
}

.btn-resposta-futurista {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: 1.5px solid #38bdf8 !important;
    color: #ffffff !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    padding: 16px 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 5px 0 #075985, 0 8px 18px rgba(56, 189, 248, 0.3) !important;
    cursor: pointer;
}

.btn-resposta-futurista:active {
    transform: translateY(3px) !important;
    box-shadow: 0 2px 0 #075985 !important;
}

.btn-desistir-futurista {
    width: 100%;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    padding: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    cursor: pointer;
}

/* SCROLLBAR FUTURISTA */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7 0%, #38bdf8 100%);
    border-radius: 10px;
}

/* Centraliza o rodapé e ajusta o espaçamento */
footer {
  text-align: center;
  width: 100%;
  margin-top: 20px;
  padding: 10px 0;
  color: #ffffff; /* Deixa o texto do copyright bem visível */
  font-size: 0.9rem;
}

/* Garante que o texto dentro da nav fique centralizado */
footer nav {
  display: block;
  margin-top: 5px;
}

/* Estiliza os links do rodapé para ficarem legíveis e bonitos no tema escuro */
footer a {
  color: #64b5f6; /* Azul claro para contrastar bem no fundo escuro */
  text-decoration: none; /* Remove o sublinhado fixo */
  margin: 0 5px;
}

footer a:hover {
  text-decoration: underline; /* Destaca ao passar o mouse */
  color: #90caf9;
}