/* Reproductor de Bases - Neo-Brutalist & Adventure Time Aesthetic */
:root {
    --bg-color: #fdfaf6;
    --accent-yellow: #fce277;
    --accent-blue: #7bb5e3;
    --accent-pink: #ffb8d9;
    --accent-green: #bcebda;
    --text-color: #2b2b2b;
    --border-color: #2b2b2b;
    --border-width: 2px;
    --shadow: 4px 4px 0 0 var(--border-color);
    --shadow-hover: 6px 6px 0 0 var(--border-color);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-full: 999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    line-height: 1.5;
}

.bg-pattern {
    background-image: radial-gradient(rgba(43, 43, 43, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 0 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Floating Clouds Animation */
.cloud {
    position: absolute;
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50px;
    z-index: 0;
    animation: float linear infinite;
    opacity: 0.8;
}

.cloud-1 { width: 80px; height: 25px; top: 15%; left: -100px; animation-duration: 35s; }
.cloud-1::before { content: ''; position: absolute; background: white; border: var(--border-width) solid var(--border-color); border-radius: 50%; width: 40px; height: 40px; top: -20px; left: 10px; z-index: -1;}
.cloud-1::after { content: ''; position: absolute; background: white; border: var(--border-width) solid var(--border-color); border-radius: 50%; width: 30px; height: 30px; top: -15px; right: 10px; z-index: -1;}

.cloud-2 { width: 120px; height: 35px; top: 80%; left: -150px; animation-duration: 45s; animation-delay: 10s; transform: scale(0.8); }
.cloud-2::before { content: ''; position: absolute; background: white; border: var(--border-width) solid var(--border-color); border-radius: 50%; width: 55px; height: 55px; top: -25px; left: 15px; z-index: -1;}
.cloud-2::after { content: ''; position: absolute; background: white; border: var(--border-width) solid var(--border-color); border-radius: 50%; width: 40px; height: 40px; top: -20px; right: 15px; z-index: -1;}

@keyframes float {
    from { transform: translateX(-20vw); }
    to { transform: translateX(120vw); }
}

/* Header */
header {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    z-index: 10;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    box-shadow: 3px 3px 0 0 var(--border-color);
    transition: all 0.2s;
}

.back-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 var(--border-color);
}

.logo-container {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.logo-container img {
    height: 50px;
    filter: drop-shadow(2px 2px 0px var(--border-color));
}

/* Player Container */
.player-card {
    width: 100%;
    max-width: 500px;
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.track-info {
    text-align: center;
    margin-bottom: 2rem;
}

.track-art {
    width: 200px;
    height: 200px;
    background-color: var(--accent-green);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 4px 4px 0 0 var(--border-color);
}

.track-art i {
    font-size: 5rem;
    color: var(--text-color);
}

.track-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.track-producer {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.btn-control {
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 3px 3px 0 0 var(--border-color);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-control:hover {
    transform: translateY(-2px);
}

.btn-control:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 var(--border-color);
}

.btn-play {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    background-color: var(--accent-yellow);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #eee;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-blue);
    width: 0%;
    border-right: var(--border-width) solid var(--border-color);
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* Playlist */
.playlist-card {
    width: 100%;
    max-width: 500px;
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    z-index: 10;
}

.playlist-header {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.track-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.track-item {
    padding: 0.8rem;
    border: var(--border-width) solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.track-item:hover {
    background-color: var(--accent-green);
    border-color: var(--border-color);
}

.track-item.active {
    background-color: var(--accent-pink);
    border-color: var(--border-color);
    font-weight: 700;
}

.track-item-info {
    display: flex;
    flex-direction: column;
}

.track-item-title {
    font-size: 0.9rem;
}

.track-item-producer {
    font-size: 0.75rem;
    color: #666;
}

/* Mode Control */
.mode-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.btn-mode {
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 0 var(--border-color);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-mode:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 var(--border-color);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.playing .track-art {
    animation: pulse 2s infinite ease-in-out;
}

/* Custom Scrollbar */
.track-list::-webkit-scrollbar {
    width: 8px;
}

.track-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.track-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 8px 8px 0 0 var(--border-color);
    animation: modalIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    filter: drop-shadow(2px 2px 0 var(--border-color));
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.modal-content p {
    color: #666;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-modal {
    padding: 1rem;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 4px 4px 0 0 var(--border-color);
}

.btn-cancel {
    background: var(--accent-green);
}

.btn-confirm {
    background: #eee;
}

.btn-modal:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 0 var(--border-color);
}

@media (max-width: 480px) {
    .player-card {
        padding: 1.5rem;
    }
    .track-art {
        width: 150px;
        height: 150px;
    }
}
