﻿:root {
    --carousel-gap-1: 120px;
    --carousel-gap-2: 220px;
}

.detail-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

    .detail-hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 290px;
        background-image: var(--hero-bg);
        background-size: cover;
        background-position: center;
        filter: blur(20px) brightness(0.55);
        transform: scale(1.18);
    }

    .detail-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(5,5,5,0) 0%,rgba(5,5,5,0.1) 20%, rgba(5,5,5,0.9) 100%);
    }

.detail-hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem 0 6rem;
    backdrop-filter: blur(6px);
}

.album-heading {
    text-transform: uppercase;
    letter-spacing: 0.75rem;
}

.carousel-shell {
    margin: 2rem auto 0;
    display: flex;
    justify-content: center;
    width: min(32vw, 960px);
    min-width: 320px;
}

.carousel-container {
    width: 100%;
    height: 560px;
    position: relative;
    perspective: 900px;
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    touch-action: pan-y;
}

.album-card3d {
    position: absolute;
    height: 450px;
    aspect-ratio: 2 / 3;
    width: auto;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    box-shadow: 0 30px 60px rgba(0,0,0,0.55);
    transition: transform 0.8s ease, opacity 0.8s ease;
    cursor: pointer;
}

    .album-card3d .bg {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        filter: blur(28px) brightness(0.9);
        transform: scale(1.1);
        opacity: 0.65;
    }

    .album-card3d img {
        position: relative;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 2;
        filter: grayscale(100%) saturate(0.2);
        transition: filter 0.5s ease;
    }

    .album-card3d::after {
        content: "";
        position: absolute;
        inset: auto 0 0 0;
        height: 45%;
        background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
        z-index: 2;
    }

    .album-card3d:not(.card-with-palette) .media-figure {
        position: relative;
        height: 100%;
        width: 100%;
        margin: 0;
        z-index: 2;
        display: block;
    }

    .album-card3d:not(.card-with-palette) .media-picture {
        display: block;
        width: 100%;
        height: 100%;
    }

        .album-card3d:not(.card-with-palette) .media-picture img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 18px;
        }

    .album-card3d.center {
        transform: translateZ(90px) scale(1.06);
        z-index: 10;
    }

        .album-card3d.center img {
            filter: grayscale(0%) saturate(1);
        }

    .album-card3d.frame-style {
        background-image: url('assets/default_img.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 24px;
    }

        .album-card3d.frame-style::after {
            display: none;
        }

        .album-card3d.frame-style .media-figure {
            position: absolute;
            top: 18%;
            left: 14%;
            width: 72%;
            height: 66%;
            margin: 0;
            border-radius: 0;
            overflow: hidden;
        }

        .album-card3d.frame-style .media-picture {
            height: 100%;
        }

            .album-card3d.frame-style .media-picture img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                border-radius: 0;
                filter: none;
            }

    .album-card3d.card-with-palette {
        border-radius: 22px;
        display: flex;
        flex-direction: column;
        backdrop-filter: blur(6px);
    }

        .album-card3d.card-with-palette .bg,
        .album-card3d.card-with-palette::after {
            display: none;
        }

        .album-card3d.card-with-palette .card-visual {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            border-radius: 22px 22px 0 0;
            overflow: hidden;
            flex-shrink: 0;
        }

            .album-card3d.card-with-palette .card-visual::before {
                content: "";
                position: absolute;
                inset: 0;
                background-image: var(--cover-image);
                background-size: cover;
                background-position: center;
                filter: blur(18px) saturate(1.1);
                transform: scale(1.15);
                opacity: 0.55;
            }

            .album-card3d.card-with-palette .card-visual picture,
            .album-card3d.card-with-palette .card-visual img {
                position: relative;
                width: 100%;
                height: 100%;
                object-fit: cover;
                z-index: 1;
                border-top-left-radius: 22px;
                border-top-right-radius: 22px;
            }

            .album-card3d.card-with-palette .card-visual img {
                filter: grayscale(100%) saturate(0.2);
                transition: filter 0.5s ease;
            }

        .album-card3d.card-with-palette .color-palette {
            position: relative;
            flex: 1 1 auto;
            border-radius: 0 0 22px 22px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.75rem 1.25rem;
        }

            .album-card3d.card-with-palette .color-palette::before {
                content: "";
                position: absolute;
                inset: 0;
                background-image: var(--cover-image);
                background-size: cover;
                background-position: center;
                filter: blur(20px) brightness(0.65);
                transform: scale(1.2);
            }

        .album-card3d.card-with-palette .palette-content {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 240px;
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            text-align: center;
        }

        .album-card3d.card-with-palette .palette-label {
            font-size: 0.85rem;
            letter-spacing: 0.3em;
            text-transform: uppercase;
            color: rgba(255,255,255,0.85);
        }

        .album-card3d.card-with-palette .palette-swatches {
            display: flex;
            gap: 0.5rem;
            justify-content: space-between;
        }

        .album-card3d.card-with-palette .palette-swatch {
            flex: 1;
            height: 42px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.35);
            box-shadow: inset 0 0 12px rgba(0,0,0,0.25);
            background: var(--swatch-color, #fff);
        }

        .album-card3d.card-with-palette.center .card-visual img {
            filter: grayscale(0%) saturate(1);
        }

    .album-card3d.left-1 {
        transform: translateX(calc(var(--carousel-gap-1) * -1)) translateZ(-10px) scale(0.96);
        opacity: 0.92;
    }

    .album-card3d.right-1 {
        transform: translateX(var(--carousel-gap-1)) translateZ(-10px) scale(0.96);
        opacity: 0.92;
    }

    .album-card3d.left-2 {
        transform: translateX(calc(var(--carousel-gap-2) * -1)) translateZ(-70px) scale(0.88);
        opacity: 0.7;
    }

    .album-card3d.right-2 {
        transform: translateX(var(--carousel-gap-2)) translateZ(-70px) scale(0.88);
        opacity: 0.7;
    }

    .album-card3d.hidden {
        opacity: 0;
        pointer-events: none;
    }

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s ease, border-color 0.2s ease;
}

    .nav-arrow:hover {
        border-color: #f43f5e;
        background: rgba(0,0,0,0.5);
    }

    .nav-arrow svg {
        width: 22px;
        height: 22px;
    }

    .nav-arrow.left {
        left: -17vw;
    }

    .nav-arrow.right {
        right: -17vw;
    }

