/* Retro-Terminal Theme & CRT Scanlines */

/* Resetting default margin and padding */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Black background for terminal */
    color: #00FF00; /* Green text for retro-terminal look */
    font-family: 'Courier New', Courier, monospace; /* Monospace font for terminal feel */
    font-size: 16px; /* Comfortable font size for readability */
}

/* Container for the terminal */
.terminal {
    width: 90%;
    max-width: 800px;
    height: 500px;
    background: #001200; /* Slightly dark green for retro terminal screen */
    border: 2px solid #00FF00;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px #00FF00;
}

/* Output area where the commands and text appear */
.output {
    width: 100%;
    height: calc(100% - 40px); /* Space for input wrapper */
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    line-height: 1.5;
    white-space: pre-wrap; /* Allows text wrapping in the terminal */
    transition: background-color 0.3s ease;
}

/* Input area */
.input-wrapper {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background-color: #002200; /* Darker green for contrast */
    border-top: 2px solid #00FF00;
    transition: background-color 0.3s ease;
}

/* Command prompt indicator */
.prompt {
    color: #00FF00;
    font-weight: bold;
    margin-right: 5px;
}

/* Input box styling */
#command-input {
    background: transparent;
    border: 1px solid #00FF00;
    outline: none;
    color: #00FF00;
    flex-grow: 1;
    font-family: inherit;
    font-size: inherit;
    caret-color: #00FF00;
    transition: border-color 0.3s ease;
}

#command-input:focus {
    border-color: #FFD700; /* Golden yellow when focused */
}

/* Audio controls section */
.audio-controls {
    margin-top: 20px;
    text-align: center;
    color: #00FF00;
}

.audio-controls input[type="range"] {
    width: 300px;
    margin: 5px;
    accent-color: #00FF00;
    transition: accent-color 0.3s ease;
}

.audio-controls input[type="range"]:focus {
    outline: 2px solid #FFD700;
}

.audio-controls label {
    display: block;
    margin-bottom: 5px;
}

#volume-value, #frequency-value {
    font-weight: bold;
}

/* Enhancing command text */
.command {
    color: #FFD700; /* Golden yellow for commands */
    font-weight: bold;
    transition: color 0.3s ease;
}

.command:hover {
    color: #FFFFFF; /* White on hover for better visibility */
}

/* CRT Scanlines Effect */
.terminal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 255, 0, 0.1) 50%, transparent 50%);
    background-size: 100% 4px; /* Controls the density of scanlines */
    pointer-events: none; /* Ensures this layer does not obstruct interaction */
    z-index: 1; /* Stays above terminal, but below the text content */
}

/* Scrollbar for terminal output */
.output::-webkit-scrollbar {
    width: 8px;
    background-color: #001200;
}

.output::-webkit-scrollbar-thumb {
    background: #00FF00;
    border-radius: 4px;
}

/* Add a subtle flicker effect for authenticity */
@keyframes crt-flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1; }
    100% { opacity: 0.95; }
}

.terminal {
    animation: crt-flicker 0.08s infinite;
}

/* Responsive styles */
@media (max-width: 600px) {
    .terminal {
        height: 400px;
    }

    .audio-controls input[type="range"] {
        width: 200px;
    }
}