/* Define ZX Spectrum's classic 8-color palette */
:root {
    --zx-black: #000000;
    --zx-blue: #0000AA;
    --zx-red: #AA0000;
    --zx-magenta: #AA00AA;
    --zx-green: #00AA00;
    --zx-cyan: #00AAAA;
    --zx-yellow: #AAAA00;
    --zx-white: #AAAAAA;
}
@font-face {
    font-family: 'ZX Spectrum';
    src: url('fonts/zx_spectrum-7.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    font-family: 'ZX Spectrum', monospace; /* Fallback to monospace if the custom font fails to load */
    background-color: var(--zx-black);
    color: var(--zx-white);
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.container::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 200px; /* Set the width of the rainbow effect */
    height: 75px; /* Set the height of the rainbow effect */
    background: linear-gradient(135deg, 
        var(--zx-red) 25%, 
        var(--zx-yellow) 25% 50%, 
        var(--zx-green) 50% 75%, 
        var(--zx-cyan) 75%);
    z-index: -1; /* Ensure it does not cover content */
}

header {
    background-color: var(--zx-blue);
    color: var(--zx-yellow);
    width: 100%;
    padding: 15px 0;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

button {
    background-color: var(--zx-red);
    color: var(--zx-white);
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 20px;
}

button:hover {
    background-color: var(--zx-magenta);
}

#clearButton {
    margin-left: 10px; /* Space between the input box and the button */
    padding: 5px 10px; /* Padding for aesthetics */
    cursor: pointer; /* Cursor indicator for usability */
}

footer {
    background-color: var(--zx-cyan);
    color: var(--zx-black);
    width: 100%;
    padding: 10px 0;
}

#playerContainer {
    margin-top: 20px;
    width: 80%;
    max-width: 600px;
}

audio {
    width: 100%; /* Makes the audio player responsive */
}

.instructions {
    margin: 20px 0;
    padding: -110px;
    background-color: var(--zx-blue);
    color: var(--zx-yellow);
    border: 2px dashed var(--zx-magenta);
    font-size: 16px; /* Adjust size to your preference */
}

#suggestions {
    position: fixed;  /* Use fixed to keep it in view regardless of scrolling */
    top: 50%;         /* Start at 50% from the top */
    left: 50%;        /* Start at 50% from the left */
    transform: translate(-50%, -50%); /* Shift back by 50% of its own width and height */
    width: 300px;     /* Set a specific width or as needed */
    max-height: 300px;
    overflow-y: auto; /* Allow scrolling inside the dropdown */
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;    /* Make sure it's above other content */
    display: none;    /* Initially hidden */
}

#suggestions li:hover {
    background-color: #f0f0f0; /* Light grey background on hover */
}

@media (max-width: 600px) {
    .instructions {
        font-size: 14px;
    }
    button {
        padding: 8px 16px;
        font-size: 16px;
    }
    .container::after {
        width: 150px;  /* Smaller width for smaller devices */
        height: 105px;  /* Smaller height for smaller devices */
    }
}

/* Load Google Fonts for that retro, pixelated look */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');


.new-feature {
    margin-top: 15px;
    font-size: 18px;
    font-family: 'Press Start 2P', cursive;
    background-color: var(--zx-yellow);
    color: var(--zx-red);
    padding: 10px;
    border: 3px dashed var(--zx-red);
    border-radius: 8px;
    display: inline-block;
    animation: blink 1s step-start 0s infinite;
}

.new-feature a {
    text-decoration: none;
    color: inherit;
}

@keyframes blink {
    50% { opacity: 0; }
}
