/* ==============================================
   Highlight Card — Track/Artist feature card
   Liquid Glass + Premium design
   ============================================== */

/* --- Variables --- */
.highlight-card {
    --hc-glass-bg: var(--t-glass-bg, rgba(255, 255, 255, 0.04));
    --hc-glass-border: var(--t-glass-border, rgba(255, 255, 255, 0.08));
    --hc-glass-blur: 16px;
    --hc-text-primary: var(--t-text-strong, #f3f4f6);
    --hc-text-secondary: var(--t-text-muted, rgba(255, 255, 255, 0.55));
    --hc-text-muted: var(--t-placeholder, rgba(255, 255, 255, 0.3));
    --hc-label-color: var(--t-text-muted, rgba(255, 255, 255, 0.45));
    --hc-icon-color: var(--t-placeholder, rgba(255, 255, 255, 0.35));
    --hc-radius: 18px;
    --hc-img-size: 130px;

    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    margin: 2rem 0;
    border-radius: var(--hc-radius);
    background: var(--hc-glass-bg);
    border: 1px solid var(--hc-glass-border);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Subtle hover lift */
.highlight-card:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* --- Gradient border overlay (liquid glass) --- */
.highlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--hc-radius);
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.02) 40%,
            rgba(255, 255, 255, 0.08));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* --- Image (desktop: square thumbnail) --- */
.highlight-card__image {
    flex-shrink: 0;
    width: var(--hc-img-size);
    height: var(--hc-img-size);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.highlight-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.7);
    filter: brightness(0.9) contrast(1.1) saturate(1.15);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.highlight-card:hover .highlight-card__image img {
    transform: scale(1.75);
    filter: brightness(1) contrast(1.05) saturate(1.2);
}

/* --- Body --- */
.highlight-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    position: relative;
    z-index: 1;
}

/* --- Label --- */
.highlight-card__label {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 0;
}

/* Track variant label */
.highlight-card--track .highlight-card__label {
    color: rgba(239, 68, 68, 0.65);
}



/* --- Title --- */
.highlight-card__title {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    font-weight: 700;
    color: var(--hc-text-primary);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

/* --- Subtitle (artist name for track card) --- */
.highlight-card__subtitle {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--hc-text-secondary);
    line-height: 1.3;
}

/* --- Description (artist card) --- */
.highlight-card__description {
    font-size: 0.8125rem;
    color: var(--hc-text-secondary);
    line-height: 1.5;
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Detail (album · year) --- */
.highlight-card__detail {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.6875rem;
    color: var(--hc-text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* --- Platform links --- */
.highlight-card__platforms {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.highlight-card__platform {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50%;
    color: var(--hc-icon-color);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.highlight-card__platform svg {
    width: 18px;
    height: 18px;
}

.highlight-card__platform:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: scale(1.15);
}

.highlight-card__platform[data-platform="spotify"]:hover {
    color: #1DB954;
    background: rgba(29, 185, 84, 0.12);
    border-color: rgba(29, 185, 84, 0.25);
    box-shadow: 0 0 14px rgba(29, 185, 84, 0.2);
}

.highlight-card__platform[data-platform="youtube"]:hover {
    color: #FF0000;
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 14px rgba(255, 0, 0, 0.15);
}

.highlight-card__platform[data-platform="apple"]:hover {
    color: #FC3C44;
    background: rgba(252, 60, 68, 0.1);
    border-color: rgba(252, 60, 68, 0.2);
    box-shadow: 0 0 14px rgba(252, 60, 68, 0.15);
}

/* --- Default platform (from settings) --- */
.highlight-card__platform--default {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.highlight-card__platform--default[data-platform="spotify"] {
    color: #1DB954;
    border-color: rgba(29, 185, 84, 0.3);
    box-shadow: 0 0 10px rgba(29, 185, 84, 0.15);
}

.highlight-card__platform--default[data-platform="youtube"] {
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.25);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.12);
}

.highlight-card__platform--default[data-platform="apple"] {
    color: #FC3C44;
    border-color: rgba(252, 60, 68, 0.25);
    box-shadow: 0 0 10px rgba(252, 60, 68, 0.12);
}

.highlight-card__platform--default[data-platform="shortcut"] {
    color: var(--t-accent, #ef4444);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

/* ==============================================
   Responsive — Mobile
   ============================================== */
@media (max-width: 640px) {
    .highlight-card {
        --hc-img-size: 90px;
        padding: 1rem;
        gap: 1rem;
        margin: 1.25rem 0;
        --hc-glass-blur: 12px;
    }

    /* --- Disable ALL hover effects on mobile --- */
    .highlight-card:hover {
        transform: none;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .highlight-card:hover .highlight-card__image img {
        transform: scale(1.7);
        filter: brightness(0.9) contrast(1.1) saturate(1.15);
    }

    .highlight-card__platform:hover {
        background: rgba(255, 255, 255, 0.03);
        border-color: transparent;
        transform: none;
        box-shadow: none;
    }

    .highlight-card__platform[data-platform="spotify"]:hover {
        color: #1DB954;
        background: rgba(255, 255, 255, 0.03);
        border-color: transparent;
        box-shadow: none;
    }

    .highlight-card__platform[data-platform="youtube"]:hover {
        color: #FF0000;
        background: rgba(255, 255, 255, 0.03);
        border-color: transparent;
        box-shadow: none;
    }

    .highlight-card__platform[data-platform="apple"]:hover {
        color: #FC3C44;
        background: rgba(255, 255, 255, 0.03);
        border-color: transparent;
        box-shadow: none;
    }

    .highlight-card__image {
        border-radius: 10px;
    }

    .highlight-card--track .highlight-card__image img {
        transform: scale(1.9);
    }

    .highlight-card--track:hover .highlight-card__image img {
        transform: scale(1.9);
    }

    .highlight-card__body {
        gap: 0.15rem;
    }

    .highlight-card__title {
        font-size: 0.9375rem;
    }

    .highlight-card__subtitle {
        font-size: 0.8125rem;
    }

    .highlight-card__description {
        font-size: 0.75rem;
        -webkit-line-clamp: 3;
    }

    .highlight-card__detail {
        font-size: 0.625rem;
    }

    .highlight-card__platforms {
        margin-top: 0.375rem;
        gap: 0.375rem;
    }

    .highlight-card__platform {
        width: 2rem;
        height: 2rem;
    }

    .highlight-card__platform svg {
        width: 16px;
        height: 16px;
    }

    /* Brand colors always visible on touch */
    .highlight-card__platform[data-platform="spotify"] {
        color: #1DB954;
    }

    .highlight-card__platform[data-platform="youtube"] {
        color: #FF0000;
    }

    .highlight-card__platform[data-platform="apple"] {
        color: #FC3C44;
    }
}


/* ==============================================
   Reduced motion
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    .highlight-card {
        transition: none;
    }

    .highlight-card:hover {
        transform: none;
    }

    .highlight-card__image img {
        transition: none;
    }

    .highlight-card:hover .highlight-card__image img {
        transform: scale(1.7);
    }

    .highlight-card__platform {
        transition: none;
    }

    .highlight-card__platform:hover {
        transform: none;
    }
}