.detail-panel {
    margin-top: 4rem;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.download-btn {
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.35);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    background: rgba(0,0,0,0.35);
}

    .download-btn:hover {
        border-color: #f472b6;
    }

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.meta-card {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.25rem;
    padding: 1rem;
    text-align: center;
}

.meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.meta-value {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.service-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
}

.service-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-weight: 500;
    letter-spacing: 0.04em;
    font-size: 1rem;
    color: #fff;
    border: none;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

    .service-btn .service-icon {
        width: 1.4rem;
        height: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .service-btn .service-icon img {
            width: 18px;
            height: 18px;
            object-fit: contain;
        }

    .service-btn:hover {
        transform: translateY(-2px);
        filter: brightness(1.1);
    }

    .service-btn.itunes {
        background: #2D151A;
    }

    .service-btn.spotify {
        background: #132B19;
    }

.share-row {
    margin-top: 2.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.share-icons {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.share-icon-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #111;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

    .share-icon-btn:hover {
        transform: translateY(-3px);
    }

    .share-icon-btn:not(.favorite) img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

    .share-icon-btn.favorite {
        position: relative;
        overflow: hidden;
    }

        .share-icon-btn.favorite::after {
            content: "";
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at center, rgba(244,63,94,0.25), transparent 70%);
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }

        .share-icon-btn.favorite.is-favorited {
            background: linear-gradient(135deg, #f43f5e, #ec4899);
            border-color: #f43f5e;
        }

            .share-icon-btn.favorite.is-favorited::after {
                opacity: 1;
            }

            .share-icon-btn.favorite.is-favorited img {
                filter: brightness(0) invert(1);
            }

.share-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    display: inline-block;
}

@media (min-width: 1280px) {
    :root {
        --carousel-gap-1: clamp(60px, 4.5vw, 95px);
        --carousel-gap-2: clamp(120px, 9vw, 170px);
    }

    .carousel-shell {
        width: min(30vw, 900px);
    }

    .carousel-container {
        height: clamp(520px, 40vw, 620px);
    }

    .album-card3d {
        height: clamp(420px, 34vw, 560px);
    }

        .album-card3d.card-with-palette {
            height: clamp(420px, 34vw, 560px);
        }
}

@media (max-width: 768px) {
    .detail-hero-content {
        padding: 3rem 0 6rem;
    }

    .carousel-shell {
        width: 100%;
        min-width: auto;
        margin-top: 0;
    }

    .carousel-container {
        height: 60vh;
    }

    .album-card3d {
        height: 90vw;
        width: auto;
    }

        .album-card3d.card-with-palette {
            height: 90vw;
            width: auto;
        }

            .album-card3d.card-with-palette .palette-content {
                max-width: none;
            }

    .nav-arrow {
        display: none;
    }

    #detailRecommendations {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .genre-panel {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #detailGenreCarousel {
        padding-left: 0;
        padding-right: 0.5rem;
        gap: 1rem;
    }
}

.album-card3d.frame-style {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 24px;
}

    .album-card3d.frame-style::after {
        display: none;
    }

    .album-card3d.frame-style .media-figure {
        position: absolute;
        top: 18%;
        left: 14%;
        width: 72%;
        height: 66%;
        margin: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .album-card3d.frame-style .frame-wrap {
        position: relative;
        width: 100%;
        height: 100%;
    }

    .album-card3d.frame-style .frame-cover {
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 0;
        z-index: 1;
    }

    .album-card3d.frame-style .frame-picture {
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        height: 100%;
    }

        .album-card3d.frame-style .frame-picture img {
            display: none;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0;
            filter: none;
        }

#copy-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    gap: 10px;
}
 
