:root {
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary-color: #8b5cf6;
    --primary-hover: #a78bfa;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --slider-track: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.app-container {
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.player-card {
    padding: 2.5rem;
    transition: all 0.3s ease;
}

/* File Upload Styles */
.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.upload-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.upload-btn:active {
    transform: translateY(0);
}

.file-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Audio Player Styles */
.audio-container {
    margin-top: 1rem;
    animation: fadeIn 0.5s ease;
}

.audio-container.hidden {
    display: none;
}

audio {
    display: none;
}

/* Custom Player Styles */
.custom-player {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
}

.control-btn {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
    flex-shrink: 0;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.play-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.time-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: center;
}

.progress-slider {
    flex-grow: 1;
}

/* Controls Section */
.controls-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.speed-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.speed-control-header label {
    font-weight: 600;
    font-size: 1.1rem;
}

.speed-badge {
    background: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Slider Styles */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.speed-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 35px;
}

.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--slider-track);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Quick Speeds */
.quick-speeds {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.speed-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
}

.speed-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.speed-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    body { padding: 1rem; }
    .player-card { padding: 1.25rem; }
    header h1 { font-size: 2rem; }
    .quick-speeds { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
    .speed-btn { flex-basis: 30%; padding: 0.75rem 0.5rem; }
}
