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

body {
    background-color: #000;
    color: #0ffab3; /* Mint green */
    font-family: 'Courier New', monospace;
    line-height: 1.2;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

/* CRT Screen Effect */
.crt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 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% 2px, 3px 100%;
    pointer-events: none;
    z-index: 100;
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 30, 0, 0.3) 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 101;
}

/* Flicker animation */
@keyframes flicker {
    0% { opacity: 0.9; }
    5% { opacity: 0.8; }
    10% { opacity: 0.95; }
    15% { opacity: 0.85; }
    20% { opacity: 0.98; }
    25% { opacity: 0.87; }
    30% { opacity: 1; }
    70% { opacity: 0.98; }
    80% { opacity: 0.97; }
    90% { opacity: 0.94; }
    100% { opacity: 1; }
}

/* Terminal glow */
@keyframes terminalGlow {
    0% { box-shadow: 0 0 10px #0ffab3, inset 0 0 10px #0ffab3; }
    50% { box-shadow: 0 0 15px #0ffab3, inset 0 0 15px #0ffab3; }
    100% { box-shadow: 0 0 10px #0ffab3, inset 0 0 10px #0ffab3; }
}

.terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    border: 2px solid #0ffab3;
    animation: flicker 0.1s infinite alternate, terminalGlow 3s infinite ease-in-out;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 15px;
}

.terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(0deg, transparent 95%, rgba(160, 240, 160, 0.2) 100%),
        linear-gradient(90deg, transparent 95%, rgba(160, 240, 160, 0.2) 100%),
        linear-gradient(180deg, transparent 95%, rgba(160, 240, 160, 0.2) 100%),
        linear-gradient(270deg, transparent 95%, rgba(160, 240, 160, 0.2) 100%);
    background-size: 10px 10px;
    pointer-events: none;
    z-index: -1;
}

.header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    border-bottom: 1px solid #0ffab3;
    padding-bottom: 5px;
}

.title {
    font-size: 1.5em;
    letter-spacing: 3px;
    text-shadow: 0 0 5px #a0f0a0;
}

.version {
    color: #0ffab3;
    font-size: 1em;
}

/* HUD Elements */
.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #0ffab3;
    z-index: 5;
}

.hud-top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.hud-top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
}

.hud-bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
}

.hud-bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.hud-line {
    position: absolute;
    background-color: #0ffab3;
    z-index: 5;
}

.hud-horizontal {
    height: 2px;
    width: 40px;
}

.hud-vertical {
    width: 2px;
    height: 40px;
}

.hud-line-top {
    top: -2px;
    left: 40px;
}

.hud-line-right {
    top: 40px;
    right: -2px;
}

.hud-line-bottom {
    bottom: -2px;
    left: 40px;
}

.hud-line-left {
    top: 40px;
    left: -2px;
}

.system-messages {
    background-color: #000000;
    border: 2px solid #0ffab3;
    border-radius: 3px;
    padding: 15px;
    height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px #000;
}

.system-messages::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        #000000,
        transparent 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
}

.display-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.4;
    white-space: pre-wrap;
    animation: textGlow 2s infinite alternate;
    height: 100%;
    overflow-y: auto;
}

@keyframes textGlow {
    from { text-shadow: 0 0 2px #a0f0a0; }
    to { text-shadow: 0 0 5px #a0f0a0, 0 0 10px #a0f0a0; }
}

.playlist-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    height: calc(100% - 20px);
    overflow: hidden;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: #000000;
    border: 1px solid #0ffab3;
    border-radius: 3px;
}

/* Playlist container */
.playlist {
    flex-grow: 1;
    overflow-y: auto;
    border: 1px solid #0ffab3;
    border-radius: 3px;
    background-color: #000000;
    box-shadow: inset 0 0 10px #000;
    padding: 5px;
}

.playlist-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px dotted #0ffab3;
    transition: all 0.2s;
}

.playlist-item:hover {
    background-color: #00502e;
}

.playlist-item.active {
    color: #fff;
    background-color: #00502e;
    border-left: 3px solid #0ffab3;
}

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

.btn {
    background-color: #000000;
    color: #0ffab3;
    border: 2px solid #0ffab3;
    border-radius: 3px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 1.1em;
}

.btn:hover {
    background-color: #00502e;
    color: #0ffab3;
    box-shadow: 0 0 10px #a0f0a0;
}

.btn:active {
    transform: translateY(1px);
}

.btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 45%,
        rgba(160, 240, 160, 0.3) 50%,
        transparent 55%
    );
    transform: rotate(30deg);
    animation: btnShine 3s infinite linear;
}

@keyframes btnShine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.btn-large {
    grid-column: span 2;
}

.volume-control {
    grid-column: span 5;
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 8px;
    background: #002000;
    outline: none;
    border: 1px solid #0ffab3;
    border-radius: 3px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #a0f0a0;
    cursor: pointer;
    box-shadow: 0 0 5px #a0f0a0;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 1em;
    color: #0ffab3;
    border-top: 1px solid #0ffab3;
    padding-top: 10px;
}

/* Terminal cursor animation */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background-color: #a0f0a0;
    animation: blink 1s infinite;
    vertical-align: middle;
}

/* Matrix rain effect in background */
.matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Digital clock */
.digital-clock {
    position: absolute;
    top: 25px;
    right: 25px;
    font-family: 'Courier New', monospace;
    font-size: 1.5em;
    color: #0ffab3;
    text-shadow: 0 0 10px #a0f0a0;
    z-index: 10;
    background: #000000;
    padding: 10px 15px;
    border: 2px solid #0ffab3;
    border-radius: 5px;
}

.clock-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Equalizer animation */
.equalizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    display: flex;
    gap: 3px;
    padding: 0 10px;
}

.equalizer-bar {
    flex-grow: 1;
    background-color: #0ffab3;
    animation: equalizer 1s infinite alternate;
    animation-delay: calc(var(--order) * 0.1s);
    opacity: 0.5;
}

@keyframes equalizer {
    0% { height: 10%; }
    100% { height: 100%; }
}


}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #001000;
}

::-webkit-scrollbar-thumb {
    background: #60a060;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0f0a0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .terminal {
        padding: 10px;
    }
    
    .controls {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .btn {
        padding: 8px;
        font-size: 1em;
    }
    
    .volume-control {
        grid-column: span 3;
    }
    
    .digital-clock {
        top: 15px;
        right: 15px;
        font-size: 1.2em;
        padding: 8px 12px;
    }
}