@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Source Code Pro', monospace;
    overflow: hidden;
    background: #0A0A0A;
    color: #E5E5E5;
    margin: 0;
    padding: 0;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(15, 15, 32, 0.9) 0%, rgba(10, 10, 24, 0.85) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    color: #F4D03F;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.25);
    transform: translateX(-4px);
    color: #D4AF37;
}

.back-button::before {
    content: '←';
    font-size: 1.2rem;
}

#header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    pointer-events: none;
}

#header h1 {
    font-size: 2em;
    font-weight: 700;
    color: #D4AF37;
    margin: 0;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 40px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

#header p {
    font-size: 0.95em;
    color: #B8B8B8;
    margin: 8px 0 0 0;
    letter-spacing: 0.5px;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#controls {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 340px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 24px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 80px rgba(212, 175, 55, 0.1);
}

#controls h2 {
    margin-bottom: 20px;
    color: #D4AF37;
    font-size: 1.4em;
    font-weight: 700;
    border-bottom: 2px solid #D4AF37;
    padding-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#controls h3 {
    margin-top: 15px;
    margin-bottom: 12px;
    color: #F4D03F;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.control-section {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.control-section:last-child {
    border-bottom: none;
}

select, input[type="range"] {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: #E5E5E5;
    font-size: 0.9em;
    font-family: 'Source Code Pro', monospace;
    transition: all 0.3s ease;
}

select:focus, input[type="range"]:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

select:hover {
    border-color: #F4D03F;
}

label {
    display: block;
    margin: 10px 0;
    font-size: 0.9em;
    cursor: pointer;
}

input[type="checkbox"], input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

input[type="range"] {
    cursor: pointer;
    accent-color: #D4AF37;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #F4D03F;
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-group label {
    margin: 0;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.radio-group label:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #D4AF37;
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
    border: none;
    border-radius: 6px;
    color: #0A0A0A;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Source Code Pro', monospace;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #F4D03F 0%, #D4AF37 100%);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

#info {
    margin-top: 24px;
    padding: 16px;
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid #D4AF37;
    border-radius: 6px;
    font-size: 0.85em;
    line-height: 1.6;
}

#info p {
    margin: 6px 0;
    line-height: 1.5;
    color: #B8B8B8;
}

#selectedPoint {
    color: #F4D03F;
    font-weight: 600;
    font-family: 'Source Code Pro', monospace;
}

#arrowControls, #volumeControls {
    display: none;
}

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

#controls::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

#controls::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

#controls::-webkit-scrollbar-thumb:hover {
    background: #F4D03F;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #header {
        top: 10px;
        left: 10px;
    }
    
    #header h1 {
        font-size: 1.5em;
    }
    
    #header p {
        font-size: 0.8em;
    }
    
    #controls {
        width: calc(100vw - 40px);
        top: auto;
        bottom: 20px;
        max-height: 50vh;
    }
}
