@font-face {
    font-family: 'Pixel Operator';
    src: url('fonts/PixelOperator.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pixel Operator';
    src: url('fonts/PixelOperator-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

body {
    background-color: #0A0D11;
    color: #D2E4C7;
    font-family: 'Pixel Operator', 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative; /* Context for top-bar-container */
}

.top-bar-container {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Push audio player to the right */
    padding: 20px; /* Space from top/right edges */
    box-sizing: border-box; /* Include padding in width */
    position: absolute; /* Position it above other content */
    top: 0;
    left: 0;
    z-index: 10;
}

.audio-player {
    background-color: #1c2128; /* Slightly darker than body background */
    border: 2px solid #D2E4C7;
    padding: 5px 10px; /* Adjusted padding for compactness */
    margin-bottom: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px; /* Adjusted gap for compactness */
}

.audio-player h2 {
    font-size: 1.2em; /* Adjusted font size for compactness */
    color: #D2E4C7;
    margin: 0;
    text-shadow: 0 0 5px #D2E4C7;
}

.audio-player button {
    background-color: #4a4f55; /* Button background */
    color: #D2E4C7;
    border: 1px solid #D2E4C7;
    padding: 5px 10px;
    font-family: 'Pixel Operator', monospace;
    font-size: 0.9em; /* Adjusted font size for compactness */
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.audio-player button:hover {
    background-color: #D2E4C7;
    color: #1c2128;
}

.main-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.tv-container {
    position: relative;
    width: 611px;
    height: 630px;
    background-image: url('assets/asset_pc.png');
    background-repeat: no-repeat;
    background-size: 100% 100%; /* Match container size exactly */
    image-rendering: pixelated;
    image-rendering: crisp-edges; /* For broader compatibility */
}

.tv-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tv-screen {
    position: absolute;
    top: 142px; 
    left: 183px;
    width: 300px;
    height: 265px;
    background: #000;
    overflow: hidden;
    z-index: 1;
}

#screen-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.button-nav {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 40px;
    text-decoration: none;
    cursor: pointer;
}

.nav-button {
    width: 120px;
    height: 120px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.nav-text {
    color: #D2E4C7;
    font-size: 2.5em;
    transition: color 0.3s;
    text-shadow: 0 0 5px #D2E4C7;
}

.nav-item:hover .nav-text {
    color: #a0f080;
    text-shadow: 0 0 10px #a0f080;
}

/* Volume Slider Styles */
#volume-slider {
    -webkit-appearance: none; /* Override default CSS styles */
    appearance: none;
    width: 100px; /* Specific width */
    height: 8px; /* Specific height */
    background: #4a4f55; /* Track background color */
    outline: none; /* Remove focus outline */
    border-radius: 4px; /* Rounded corners for the track */
    cursor: pointer;
    border: 1px solid #D2E4C7;
}

/* For Chrome, Safari, Edge, Opera */
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; /* Thumb width */
    height: 18px; /* Thumb height */
    background: #D2E4C7; /* Thumb color */
    border-radius: 50%; /* Make it circular */
    border: 1px solid #1c2128;
    cursor: pointer;
    margin-top: -5px; /* Adjust thumb position */
}

/* For Firefox */
#volume-slider::-moz-range-thumb {
    width: 18px; /* Thumb width */
    height: 18px; /* Thumb height */
    background: #D2E4C7; /* Thumb color */
    border-radius: 50%; /* Make it circular */
    border: 1px solid #1c2128;
    cursor: pointer;
}

#volume-slider::-moz-range-track {
    background: #4a4f55; /* Track background color */
    border-radius: 4px;
    border: none;
}

/* Speaker Icon */
#speaker-icon {
    font-size: 1.5em;
    color: #D2E4C7;
    margin-left: 5px;
}

/* Audio Visualizer */
.audio-visualizer {
    display: flex;
    align-items: flex-end; /* Align characters to the bottom */
    gap: 4px;
    height: 30px; /* Container height for character movement */
    width: 40px;
    overflow: hidden; /* Hide characters that move outside this area */
    color: #D2E4C7; /* Changed color to match text */
    font-size: 2em; /* Size of the characters */
    line-height: 1; /* Adjust line height for better control */
}

.visualizer-char {
    display: inline-block;
    position: relative;
    width: 0.8em;
    text-align: center;
    top: 0;
    transition: top 0.1s ease-out; /* Smooth transition for the jump */
}