:root {
    --text-orange: #ff9d00;
    --text-white: #ffffff;
    --text-cyan: #00ffff;
    --text-red: #ff3333;
    --text-green: #00ff00;
    --text-yellow: #ffff00;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.4);
    --blur-amount: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    background-image: url('galaxy_background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 10px 0; /* Reduced padding */
}

#starfield {
    display: none;
}

.container {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced gap */
    padding: 0 10px; /* Reduced padding */
}

.panel {
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px; /* Smaller radius */
    padding: 10px 15px; /* Reduced padding */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Section 1 Specifics */
.logo-text {
    color: var(--text-orange);
    font-size: 1.4rem; /* Reduced font size */
    font-weight: 700;
    margin-bottom: 8px; /* Reduced margin */
    text-shadow: 0 0 10px rgba(255, 157, 0, 0.3);
}

.browser-box {
    width: 100%;
    border: 1px solid #fff;
    border-radius: 15px;
    padding: 8px; /* Reduced padding */
    margin-bottom: 10px; /* Reduced margin */
    position: relative;
    min-height: 80px; /* Reduced height */
}

.browser-header {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.progress-line {
    width: 100%;
    height: 1px;
    background: #fff;
    margin-bottom: 5px;
}

#waveform-visualizer {
    width: 100%;
    height: 40px; /* Reduced height */
}

.file-name {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browse-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Transport Buttons */
.transport-group {
    display: flex;
    gap: 10px; /* Reduced gap */
}

.transport-group.center {
    justify-content: center;
}

.btn-transport {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px; /* Reduced padding */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem; /* Reduced font size */
}

.install-btn {
    background: rgba(255, 157, 0, 0.2);
    border-color: rgba(255, 157, 0, 0.5);
    color: #ff9d00;
}

.install-btn:hover {
    background: rgba(255, 157, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 157, 0, 0.5);
}

.btn-transport:hover {
    transition: background 0.2s;
}

.btn-transport:active {
    background: rgba(255, 255, 255, 0.1);
}

.icon-stop {
    width: 12px; /* Reduced size */
    height: 12px;
    border: 1.5px solid var(--text-red);
    border-radius: 2px;
}

.icon-play {
    width: 14px; /* Reduced size */
    height: 14px;
    background: transparent;
    position: relative;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
    background: var(--text-green);
}

.icon-play::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 8px; /* Adjusted mask */
    height: 10px;
    background: #000;
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
}

.icon-pause {
    width: 12px; /* Reduced size */
    height: 12px;
    display: flex;
    gap: 3px;
}

.icon-pause::before,
.icon-pause::after {
    content: '';
    flex: 1;
    border: 1.5px solid var(--text-yellow);
}

.btn-transport.active {
    background: rgba(255, 157, 0, 0.2);
    border-color: var(--text-orange);
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
}

.icon-loop {
    font-size: 1rem;
}

/* Section Labels */
.panel-label {
    color: var(--text-orange);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    margin: 5px 0; /* Reduced margin */
}

/* Slider Container */
.slider-container {
    width: 100%;
    padding: 5px 0; /* Reduced padding */
    display: flex;
    justify-content: center;
}

#tone-volume-slider {
    -webkit-appearance: none;
    width: 80%;
    height: 3px; /* Thinner */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#tone-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px; /* Smaller thumb */
    height: 14px;
    background: var(--text-orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
}

#tone-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--text-orange);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
}

/* Knobs */
.knob-row {
    display: flex;
    gap: 15px; /* Reduced gap */
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.knob-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.knob {
    width: 90px; /* Significantly reduced from 130px */
    height: 90px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.knob-side-label {
    position: absolute;
    top: 15px; /* Adjusted pos */
    font-size: 0.9rem;
    font-weight: 800;
}

.knob-side-label.red {
    color: var(--text-red);
}

.knob-side-label.cyan {
    color: var(--text-cyan);
}

.knob-value {
    color: var(--text-green);
    font-size: 1rem;
    font-weight: 800;
    margin-top: 10px;
}

.knob-indicator {
    position: absolute;
    width: 8px; /* Smaller indicator */
    height: 8px;
    background: var(--text-red);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--text-red);
    pointer-events: none;
}

.footer-label {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 5px;
}