@keyframes animarGif {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    background: #111;
    color: #eaeaea;
    font-family: monospace;
    padding: 20px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}


.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    /* limitar largura do container principal e centralizar para alinhar main e footer */
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styles moved to css/head.css */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* header h1, nav and nav .btn moved to css/head.css */

button {
    padding: 10px;
    margin: 5px;
    cursor: pointer;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.2s ease;
}

button:active {
    transform: scale(0.98);
    opacity: 0.9;
}

button:focus {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
}

/* Botões Entrar/Fugir - Brancos */
#menu button {
    background-color: #fff;
    color: #000;
}

/* Botão Vegeta - Azul */
#escolhaLutador button:first-of-type {
    background-color: #0099ff;
    color: #fff;
}

/* Botão Goku - Laranja */
#escolhaLutador button:last-of-type {
    background-color: #ff8800;
    color: #fff;
}

.hidden {
    display: none;
}

/* ESCOLHA DE LUTADOR */
#escolhaLutador {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    text-align: center;
}

#escolhaLutador p {
    width: 100%;
    margin: 0 0 15px 0;
}

#escolhaLutador button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 5px 10px;
    /* Largura fixa para padronizar os botões independentemente do texto */
    flex: 0 0 160px;
    width: 160px;
    padding: 10px 12px;
    box-sizing: border-box;
    text-align: center;
}

@media (max-width: 480px) {
    /* Em telas pequenas, permitir que botões cresçam e fiquem responsivos */
    #escolhaLutador button {
        flex: 1 1 auto;
        width: auto;
        min-width: 120px;
    }
}

/* Grid para botões lado a lado */
#escolhaLutador > button:nth-of-type(2),
#escolhaLutador > button:nth-of-type(3) {
    display: inline-block;
    margin: 5px 10px;
}

/* LOGS */
.log-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    overflow-y: auto;
    max-height: 400px;
}

#logHeroi,
#logVilao {
    flex: 1;
    min-height: 150px;
    max-height: 350px;
    background: #1b1126;
    border-radius: 10px;
    padding: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 48%;
    color: #00ddff;
    overflow-y: auto;
}

/* Background para logs do Vegeta (azul) */
#logHeroi {
    background-color: rgba(0, 153, 255, 0.15);
    border: 2px solid #0099ff;
    color: #0099ff;
}

/* Background para logs do Goku (laranja) */
#logVilao {
    background-color: rgba(255, 136, 0, 0.15);
    border: 2px solid #ff8800;
    color: #ff8800;
}

/* TENTAR NOVAMENTE */
#tentarNovamente {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

#tentarNovamente p {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

#tentarNovamente > div {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#tentarNovamente.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Aplicar o mesmo hover degradê azul->laranja nos botões de tentarNovamente */
#tentarNovamente button {
    transition: all 180ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    box-sizing: border-box;
}

#tentarNovamente button:hover {
    background: linear-gradient(90deg, #0099ff 0%, #ff8800 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,153,255,0.12), 0 4px 10px rgba(255,136,0,0.08);
}

/* Hover degradê para o link 'Sobre o Projeto' no header */
header nav a.btn {
    transition: all 180ms ease;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0099ff;
    background: transparent;
    border: 2px solid transparent;
    text-decoration: none;
}

header nav a.btn:hover {
    background: linear-gradient(90deg, #0099ff 0%, #ff8800 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,153,255,0.12), 0 4px 10px rgba(255,136,0,0.08);
    text-decoration: none;
}

/* BARRAS DE VIDA */
#barrasDeVida {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.hp-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.barra-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    /* aumentar largura máxima para tornar o cartão de HP mais amplo */
    max-width: 520px;
    padding: 18px;
    border-radius: 8px;
    background-color: rgba(0, 153, 255, 0.15);
}

.barra-col.direita {
    align-items: flex-end;
    background-color: rgba(255, 136, 0, 0.15);
    color: #ff8800;
}

/* SEÇÃO ANIMAÇÃO */
#animacaoBatalha {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.vencedor-text {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

.frase-lutador {
    font-size: 1.3em;
    font-style: italic;
    margin-top: 20px;
    text-align: center;
    animation: fadeIn 0.8s ease-in-out;
}

.hp-bar {
    width: 100%;
    /* permitir barras maiores dentro das colunas aumentadas */
    max-width: 480px;
    height: 25px;
    background-color: #0099ff;
    border: 2px solid #0099ff;
    margin: 5px 0;
    border-radius: 5px;
    overflow: hidden;
}

