/* ============================================================
   MELODIX - STYLES
   ============================================================ */

/* ----- RESET ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0B0E14;
    color: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 10px;
}

/* ----- HEADER ----- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(11, 14, 20, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6C2BD9, #FF2D78);
    font-size: 20px;
    color: #fff;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #6C2BD9, #FF2D78);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-badge {
    font-size: 10px;
    font-weight: 600;
    background: rgba(29, 185, 84, 0.2);
    color: #1DB954;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid rgba(29, 185, 84, 0.2);
}

.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    color: #8a8a9a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.25s ease;
}

.nav a:hover,
.nav a.active {
    color: #fff;
}

.search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 6px 18px;
    gap: 10px;
    transition: border-color 0.3s;
}

.search:focus-within {
    border-color: #6C2BD9;
}

.search input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
    padding: 8px 0;
    width: 200px;
}

.search input::placeholder {
    color: #666;
}

.search i {
    color: #666;
    font-size: 14px;
}

/* ----- MAIN ----- */
.main {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 100px 32px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 60%, #8a8a9a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* ----- CARTES ----- */
.card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(108, 43, 217, 0.2);
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
    background: #1a1a2a;
}

.card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.card p {
    font-size: 12px;
    color: #8a8a9a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card.playing {
    border-color: #6C2BD9;
    box-shadow: 0 0 30px rgba(108, 43, 217, 0.25);
}

.card.playing::after {
    content: '▶';
    position: absolute;
    top: 16px;
    right: 16px;
    background: #1DB954;
    color: #fff;
    font-size: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(29, 185, 84, 0.4);
}

/* ----- PLAYER FOOTER ----- */
.player-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(18, 18, 28, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    height: 80px;
    z-index: 10;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.player-artwork {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a2a;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 12px;
    color: #8a8a9a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-actions {
    margin-left: 12px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.player-actions:hover {
    color: #FF2D78;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
    min-width: 0;
    max-width: 600px;
}

.player-buttons {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 6px;
}

.player-buttons button {
    background: transparent;
    border: none;
    color: #b3b3b3;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    padding: 4px;
}

.player-buttons button:hover {
    color: #fff;
    transform: scale(1.1);
}

#playBtn {
    background: #1DB954;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #000;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

#playBtn:hover {
    transform: scale(1.05);
    background: #1ed760;
}

.player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-size: 12px;
    color: #8a8a9a;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #3a3a4a;
    border-radius: 4px;
    cursor: pointer;
}

.progress-bar:hover {
    height: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6C2BD9, #FF2D78);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.player-volume i {
    color: #8a8a9a;
    font-size: 16px;
}

.player-volume input[type="range"] {
    width: 90px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #3a3a4a;
    border-radius: 4px;
    outline: none;
}

.player-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ----- LOGIN ----- */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #0B0E14;
    text-align: center;
    padding: 20px;
}

.login-container .logo {
    font-size: 48px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #6C2BD9, #FF2D78);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-btn {
    background: #1DB954;
    color: #fff;
    border: none;
    padding: 16px 48px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.login-btn:hover {
    transform: scale(1.05);
    background: #1ed760;
}

.login-btn i {
    margin-right: 10px;
}

.login-sub {
    color: #8a8a9a;
    font-size: 14px;
    margin-top: 16px;
    max-width: 400px;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    .nav {
        gap: 14px;
    }
    .search input {
        width: 100px;
    }
    .main {
        padding: 16px 16px 100px 16px;
    }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 14px;
    }
    .player-footer {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 12px;
        gap: 8px;
    }
    .player-info,
    .player-controls,
    .player-volume {
        flex: 1 1 100%;
        justify-content: center;
    }
    .player-volume input[type="range"] {
        width: 100px;
    }
}