/* PapayaBeat Core – tyylit
   Versio 0.1.4
*/

:root {
    --pb-bg: #050505;
    --pb-panel: #111111;
    --pb-panel-soft: #1b1b1b;
    --pb-panel-alt: #272727;
    --pb-text: #fefefe;
    --pb-muted: #b0b0b0;
    --pb-accent: #ff9f3b; /* papaijanoranssi */
    --pb-shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.75);
    --pb-radius-xl: 28px;
    --pb-radius-lg: 20px;
    --pb-radius-md: 14px;
    --pb-radius-pill: 999px;
    --pb-border-subtle: 1px solid rgba(255, 255, 255, 0.06);
}

/* Yleinen kontti */

.papayabeat-app {
    max-width: 1080px;
    margin: 40px auto;
    padding: 32px 32px 40px;
    background: radial-gradient(circle at top left, #222 0, #050505 45%, #000 100%);
    border-radius: 36px;
    box-shadow: var(--pb-shadow-soft);
    color: var(--pb-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Otsikko / header */

.pbp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.pbp-logo {
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.75);
}

.pbp-tagline {
    font-size: 0.9rem;
    color: var(--pb-muted);
}

/* Now playing -kortti */

.pbp-now-playing {
    background: rgba(10, 10, 10, 0.95);
    border-radius: var(--pb-radius-xl);
    padding: 18px 20px 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.pbp-now-layout {
    display: grid;
    grid-template-columns: 128px auto;
    gap: 18px;
    align-items: center;
}

.pbp-now-cover {
    width: 128px;
    height: 128px;
    border-radius: 24px;
    background-color: #111;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.pbp-now-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0, rgba(255, 159, 59, 0.16), transparent 45%),
                radial-gradient(circle at 80% 100%, rgba(46, 180, 255, 0.17), transparent 50%);
    mix-blend-mode: screen;
    opacity: 0.9;
}

.pbp-now-cover--empty {
    background-image: linear-gradient(135deg, #272727, #111111);
}

.pbp-now-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pbp-label {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.pbp-now-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.pbp-now-artist {
    font-size: 0.95rem;
    color: var(--pb-muted);
}

.pbp-now-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Pill-napit */

.pbp-pill-btn {
    border-radius: var(--pb-radius-pill);
    border: none;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.pbp-pill-primary {
    background: var(--pb-accent);
    color: #000;
}

.pbp-pill-primary.is-active {
    background: #ffe2c0;
}

.pbp-pill-ghost {
    background: transparent;
    color: var(--pb-muted);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.pbp-pill-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pbp-pill-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Player bar */

.pbp-player-bar {
    margin-top: 14px;
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: var(--pb-radius-lg);
    background: linear-gradient(90deg, #050505, #101010);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pbp-player-bar audio {
    width: 100%;
}

/* Kappalelista */

.pbp-track-list-wrap {
    margin-top: 6px;
    background: rgba(5, 5, 5, 0.85);
    border-radius: 20px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.pbp-track-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pbp-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.pbp-track:hover {
    background: rgba(255, 255, 255, 0.04);
}

.pbp-track.is-playing {
    background: linear-gradient(90deg, rgba(255, 159, 59, 0.16), rgba(255, 159, 59, 0.02));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.pbp-track-play {
    border-radius: 999px;
    width: 32px;
    height: 32px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--pb-text);
    cursor: pointer;
}

.pbp-track-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.pbp-track-title {
    font-size: 0.95rem;
}

.pbp-track-artist {
    font-size: 0.82rem;
    color: var(--pb-muted);
}

/* ACTIONIT: sydän, pinni, soittolista */

.pbp-track-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pbp-track-heart,
.pbp-track-add,
.pbp-track-pin {
    border-radius: 999px;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pb-text);
}

/* Sydän: kirjasto */
.pbp-track-heart.is-active {
    background: var(--pb-accent);
    color: #000;
}

/* Pinni-nappi – teksti piiloon, käytetään pseudoa */
.pbp-track-pin {
    font-size: 0;
}

.pbp-track-pin::before {
    content: "📌";
    font-size: 0.86rem;
    line-height: 1;
}

.pbp-track-pin.is-active {
    background: var(--pb-accent);
    color: #000;
}

.pbp-track-pin.is-active::before {
    transform: translateY(-1px) rotate(-15deg);
}

/* Soittolistaan – ei vielä käytössä, neutraali */
.pbp-track-add[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* Genre-label */

.pbp-track-genre {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--pb-muted);
}

/* STATUS-SHORTCODE */

.papayabeat-status-page {
    max-width: 720px;
    margin: 40px auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pbs-title {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.pbs-card {
    padding: 20px 22px;
    background: #3b3b3b;
    border-radius: 16px;
    color: #fff;
}

/* RADIO */

.papayabeat-radio {
    max-width: 980px;
    margin: 40px auto;
    padding: 26px 26px 30px;
    background: radial-gradient(circle at top, #252525 0, #050505 55%);
    border-radius: 34px;
    box-shadow: var(--pb-shadow-soft);
    color: var(--pb-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pbr-main {
    display: grid;
    grid-template-columns: 150px auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 20px;
}

.pbr-cover {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    background-color: #111;
    position: relative;
    overflow: hidden;
}

.pbr-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 0, rgba(255, 159, 59, 0.18), transparent 55%),
                radial-gradient(circle at 90% 100%, rgba(0, 190, 255, 0.22), transparent 60%);
    mix-blend-mode: screen;
}

.pbr-cover--empty {
    background-image: linear-gradient(135deg, #282828, #111111);
}

.pbr-main-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pbr-title-main {
    font-size: 1.4rem;
    font-weight: 600;
}

.pbr-tagline-main {
    font-size: 0.95rem;
    color: var(--pb-muted);
}

.pbr-location-main {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.pbr-main-meta audio {
    margin-top: 10px;
    width: 100%;
}

.pbr-station-list-wrap {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pbr-station-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pbr-station {
    padding: 8px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.1s ease;
}

.pbr-station:hover {
    background: rgba(255, 255, 255, 0.04);
}

.pbr-station.is-active {
    background: linear-gradient(90deg, rgba(255, 159, 59, 0.22), rgba(255, 159, 59, 0.06));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.pbr-station-name {
    font-size: 0.95rem;
}

.pbr-station-tagline {
    font-size: 0.8rem;
    color: var(--pb-muted);
}

/* PROFIILISIVU */

.papayabeat-profile {
    max-width: 1080px;
    margin: 40px auto;
    padding: 32px 34px 40px;
    border-radius: 34px;
    background: radial-gradient(circle at top left, #262626 0, #050505 60%);
    box-shadow: var(--pb-shadow-soft);
    color: var(--pb-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pbprof-title {
    font-size: 2.4rem;
    margin-bottom: 20px;
}

.pbprof-header {
    display: grid;
    grid-template-columns: 100px auto 320px;
    gap: 18px;
    align-items: center;
    background: rgba(7, 7, 7, 0.96);
    padding: 16px 18px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 26px;
}

.pbprof-avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pbprof-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 20% 0, rgba(255, 159, 59, 0.25), transparent 55%),
                radial-gradient(circle at 70% 100%, rgba(0, 180, 255, 0.28), transparent 60%);
    position: relative;
}

.pbprof-avatar::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.85);
    background: radial-gradient(circle at 50% 30%, #ffffff, #dcdcdc);
    mask-image: radial-gradient(circle at 50% 35%, transparent 0, transparent 22px, black 23px),
                radial-gradient(circle at 50% 80%, black 0, black 34px, transparent 35px);
    mask-composite: exclude;
}

.pbprof-header-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pbprof-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.pbprof-tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 159, 59, 0.15);
    border: 1px solid rgba(255, 159, 59, 0.6);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

.pbprof-stats {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

.pbprof-stat {
    min-width: 80px;
}

.pbprof-stat-label {
    font-size: 0.7rem;
    color: var(--pb-muted);
    letter-spacing: 0.12em;
}

.pbprof-stat-value {
    font-size: 1.1rem;
}

/* Layout: kirjasto + soittolistat */

.pbprof-main-layout {
    display: grid;
    grid-template-columns: 2.1fr 1.3fr;
    gap: 20px;
}

.pbprof-section {
    background: rgba(7, 7, 7, 0.96);
    border-radius: 26px;
    padding: 16px 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.pbprof-section-title {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Kirjaston grid */

.pbprof-grid {
    display: grid;
    gap: 10px;
}

.pbprof-grid--tracks {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* Track-kortit */

.pbprof-track-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border-radius: 16px;
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.pbprof-track-card.is-pinned {
    border: 1px solid rgba(255, 159, 59, 0.7);
    box-shadow: 0 0 0 1px rgba(255, 159, 59, 0.45), 0 8px 20px rgba(0, 0, 0, 0.8);
}

.pbprof-track-cover {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: #111;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.pbprof-track-cover--empty {
    background-image: linear-gradient(135deg, rgba(255, 159, 59, 0.3), rgba(255, 159, 59, 0.1));
}

.pbprof-track-meta {
    min-width: 0;
}

.pbprof-track-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.pbprof-track-artist {
    font-size: 0.8rem;
    color: var(--pb-muted);
}

/* Nuppineula-kytkin kortin kulmassa */

.pbprof-pin-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
}

.pbprof-pin-btn::before {
    content: "📌";
    font-size: 0.86rem;
    line-height: 1;
}

.pbprof-track-card.is-pinned .pbprof-pin-btn {
    background: var(--pb-accent);
    border-color: rgba(0, 0, 0, 0.85);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.pbprof-track-card.is-pinned .pbprof-pin-btn::before {
    transform: translateY(-1px) rotate(-15deg);
}

/* Soittolistapalsta */

.pbprof-playlists-placeholder {
    font-size: 0.9rem;
    color: var(--pb-muted);
}

/* Responsiivisuus */

@media (max-width: 900px) {
    .papayabeat-app,
    .papayabeat-profile,
    .papayabeat-radio {
        margin: 20px 12px;
        padding: 20px 18px 24px;
        border-radius: 24px;
    }

    .pbp-now-layout {
        grid-template-columns: 90px auto;
    }

    .pbp-now-cover {
        width: 90px;
        height: 90px;
    }

    .pbprof-header {
        grid-template-columns: 80px auto;
        grid-template-rows: auto auto;
    }

    .pbprof-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-top: 10px;
    }

    .pbprof-main-layout {
        grid-template-columns: 1fr;
    }

    .pbr-main {
        grid-template-columns: 100px auto;
    }

    .pbr-cover {
        width: 100px;
        height: 100px;
    }
}