.hp {
    height: 100%;
    background-color: #0099ff;
    width: 100%;
    transition: width 0.4s ease-in-out;
}

/* Barra de HP do Vegeta (lado esquerdo) - Azul */
.barra-col:nth-child(1) .hp-bar {
    background-color: #0d1f2d;
    border: 2px solid #0099ff;
}

.barra-col:nth-child(1) .hp {
    background-color: #0099ff;
}

/* Barra de HP do Goku (lado direito) - Laranja */
.barra-col:nth-child(2) .hp-bar {
    background-color: #2d1f0d;
    border: 2px solid #ff8800;
}

.barra-col:nth-child(2) .hp {
    background-color: #ff8800;
}

/* GIF DE LUTA */
.gif-col {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    border-radius: 0;
    background-color: transparent;
    border: none;
    flex-shrink: 0;
    position: relative;
    padding: 0;
    margin: 0;
}

.gif-placeholder {
    position: static;
    font-size: 20px;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.gif-placeholder.hidden {
    opacity: 0;
    display: none;
}

.gif-batalha {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    animation: animarGif 0.8s infinite ease-in-out;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    display: block;
    visibility: visible;
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 0;
    margin: 0;
}

.gif-batalha.hidden {
    display: none;
    z-index: 0;
}

/* RESPONSIVO */
@media (max-width: 1024px) {
    #barrasDeVida {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
    }

    .barra-col,
    .barra-col.direita {
        align-items: center;
    }

    .log-container {
        flex-direction: column;
        align-items: center;
    }

    #logHeroi,
    #logVilao {
        max-width: 100%;
    }
}

/* RESPONSIVO - MOBILE */
@media (max-width: 768px) {
    /* Header responsive rules moved to css/head.css */

    button {
        padding: 8px;
        margin: 3px;
        font-size: 0.95em;
    }

    #escolhaLutador {
        gap: 10px;
        margin: 10px 0;
    }

    #escolhaLutador p {
        margin: 0 0 10px 0;
    }

    .barra-col {
        max-width: 100%;
        padding: 10px;
    }

    .vencedor-text {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .frase-lutador {
        font-size: 1em;
        margin-top: 10px;
        padding: 0 10px;
    }

    .log-container {
        gap: 10px;
        margin-top: 10px;
    }

    #logHeroi,
    #logVilao {
        min-height: 120px;
        max-width: 100%;
        padding: 10px;
        font-size: 0.9em;
    }

    #tentarNovamente {
        bottom: 15px;
        right: 15px;
        min-width: 200px;
        padding: 15px;
        gap: 10px;
    }

    #tentarNovamente p {
        font-size: 0.95em;
        margin: 0;
    }

    .gif-placeholder {
        font-size: 16px;
    }
}

/* ========================================
   SOBRE - Página de Informações do Projeto
   ======================================== */

body {
    background: #111;
    color: #eaeaea;
    font-family: monospace;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    gap: 50px;
    overflow-x: hidden;
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-shrink: 0;
}

