@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

/* 
  Sound effects (like 8-bit beeps) cannot be implemented with only CSS. 
  This would require JavaScript to play an audio file on events like 'click' or 'mouseover'.
  Example using JavaScript:
  const clickSound = new Audio('path/to/beep.wav');
  document.getElementById('botao-busca').addEventListener('click', () => {
    clickSound.play();
  });
*/

:root {
    --black: #252525;
    --green-crt: #00ff00;
    --lime-green-matte: #00ff80;
    --pixel-red: #FF3B3B;
    --8-bit-blue: #00B5FF;
    
    --border-style: 4px solid var(--green-crt);
    --pixel-border: 4px 0 0 0 var(--green-crt), -4px 0 0 0 var(--green-crt), 0 4px 0 0 var(--green-crt), 0 -4px 0 0 var(--green-crt);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--black);
    color: var(--green-crt);
    font-family: 'VT323', monospace;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Efeito Scanlines */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    z-index: 2;
    pointer-events: none;
}

header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-bottom: var(--border-style);
    box-shadow: 0 4px 0 0 var(--green-crt);
    background-color: var(--black);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: wrap;
    gap: 1rem;
}

header h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    color: var(--lime-green-matte);
    text-shadow: 2px 2px var(--8-bit-blue);
}

.search-container {
    display: flex;
    flex-grow: 1;
    max-width: 500px;
}

.search-container input {
    width: 100%;
    min-width: 150px;
}

div input, #botao-busca {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    background-color: var(--black);
    color: var(--green-crt);
    border: none;
    padding: 10px 15px;
    box-shadow: var(--pixel-border);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

div input {
    width: 30rem;
}

div input:focus {
    outline: none;
    box-shadow: var(--pixel-border), inset 0 0 5px var(--lime-green-matte);
    color: var(--lime-green-matte);
}

div input::placeholder {
    color: var(--green-crt);
    opacity: 0.6;
}

#botao-busca {
    cursor: pointer;
    margin-left: 1rem;
    color: var(--pixel-red);
    box-shadow: var(--pixel-border);
    transition: all 0.1s linear;
}

#botao-busca:hover {
    background-color: var(--pixel-red);
    color: var(--black);
    box-shadow: 4px 0 0 0 var(--pixel-red), -4px 0 0 0 var(--pixel-red), 0 4px 0 0 var(--pixel-red), 0 -4px 0 0 var(--pixel-red);
}

#botao-busca:active {
    transform: translateY(2px);
}

main {
    max-width: 80rem;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1; 
    width: 100%;
    padding-bottom: 10rem;
}

.card {
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: var(--border-style);
    box-shadow: 4px 4px 0 0 var(--green-crt);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 8px 8px 0 0 var(--8-bit-blue);
    cursor: pointer;
}

.card h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: var(--8-bit-blue);
    margin-bottom: 1rem;
}

.card p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.card p strong {
    color: var(--lime-green-matte);
    font-weight: normal;
}

.card a {
    color: var(--pixel-red);
    text-decoration: none;
}

.card a:hover {
    text-decoration: underline;
}

.card-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-left: 1rem;
    border: var(--border-style);
    flex-shrink: 0;
}

.footer {
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-top: var(--border-style);
    box-shadow: 0 -4px 0 0 var(--green-crt);
    background-color: var(--black);
    position: fixed;
    bottom: 0;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--8-bit-blue);
    text-decoration: none;
    font-size: 1.2rem;
}

.footer-links a:hover {
    color: var(--pixel-red);
    text-decoration: underline;
}

/* Estilização da barra de rolagem */
::-webkit-scrollbar {
    width: 12px;
    background-color: var(--black);
}

::-webkit-scrollbar-thumb {
    background-color: var(--green-crt);
    border: 2px solid var(--black);
}

::-webkit-scrollbar-track {
    background-color: var(--black);
    border-left: 2px solid var(--green-crt);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .search-container {
        width: 90%;
    }

    div input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
        text-align: center;
    }

    .search-container {
        flex-direction: row;
        width: 90vw;
    }

    #botao-busca {
        margin-left: 0.5rem;
        width: auto;
        text-align: center;
        padding: 10px;
    }

    .card h2 {
        font-size: 1.2rem;
    }
}
