/* FishLane - Atari 2600 Online Edition
   Desenvolvido por Rodrigo Vertulo
*/

/* Reset e Base */
body {
    background-color: #050505;
    color: #ccc;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    padding: 0;
    display: block;
    overflow-x: hidden;
    /* Melhora a rolagem no Safari do iPhone */
    -webkit-overflow-scrolling: touch;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Cabeçalho */
header {
    text-align: center;
    padding: 30px 0;
    color: #D8C666;
    text-shadow: 3px 3px 0 #8B4513;
    touch-action: auto;
    /* Permite rolar a página por aqui */
}

header h1 {
    font-size: clamp(28px, 6vw, 56px);
    margin: 0;
}

.author-credits {
    font-size: 10px;
    color: #4F95FF;
    margin-top: 15px;
}

/* --- MONITOR CRT (ÁREA DO JOGO) --- */
.game-focus-area {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0 40px 0;
    background: radial-gradient(circle, #1a1a1a 0%, #050505 100%);
    /* BLOQUEIA o scroll nativo APENAS nesta área para permitir o jogo touch */
    touch-action: none;
}

#game-container {
    position: relative;
    width: 400px;
    height: 480px;
    background-color: #000;
    border: 12px solid #222;
    border-radius: 30px;
    box-shadow: 0 0 50px #000;
    overflow: hidden;
    transform: perspective(1000px) rotateX(1deg);
}

/* Scanlines Horizontais */
#game-container::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 5;
    pointer-events: none;
}

/* Oscilação de Brilho (Flicker) */
#game-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.03);
    z-index: 6;
    pointer-events: none;
    animation: crt-flicker 0.1s infinite;
}

@keyframes crt-flicker {
    0% {
        opacity: 0.02;
    }

    50% {
        opacity: 0.05;
    }

    100% {
        opacity: 0.03;
    }
}

canvas {
    width: 100% !important;
    height: 100% !important;
    image-rendering: pixelated;
    display: block;
    filter: brightness(1.1) contrast(1.1) saturate(1.3) blur(0.35px);
}

/* --- CONTEÚDO INFERIOR --- */
.bottom-content {
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    padding-bottom: 50px;
    touch-action: auto;
    /* Garante rolagem livre aqui */
}

.manual-horizontal {
    background: #111;
    border: 2px solid #333;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.manual-horizontal h2 {
    color: #FF4500;
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.manual-item h3 {
    color: #4F95FF;
    font-size: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #222;
}

.manual-item p,
.manual-item li {
    font-size: 11px;
    line-height: 1.7;
    color: #aaa;
}

.key {
    background: #333;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
}

/* Lista de Inimigos */
.enemy-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.square {
    width: 12px;
    height: 12px;
    margin-right: 12px;
    border: 1px solid #fff;
}

.square.fish {
    background: #75CC84;
}

.square.shark {
    background: #5E5E5E;
}

.square.red-shark {
    background: #A05E5E;
}

.square.poison {
    background: #D12D2D;
}

/* Ads */
.ad-banner-area {
    width: 100%;
    margin: 20px 0 40px 0;
}

.ad-placeholder {
    height: 90px;
    background: #0a0a0a;
    border: 1px dashed #333;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    font-size: 9px;
}

/* SEO Article */
.seo-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #0a0a0a;
    border-radius: 10px;
    box-shadow: inset 0 0 20px #000;
}

.full-content-block {
    font-family: sans-serif;
    color: #999;
    line-height: 1.8;
    text-align: justify;
}

.full-content-block h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #D8C666;
    margin: 40px 0 15px 0;
    border-left: 5px solid #4F95FF;
    padding-left: 15px;
}

.full-content-block p {
    margin-bottom: 25px;
    font-size: 16px;
}

/* Overlay de Mensagens */
#message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
}

#message-overlay h1 {
    color: #f00;
    font-size: 24px;
    text-shadow: 2px 2px #000;
}

footer {
    padding: 40px 0;
    text-align: center;
    font-size: 9px;
    color: #333;
    border-top: 1px solid #111;
}

/* Responsividade */
@media (max-width: 500px) {
    #game-container {
        width: 95vw;
        height: calc(95vw * 1.2);
        border-width: 8px;
    }

    header h1 {
        font-size: 22px;
    }

    .full-content-block p {
        font-size: 14px;
    }
}

.hidden {
    display: none !important;
}