header h1 {
    margin: 0;
    text-align: center;
    font-size: 2.5em;
    background: linear-gradient(135deg, #0099ff, #ff8800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

nav .btn {
    background-color: #0099ff;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
}

nav .btn:hover {
    background-color: #ff8800;
    transform: scale(1.05);
}

nav .btn:focus {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
}

main {
    flex: 1;
    /* Aumenta a largura máxima para reduzir margens laterais */
    max-width: 1200px;
    margin: 0 auto;
    /* Espaço extra entre o conteúdo principal e o footer */
    margin-bottom: 40px;
    /* Padding reduzido para aumentar área útil horizontal */
    padding: 20px;
    background: rgba(17, 17, 17, 0.8);
    border-radius: 15px;
    border: 2px solid #0099ff;
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.3);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow-x: hidden;
}

section {
    margin: 0;
    padding: 20px;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 10px;
    border-left: 5px solid #0099ff;
    transition: all 0.3s ease;
}

section:hover {
    background: rgba(26, 26, 26, 0.8);
    border-left-color: #ff8800;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.2);
}

section:nth-child(odd) {
    border-left-color: #0099ff;
}

section:nth-child(even) {
    border-left-color: #ff8800;
}

section:nth-child(even):hover {
    border-left-color: #0099ff;
}

h2 {
    color: #0099ff;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    text-shadow: 0 0 10px rgba(0, 153, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

section:nth-child(even) h2 {
    color: #ff8800;
    text-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

ul,
ol {
    padding-left: 30px;
    margin: 15px 0;
}

li {
    margin-bottom: 12px;
    line-height: 1.8;
}

code {
    background: #0a0a0a;
    padding: 4px 8px;
    border-radius: 5px;
    color: #00ddff;
    border: 1px solid #00ddff;
    font-weight: bold;
}

img {
    width: 100%;
    max-width: 400px;
    border: 3px solid #0099ff;
    border-radius: 10px;
    margin: 20px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.5);
}

p,
li {
    line-height: 1.8;
    color: #eaeaea;
    font-size: 1.05em;
}

strong {
    color: #00ddff;
    font-weight: bold;
}

a {
    color: #ff8800;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

a:hover {
    color: #0099ff;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #0099ff;
    outline-offset: 2px;
}

/* Listas de Mecânica */
.mecanica-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.mecanica-item {
    background: rgba(0, 153, 255, 0.1);
    border: 2px solid #0099ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.mecanica-item:hover {
    background: rgba(0, 153, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.3);
}

.mecanica-item strong {
    display: block;
    margin-bottom: 8px;
    color: #00ddff;
}

.mecanica-item.vegeta {
    border-color: #0099ff;
    background: rgba(0, 153, 255, 0.15);
}

.mecanica-item.goku {
    border-color: #ff8800;
    background: rgba(255, 136, 0, 0.15);
}

.mecanica-item.fundo {
    border-color: #222;
    background: rgba(17, 17, 17, 0.15);
}

.mecanica-item.destaque {
    border-color: #00ddff;
    background: rgba(0, 221, 255, 0.15);
}

/* Stack de Tecnologias */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.tech-item {
    background: rgba(255, 136, 0, 0.1);
    border: 2px solid #ff8800;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(255, 136, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.3);
}

/* Diagrama de Fluxo */
.flow-diagram {
    background: rgba(0, 153, 255, 0.1);
    border: 2px solid #0099ff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    color: #00ccff;
    margin: 20px 0;
    font-size: 1.1em;
}

/* Seção de Créditos */
.credits-section {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.1), rgba(255, 136, 0, 0.1));
    border-radius: 10px;
    border: 2px solid #0099ff;
    margin-top: 40px;
}

.credits-section p {
    margin: 10px 0;
    font-size: 1.1em;
}

.credit-title {
    justify-content: center;
    margin: 0 0 15px 0;
    display: flex;
}

.credit-note {
    font-size: 0.9em;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(0, 153, 255, 0.3);
}

.vegeta-color {
    color: #0099ff;
    font-weight: bold;
}

.goku-color {
    color: #ff8800;
    font-weight: bold;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 20px;
        border-radius: 10px;
    }

    section {
        padding: 15px;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 1.2em;
    }

    p,
    li {
        font-size: 0.95em;
    }

    img {
        max-width: 100%;
    }

    .mecanica-list,
    .tech-stack {
        grid-template-columns: 1fr;
    }

    .credits-section {
        padding: 20px;
    }

    .credits-section p {
        font-size: 0.95em;
    }
}

/* Nenhuma regra de sobre.css deve afetar o footer. Certifique-se que não há .footer-content, #iconesFooter, #mensagem, #direitos, nav dentro do footer, etc. no sobre.css. */


/* Footer styles moved to css/footer.css - editar src/css/footer.css para ajustes */

/* MENU PRINCIPAL - padronizar botões Lutar / Fugir e centralizá-los */
#menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    text-align: center;
}

#menu button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Largura fixa para padronizar os botões independentemente do texto */
    flex: 0 0 160px;
    width: 160px;
    padding: 10px 12px;
    box-sizing: border-box;
    transition: all 180ms ease;
}

@media (max-width: 480px) {
    #menu {
        flex-direction: column;
        gap: 10px;
    }

    #menu button {
        flex: 1 1 auto;
        width: auto;
        min-width: 140px;
    }
}

/* Hover: degradê azul -> laranja para os botões do menu */
#menu button:hover {
    background: linear-gradient(90deg, #0099ff 0%, #ff8800 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(0,153,255,0.12), 0 4px 10px rgba(255,136,0,0.08);
}