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

body {
    background: #000000;
    color: #00FAB3;
    font-family: 'SF Mono', 'JetBrains Mono', 'Courier New', monospace;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.terminal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    border: 1.5px solid #00FAB3;
    box-shadow: 0 0 8px rgba(0, 250, 179, 0.3);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 250, 179, 0.02) 0px, rgba(0, 250, 179, 0.02) 2px, transparent 2px, transparent 6px);
    pointer-events: none;
    z-index: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #00FAB3;
    padding-bottom: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
    z-index: 2;
}

.title img {
    max-width: 180px;
    height: auto;
    display: block;
    filter: brightness(1.05);
}

.digital-clock {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: bold;
    background: #000000cc;
    backdrop-filter: blur(2px);
    padding: 4px 12px;
    border: 1px solid #00FAB3;
    letter-spacing: 1px;
}

.system-messages {
    background: #000;
    border: 1px solid #00FAB3;
    padding: 6px 10px;
    height: 70px;
    overflow: hidden;
    z-index: 2;
}

.display-text {
    font-size: 0.7rem;
    line-height: 1.3;
    white-space: pre-wrap;
    height: 100%;
    overflow-y: auto;
    font-family: monospace;
    scrollbar-width: thin;
}

.nav-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 4px 0;
    z-index: 2;
}

.nav-btn {
    background: #000;
    color: #00FAB3;
    border: 1px solid #00FAB3;
    padding: 6px 4px;
    font-size: 0.7rem;
    font-family: monospace;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.1s;
}

.nav-btn i {
    font-size: 0.85rem;
}

.nav-btn:hover {
    background: #00502e;
    box-shadow: 0 0 5px #00FAB3;
}

.music-mode-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    z-index: 2;
}

.artist-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    border: 1px solid #00FAB3;
    padding: 6px 12px;
}

.artist-dropdown {
    background: #000;
    color: #00FAB3;
    border: 1px solid #00FAB3;
    padding: 5px 8px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
}

.artist-count {
    font-size: 0.7rem;
    background: #0a1a0a;
    padding: 2px 8px;
    border: 1px solid #00FAB3;
}

.playlist-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.playlist {
    border: 1px solid #00FAB3;
    background: #000;
    padding: 5px 2px;
    overflow-y: auto;
    flex: 1;
}

.playlist-item {
    padding: 6px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    border-bottom: 0.5px dotted #00FAB3;
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

.playlist-item:hover {
    background: #003d24;
}

.playlist-item.active {
    background: #00502e;
    color: #fff;
    border-left: 3px solid #00FAB3;
    font-weight: bold;
}

.controls {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin: 5px 0;
}

.btn {
    background: #000;
    color: #00FAB3;
    border: 1px solid #00FAB3;
    padding: 6px 2px;
    font-size: 0.65rem;
    font-family: monospace;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: #00502e;
}

.progress-control, .volume-control {
    grid-column: span 6;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.7rem;
}

.progress-slider, .volume-slider {
    flex: 1;
    height: 4px;
    background: #001800;
    border: 1px solid #00FAB3;
    -webkit-appearance: none;
}

.progress-slider::-webkit-slider-thumb, .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #00FAB3;
    border-radius: 0;
    cursor: pointer;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #00FAB3;
    padding-top: 6px;
    margin-top: 4px;
    font-size: 0.65rem;
    font-weight: bold;
}

.movies-mode-container {
    display: none;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    z-index: 2;
}

.movie-section-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

@media (min-width: 768px) {
    .movie-section-grid {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 12px;
    }
}

.video-section {
    background: #000;
    border: 1px solid #00FAB3;
    line-height: 0;
}

video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    max-height: 62vh;
    object-fit: contain;
}

.movie-directory {
    border: 1px solid #00FAB3;
    padding: 12px;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.movie-directory h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    border-bottom: 1px solid #00FAB3;
    width: fit-content;
}

.search-box input {
    width: 100%;
    background: #000;
    border: 1px solid #00FAB3;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 0.75rem;
    color: #00FAB3;
    outline: none;
}

.movie-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    margin-top: 12px;
    scrollbar-width: thin;
}

.movie-list li {
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid rgba(0, 250, 179, 0.3);
    cursor: pointer;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.1s;
}

.movie-list li:hover {
    background: rgba(0, 250, 179, 0.12);
    border-color: #00FAB3;
}

.movie-list li.active {
    background: #00FAB3;
    color: #000;
    font-weight: bold;
}

.movie-list li.hidden {
    display: none;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.94);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup-window {
    background: #000;
    border: 2px solid #00FAB3;
    width: 540px;
    max-width: 92vw;
    height: 460px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    background: #051a0a;
    border-bottom: 1px solid #00FAB3;
}

.popup-close {
    background: none;
    border: none;
    color: #00FAB3;
    font-size: 1.2rem;
    cursor: pointer;
}

.popup-content {
    padding: 14px;
    font-size: 0.7rem;
    overflow-y: auto;
    font-family: monospace;
    flex: 1;
    white-space: pre-wrap;
}

#chatPopup .popup-window {
    width: 90vw;
    height: 85vh;
    max-width: 1300px;
}

#chatPopup iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00FAB3;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #001000; }
::-webkit-scrollbar-thumb { background: #00FAB3; }
