:root {
    --bg: #0b0f14;
    --accent: #ff0077;
    --text: #ffffff;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}


.bg-blur {
    background: #0b0f14;
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -1;
    overflow: hidden;
}

.bg-blur img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(70px) brightness(0.35) saturate(1.3);    
    transform: scale(1.1);
    transition: opacity 0.6s ease;
}

.bg-blur::after {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(10,10,15,0.4) 0%,
            rgba(10,10,15,0.7) 60%,
            rgba(10,10,15,0.95) 100%
        );
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    animation: fadeIn 0.8s ease-out 0.8s both;
}

.back-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.back-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .back-btn {
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
}

.nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;

    position: sticky;
    top: 0;
    z-index: 10;
    
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);   
    border-bottom: 1px solid rgba(255, 0, 119, 0.4);

    box-shadow:
        0 5px 20px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav a {
    color: white;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;    
    transition: transform 0.3s ease, text-shadow 0.3s ease, color 0.3s ease;
}

.nav a:hover {
    transform: scale(1.15);
    text-shadow: 0 0 10px #ff0077, 0 0 20px #ff0077;
    color: #ff0077;
}

.tracks-page {
    max-width: 900px;
    margin: auto;
    padding: 2rem;
    text-align: center;
    padding-bottom: 140px;
}

.tracks-page h2 {
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-weight: 600;
}

.track {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    margin-bottom: 10px;

    border-radius: 14px;

    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: all 0.25s ease;
}

.track:hover {
    background: rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.2);
    transform: translateX(4px);
}

.track-main {
    flex: 1;
    min-width: 0;
}

.track-main h3 {
    font-size: 14px;
    line-height: 1.3;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-wave {
    width: 100%;
    height: 12px;
    
    background: #2a2a2a;

    border-radius: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.track-wave::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    
    background: linear-gradient(90deg, #00ff88, #00ffaa);

    border-radius: 6px;
    
    box-shadow:
        0 0 6px #00ff88,
        0 0 15px #00ff88,
        0 0 25px #00ffaa;

    transition: width 0.4s ease, opacity 0.4s ease;
}

.track-wave:hover::after {
    box-shadow:
        0 0 10px #00ff88,
        0 0 25px #00ff88,
        0 0 40px #00ffaa;
}

.hover-time {
    position: absolute;
    top: -25px;
    left: 0;
    transform: translateX(-50%);
    background: #00ff88;
    color: black;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: 0.2s;
}

.track-wave:hover .hover-time {
    opacity: 1;
}

.track-wave.fading::after {
    opacity: 0;
}

.play-btn {
    width: 50px;
    height: 50px;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.06);
    color: #ff0077;

    backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 4px 15px rgba(0,0,0,0.4);

    transition: all 0.25s ease;
}

.play-btn:hover {
    background: #ff0077;
    color: #fff;

    box-shadow:
        0 0 10px #ff0077,
        0 0 25px #ff0077;
}

.track.active.playing .play-btn {
    background: #00ff88;
    color: black;

    box-shadow:
        0 0 10px #00ff88,
        0 0 25px #00ffaa;
    animation: pulse 1.5s infinite;
}

.track.active.paused .play-btn {
    background: #ff2e63;
    color: white;

    box-shadow:
        0 0 10px #ff2e63,
        0 0 25px #ff2e63;
    animation: pulse 1.5s infinite;
}

.download-btn {
    width: 50px;
    height: 50px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.06);
    color: #ff0077;

    backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 4px 15px rgba(0,0,0,0.4);

    font-size: 20px;
    text-decoration: none;

    transition: all 0.25s ease;
}

.download-btn:hover {
    background: #ff0077;
    color: white;

    box-shadow:
        0 0 10px #ff0077,
        0 0 25px #ff0077,
        0 0 40px #ff0077;

    transform: scale(1.15);
}

.global-player {
    position: fixed;
    bottom: 0;
    width: 100%;

    display: flex;
    gap: 20px;
    padding: 15px;

    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);

    border-top: 1px solid rgba(255,255,255,0.1);

    box-shadow:
        0 -10px 40px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.15);
}

#cover {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.controls button {
    width: 50px;
    height: 50px;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.06);
    color: #ff0077;

    backdrop-filter: blur(10px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 4px 15px rgba(0,0,0,0.4);

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.25s ease;
}

.controls button svg {
    width: 22px;
    height: 22px;
    display: block;
}

.controls button:active {
    transform: scale(0.9);
}

@media (hover: hover) and (pointer: fine) {
    .controls button:hover {
        background: #ff2e63;
        color: white;
    }
}

.controls button:hover {
    background: #ff0077;
    color: #fff;

    box-shadow:
        0 0 10px #ff0077,
        0 0 25px #ff0077;
}

.controls button.tap-active {
    background: #ff2e63;
    color: white;

    box-shadow:
        0 0 10px #ff2e63,
        0 0 25px #ff2e63;

    transform: scale(0.9);
}

.controls {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 8px;
}

#global-play.playing {
    background: #00ff88;
    color: black;

    box-shadow:
        0 0 12px #00ff88,
        0 0 30px #00ffaa;

    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 10px #00ff88; }
    50% { box-shadow: 0 0 30px #00ffaa; }
    100% { box-shadow: 0 0 10px #00ff88; }
}

#volume {
    -webkit-appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 10px;

    background: linear-gradient(90deg, #ff2e63, #ff8a00);

    outline: none;
    cursor: pointer;

    transition: 0.3s;
}

#volume:hover {
    box-shadow:
        0 0 8px #ff2e63,
        0 0 20px #ff2e63;
}

#volume::-webkit-slider-thumb {
    -webkit-appearance: none;

    width: 18px;
    height: 18px;
    border-radius: 50%;

    background: white;
    border: 2px solid #ff2e63;

    cursor: pointer;

    box-shadow:
        0 0 10px #ff2e63,
        0 0 20px #ff2e63;

    transition: 0.2s;
}

#volume::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.player-info {
    margin-left: 20px;
}

#waveform {
    width: 35vw;    
    height: 50px;
}

.time {
    color: #aaa;
}

/* ===== мобильная версия ===== */
@media (max-width: 768px) {

    .global-player {
        display: grid;
        grid-template-columns: 85px 1fr;
        grid-template-rows: auto auto;
        align-items: center;
        column-gap: 12px; 
        padding: 10px 15px;
        background: #111;
        position: fixed;
        bottom: 0; left: 0; width: 100%;
        z-index: 9999;
    }

    #cover {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 85px;
        height: 85px;
        border-radius: 10px;
        object-fit: cover;
    }
    
    .player-info {
        grid-row: 2;
        grid-column: 2;

        width: 100%;
        overflow: hidden;
        position: relative;

        margin-left: 8px;
        
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
    }
    
    #track-wrapper {
        display: flex;
        width: max-content;
        gap: 80px;
        font-size: 14px;
        will-change: transform;
    }
    
    .global-player.is-playing #track-wrapper {
        animation: scroll-loop 10s linear infinite;
    }

    @keyframes scroll-loop {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .time {
        display: block;
        font-size: 11px;
        opacity: 0.6;
        margin-left: 10px;
        margin-top: 4px;
    }

    #volume,
    #waveform {
        display: none !important;
    }
}