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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

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

.visualizer-select {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
}

.visualizer-select label {
    font-size: 16px;
}

.visualizer-select select {
    padding: 8px 15px;
    font-size: 16px;
    border-radius: 15px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.visualizer-select select option {
    background: #764ba2;
    color: white;
}

.audio-source {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
}

.audio-source > label {
    font-size: 16px;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-label span {
    user-select: none;
}

.status {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-weight: 500;
    font-size: 14px;
}

#visualizer {
    width: 100%;
    height: 500px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Fullscreen styles */
.container:fullscreen {
    max-width: 100%;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    background: black;
}

.container:fullscreen #visualizer {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.container:fullscreen header,
.container:fullscreen .controls,
.container:fullscreen .status {
    display: none;
}

/* Fullscreen exit hint */
.container:fullscreen::after {
    content: 'Press ESC to exit fullscreen';
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none;
    animation: fadeOut 3s forwards;
    z-index: 1000;
}

@keyframes fadeOut {
    0%, 70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .controls {
        flex-direction: column;
    }

    #visualizer {
        height: 300px;
    }
}
