:root {
    --primary-color: #6200ee;
    --primary-color-rgb: 98, 0, 238;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --background: #ffffff;
    --surface: #ffffff;
    --error: #b00020;
    --on-primary: #ffffff;
    --on-secondary: #000000;
    --on-background: #000000;
    --on-surface: #000000;
    --on-error: #ffffff;
}

/* Dark theme variables */
[class="dark-mode"] {
    --background: #121212;
    --surface: #1e1e1e;
    --primary-color: #bb86fc;
    --primary-color-rgb: 187, 134, 252;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --error: #cf6679;
    --on-primary: #000000;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --on-error: #000000;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--on-background);
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

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

.logo {
    height: 150px;
    max-width: 179px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.selection-button {
    background-color: var(--surface);
    border: none;
    border-radius: 12px;
    padding: 20px;
    color: var(--on-surface);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 120px;
}

.selection-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.selection-button .icon {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
}

.nav-header {
    margin-bottom: 20px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--on-surface);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-button svg {
    width: 24px;
    height: 24px;
    fill: var(--on-surface);
}

#player-screen {
    padding: 20px;
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.audio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#waveform {
    margin-bottom: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}

#waveform.dragging {
    cursor: grabbing;
}

#waveform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(var(--primary-color-rgb), 0.1) 0%, 
        rgba(var(--primary-color-rgb), 0) 100%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

#waveform.dragging::before {
    opacity: 1;
}

#file-selection h2 {
    text-align: center;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.control-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.control-button svg {
    width: 24px;
    height: 24px;
    fill: var(--on-surface);
    transition: fill 0.2s ease;
}


.control-button.active svg {
    fill: var(--primary-color);
}

.control-button.active {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.slider-controls {
    margin-top: 20px;
}

.slider-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.slider-group label {
    min-width: 60px;
}

input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--primary-color);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    width: 100%;
}

#speed-slider {
    flex: 1;
    width: 100%;
}

.control-group {
    width: 100%;
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--on-surface);
    font-weight: 500;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--surface);
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--on-surface);
    font-size: 1.2em;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin: 8px 0 16px;
    border: 1px solid var(--on-surface-variant);
    border-radius: 6px;
    background-color: var(--surface-variant);
    color: var(--on-surface);
    font-size: 1em;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.modal-content button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-content button.primary-button {
    background-color: var(--primary-color);
    color: var(--on-primary);
}

.modal-content button:not(.primary-button) {
    background-color: var(--surface-variant);
    color: var(--on-surface-variant);
}

.modal-content button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.modal-content button:active {
    transform: translateY(0);
}
}

.speed-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex: 1;
}

#speed-slider {
    flex: 1;
    margin: 0;
    width: auto;
}

#speed-value {
    min-width: 50px;
    text-align: right;
    order: 3;
}

#reset-speed {
    order: 2;
}

.control-button.small {
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-button.small:hover {
    opacity: 0.8;
}

.control-button.small svg {
    width: 16px;
    height: 16px;
    fill: var(--on-secondary);
    max-width: 500px;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: var(--background);
    color: var(--on-background);
}

.modal-content button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--on-primary);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .selection-grid {
        grid-template-columns: 1fr;
    }

    .main-controls {
        gap: 10px;
    }

    .slider-controls {
        padding: 0 10px;
    }
}


