* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #141422, #1f1f35, #28284a);
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
}

header {
    position: absolute;
    top: 20px;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(100, 100, 255, 0.5);
    z-index: 10;
}

#glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 0 60px rgba(95, 95, 255, 0.3);
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    width: 90%;
    max-width: 500px;
}

#glass:hover {
    transform: scale(1.03);
    box-shadow: 0 0 90px rgba(95, 95, 255, 0.6);
}

.playButton {
    background: linear-gradient(135deg, #5f5fff, #3f3fff);
    border: none;
    border-radius: 10px;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    color: white;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(95, 95, 255, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin: 8px 0;
    text-align: center;
    font-weight: bold;
}

.playButton:hover {
    transform: scale(1.05);
    box-shadow: 0 0 70px rgba(95, 95, 255, 0.9);
}

.playButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.playButton.playing {
    background: linear-gradient(135deg, #ff5f5f, #ff3f3f);
}

#songTitle {
    margin-top: 20px;
    font-size: 1.1em;
    opacity: 0.8;
}

#visualizer {
    width: 100%;
    height: 120px;
    margin-top: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    display: block;
    position: relative;
    overflow: hidden;
}

.bar {
    position: absolute;
    bottom: 0;
    width: 3%;
    background: linear-gradient(to top, #5f5fff, #3f3fff);
    border-radius: 3px 3px 0 0;
    transition: height 0.1s ease;
}

#customStream {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#streamInput {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    outline: none;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    font-size: 1.1em;
    text-align: center;
}

#streamInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#setStreamButton {
    background: rgba(95, 95, 255, 0.8);
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    width: 100%;
    transition: background 0.3s;
    font-size: 1.1em;
}

#setStreamButton:hover {
    background: rgba(95, 95, 255, 1);
}

#loadingMessage {
    margin-top: 20px;
    font-size: 0.95em;
    opacity: 0.7;
    display: none;
}

footer {
    position: absolute;
    bottom: 10px;
    font-size: 0.9em;
    opacity: 0.6;
}

@media (max-width: 600px) {
    header {
        font-size: 1.8em;
        top: 15px;
    }

    #glass {
        padding: 25px 15px;
    }

    .playButton {
        font-size: 16px;
        padding: 12px;
    }

    #visualizer {
        height: 100px;
    }
}

@media (max-width: 400px) {
    header {
        font-size: 1.5em;
        top: 10px;
    }

    #glass {
        padding: 20px 10px;
    }

    .playButton {
        font-size: 14px;
        padding: 10px;
    }

    #visualizer {
        height: 80px;
    }
}
