/* === VARIABLES SYNTHWAVE === */
:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-purple: #bf00ff;
    --neon-yellow: #ffff00;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --grid-color: rgba(255, 0, 255, 0.15);
    --disconnect-red: #8b0000;
    --disconnect-red-hover: #ff0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--dark-bg);
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanline 8s linear infinite;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 999;
}

/* === HEADER === */
header {
    text-align: center;
    padding: 20px 20px 10px;
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
    position: relative;
}

.glitch {
    animation: glitch 3s infinite;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: var(--neon-pink);
    animation: glitch-1 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
    color: var(--neon-yellow);
    animation: glitch-2 2s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

.subtitle {
    font-size: 1rem;
    letter-spacing: 0.5em;
    color: var(--neon-pink);
    margin-top: 5px;
    text-shadow: 0 0 10px var(--neon-pink);
}

/* === MAIN === */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 20px;
    position: relative;
    z-index: 10;
}

/* === DROP ZONE === */
.drop-zone {
    border: 1px dashed var(--neon-cyan);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 10px;
    background: rgba(0, 255, 255, 0.05);
    transition: all 0.3s;
}

.drop-zone.dragover {
    background: rgba(255, 0, 255, 0.1);
    border-color: var(--neon-pink);
    transform: scale(1.01);
}

.drop-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.drop-content .icon {
    font-size: 1.3rem;
}

.drop-text {
    color: var(--neon-cyan);
    font-size: 0.9rem;
}

.or {
    color: #555;
}

.btn-small-file {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 5px 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.btn-small-file:hover {
    background: var(--neon-cyan);
    color: var(--dark-bg);
}

/* === CONTROLES SOURCES === */
.sources-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: stretch;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 12px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 140px;
}

.btn-secondary:hover, .btn-secondary.active {
    background: var(--neon-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--neon-cyan);
}

/* URL input en la misma fila */
.url-input-wrap {
    flex: 1;
    display: flex;
    min-width: 250px;
}

#urlInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-purple);
    border-right: none;
    color: #fff;
    padding: 10px 15px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    border-radius: 5px 0 0 5px;
}

#urlInput::placeholder {
    color: #666;
}

.btn-url {
    background: var(--neon-purple);
    color: #fff;
    padding: 10px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    border: 2px solid var(--neon-purple);
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-url:hover {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
}

/* === BOTÓN DESENCHUFAR === */
.btn-disconnect {
    width: 100%;
    background: var(--disconnect-red);
    border: 2px solid var(--disconnect-red);
    color: #fff;
    padding: 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.btn-disconnect:hover {
    background: var(--disconnect-red-hover);
    border-color: var(--disconnect-red-hover);
    box-shadow: 0 0 30px var(--disconnect-red-hover);
    transform: translateY(-2px);
}

.btn-disconnect:active {
    transform: translateY(0) scale(0.98);
    background: #ff3333;
}

/* === VISUALIZADOR === */
.visualizer-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(to bottom, var(--darker-bg) 0%, #1a0a2e 100%);
    border: 2px solid var(--neon-pink);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), inset 0 0 50px rgba(0, 0, 0, 0.5);
}

#visualizer {
    width: 100%;
    height: 100%;
    display: block;
}

.grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
                linear-gradient(0deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg);
    transform-origin: bottom;
    opacity: 0.5;
    pointer-events: none;
}

.btn-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 20;
}

.btn-fullscreen:hover {
    background: var(--neon-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.visualizer-container:fullscreen {
    height: 100vh;
    border-radius: 0;
    border: none;
}

.visualizer-container:fullscreen .btn-fullscreen {
    top: 20px;
    right: 20px;
}

/* === TRACK INFO === */
.track-info {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-left: 4px solid var(--neon-yellow);
}

.track-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--neon-yellow);
    margin-bottom: 3px;
}

.track-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    min-height: 1.5em;
}

/* === AUDIO CONTROLES === */
.audio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    background: transparent;
    color: var(--neon-cyan);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: var(--neon-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.stop-btn {
    border-color: var(--disconnect-red);
    color: var(--disconnect-red);
}

.stop-btn:hover {
    background: var(--disconnect-red);
    color: #fff;
    box-shadow: 0 0 20px var(--disconnect-red);
}

#volumeSlider {
    width: 120px;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--neon-pink);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-pink);
}

.volume-label {
    font-size: 0.75rem;
    color: var(--neon-cyan);
    letter-spacing: 0.2em;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.neon-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* === ANIMACIONES === */
@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-3px, 0); }
    40% { transform: translate(-3px, 0); }
    60% { transform: translate(3px, 0); }
    80% { transform: translate(3px, 0); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(3px, 0); }
    40% { transform: translate(3px, 0); }
    60% { transform: translate(-3px, 0); }
    80% { transform: translate(-3px, 0); }
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .subtitle { font-size: 0.8rem; letter-spacing: 0.3em; }
    .visualizer-container { height: 300px; }
    .sources-row { flex-wrap: wrap; }
    .url-input-wrap { min-width: 100%; margin-top: 10px; }
    .btn-secondary { flex: 1; min-width: 120px; }
}