@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
    padding: 20px;
}

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

header .tagline {
    font-size: 1.2em;
    color: #d0d0ff;
    margin-top: 10px;
}

main.container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.9em;
    color: #d0d0ff;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

#loading-indicator, 
#auto-loading-indicator {
    animation: pulse 2s infinite;
}

h1, h2, h3, h4 {
    color: #fff;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

h2 {
    margin-bottom: 25px;
}

h3 {
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #e0e0ff;
}

.description {
    text-align: center;
    margin-bottom: 25px;
    color: #e0e0ff;
    max-width: 600px;
    line-height: 1.5;
}

.controls, #player {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 20px auto;
    width: 90%;
    max-width: 650px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#player {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#player:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

input[type="file"] {
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    border: none;
}

input[type="file"]::file-selector-button {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.mode-selector {
    text-align: center;
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(0,0,0, 0.1);
    padding: 15px;
    border-radius: 8px;
}

.control-group label {
    margin-right: 15px;
    min-width: 200px;
    flex-basis: 200px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #e0e0ff;
}

input[type="range"] {
    flex-grow: 1;
    min-width: 150px;
    margin-right: 15px;
    cursor: pointer;
    height: 8px;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
    vertical-align: middle;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
     width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
     box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.control-group span,
.manual-controls .control-row span {
    min-width: 50px;
    text-align: right;
    font-family: monospace;
    font-size: 1.1em;
    color: #fff;
    font-weight: bold;
    display: inline-block;
    vertical-align: middle;
}

.control-group select {
  background: #fff;
  color: #667eea;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
  font-size: 1em;
}

.control-group select:focus {
  outline: 2px solid #667eea;
}

.playback-controls {
    text-align: center;
    margin-top: 30px;
}

.playback-controls button {
    padding: 12px 25px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.playback-controls button:hover:not(:disabled) {
    transform: scale(1.05);
}

.playback-controls button:active:not(:disabled) {
    transform: scale(0.98);
}

.playback-controls button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#stop-button {
    background-color: #f44336;
}

#stop-button:hover:not(:disabled) {
    background-color: #d32f2f;
}

.hidden {
    display: none !important;
}

.auto-info {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
}
.auto-info p {
    margin: 5px 0;
    text-align: center;
    color: #d0d0ff;
}
.auto-info ul {
    list-style: none;
    padding: 0;
    margin: 10px auto;
    font-family: monospace;
    font-size: 0.9em;
    color: #fff;
    text-align: left;
    display: inline-block;
}
.auto-info li {
    margin-bottom: 5px;
}
.ai-note {
    font-size: 0.85em;
    font-style: italic;
    color: #b0b0d0 !important;
    margin-top: 10px !important;
}

.manual-mode {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}
.manual-mode label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.manual-mode input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

#manual-controls {
    text-align: center;
    padding: 20px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-top: 10px;
}
#manual-controls h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}
#manual-controls label {
    font-weight: normal;
    color: #e0e0ff;
    font-size: 1em;
}
#manual-controls input[type="range"] {
    width: 80%;
    margin: 10px 0;
}

.true-manual-eq {
    text-align: center;
    margin-top: 20px;
}

.manual-eq-controls {
    margin-top: 10px;
}

.slider-note {
    font-size: 0.85em;
    color: #d0d0ff;
    margin-top: 5px;
    text-align: center;
}

@media (max-width: 600px) {
    .control-group label {
        min-width: 150px;
        flex-basis: 150px;
    }
    .controls, #player {
        padding: 20px;
    }
}

.eq-warning {
    color: #ffa500;
    margin-left: 10px;
    font-weight: bold;
}

.graphic-eq-toggle {
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
}

.graphic-eq-container {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 650px;
    text-align: center;
}

.graphic-eq-sliders {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    margin-top: 15px;
}

.graphic-eq-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px;
}

.graphic-eq-slider {
    transform: rotate(-90deg);
    width: 150px;
    margin: 5px 0;
}

.graphic-eq-label {
    font-size: 0.8em;
    margin-bottom: 5px;
    color: #fff;
}

.graphic-eq-freq-label {
    font-size: 0.8em;
    margin-top: 5px;
    color: #e0e0ff;
}