/* ==========================================================================
   Member profile — "Player card" (profile design 2)
   A holographic member card on the side; medal showcase, watch status,
   genre taste and the activity tabs on the main column.
   Markup: partials/member/main.php   JS: public/js/animetv-pages.js
   ========================================================================== */

.atv-pp {
    --pp-acc: #f5b942;
    --pp-acc-rgb: 245, 185, 66;
    --pp-box: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    --pp-line: rgba(255, 255, 255, 0.08);
    --pp-line-2: rgba(255, 255, 255, 0.12);
    --pp-tile: rgba(255, 255, 255, 0.03);
    --pp-text: #ffffff;
    --pp-text-2: #d8dbe2;
    --pp-muted: #8b92a1;
    --pp-hex-poly: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);

    position: relative;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 22px clamp(16px, 2.6vw, 36px) 56px;
    box-sizing: border-box;
    direction: rtl;
    color: var(--pp-text-2);
    font-size: 14px;
    line-height: 1.7;
    background:
        radial-gradient(700px 500px at 100% 0%, rgba(var(--pp-acc-rgb), 0.1), transparent 70%),
        radial-gradient(600px 520px at 0% 35%, rgba(139, 92, 246, 0.1), transparent 70%);
}
.atv-pp[data-banner-theme="emerald"] { --pp-acc: #10b981; --pp-acc-rgb: 16, 185, 129; }
.atv-pp[data-banner-theme="cosmic"] { --pp-acc: #a855f7; --pp-acc-rgb: 168, 85, 247; }
.atv-pp[data-banner-theme="crimson"] { --pp-acc: #f43f5e; --pp-acc-rgb: 244, 63, 94; }
.atv-pp[data-banner-theme="cyber"] { --pp-acc: #38bdf8; --pp-acc-rgb: 56, 189, 248; }
.atv-pp[data-banner-theme="obsidian"] { --pp-acc: #94a3b8; --pp-acc-rgb: 148, 163, 184; }

.atv-pp *,
.atv-pp *::before,
.atv-pp *::after {
    box-sizing: border-box;
}
.atv-pp .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.atv-pp a {
    text-decoration: none;
}

.atv-pp-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

@keyframes atvPpHolo {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes atvPpFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* ---------- Player card ---------- */
.atv-pp-card {
    position: relative;
    padding: 2px;
    border-radius: 32px;
    background: linear-gradient(130deg, var(--pp-acc), #8b5cf6, #38bdf8, #fb7185, var(--pp-acc));
    background-size: 300% 300%;
    animation: atvPpHolo 9s ease infinite;
    box-shadow: 0 40px 80px -40px rgba(139, 92, 246, 0.7), 0 0 60px -20px rgba(var(--pp-acc-rgb), 0.45);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (hover: hover) {
    .atv-pp-card:hover {
        transform: perspective(1200px) rotateY(-4deg) rotateX(2deg) translateY(-4px);
    }
}
.atv-pp-card-in {
    position: relative;
    padding: 26px;
    border-radius: 30px;
    overflow: hidden;
    color: #d8dbe2;
    background:
        radial-gradient(420px 260px at 50% 0%, rgba(139, 92, 246, 0.3), transparent 70%),
        radial-gradient(300px 200px at 100% 100%, rgba(var(--pp-acc-rgb), 0.14), transparent 70%),
        #14151c;
}
.atv-pp-card-in::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
    mask-image: linear-gradient(180deg, #000, transparent 55%);
}
.atv-pp-card-in > * {
    position: relative;
}
.atv-pp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: #aab0bd;
}
.atv-pp-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.atv-pp-avatar-zone {
    display: flex;
    justify-content: center;
    margin: 24px 0 16px;
}
.atv-pp-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    animation: atvPpFloat 4s ease-in-out infinite alternate;
}
.atv-pp-avatar-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(var(--pp-acc), #8b5cf6, var(--pp-acc));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    filter: drop-shadow(0 0 12px rgba(var(--pp-acc-rgb), 0.8));
}
.atv-pp-avatar.has-vip .atv-pp-avatar-ring {
    background: conic-gradient(#f5b942, #a855f7, #f5b942, #a855f7, #f5b942);
}
.atv-pp-avatar img {
    position: relative;
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #14151c;
}
.atv-pp-level {
    position: absolute;
    top: -6px;
    left: -18px;
    width: 62px;
    height: 70px;
    clip-path: var(--pp-hex-poly);
    background: linear-gradient(180deg, #ffd98a, #f0ab22);
    color: #1c1503;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.atv-pp-level small {
    font-size: 10px;
    font-weight: 800;
}
.atv-pp-level b {
    font-size: 24px;
    font-weight: 900;
}
.atv-pp .atv-pp-avatar-upload {
    position: absolute;
    left: 4px;
    bottom: 6px;
    width: 38px;
    height: 38px;
    margin: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(20, 21, 28, 0.92);
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.atv-pp .atv-pp-avatar-upload:hover {
    background: var(--pp-acc);
    color: #1c1503;
    box-shadow: 0 0 18px rgba(var(--pp-acc-rgb), 0.6);
}

.atv-pp-id {
    text-align: center;
}
/* Kalameh only for Latin letters/digits: an English name gets Kalameh, Persian letters fall back to the site font. */
@font-face {
    font-family: "AtvKalamehLatin";
    src: url("../../fonts/kalameh/Kalameh_Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0020-007E, U+00A0-00FF, U+2013-2014, U+2018-201D;
}
.atv-pp .atv-pp-name {
    margin: 0;
    font-family: "AtvKalamehLatin", "IRANYekanX", "Vazirmatn", sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 0.3px;
    line-height: 1.3;
    color: #ffffff;
    overflow-wrap: anywhere;
}
.atv-pp-handle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    margin-top: 6px;
}
.atv-pp-handle {
    font-size: 13px;
    color: var(--pp-muted);
}
.atv-pp-role {
    height: 26px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.4);
}
.atv-pp-role.is-admin {
    color: #fecdd3;
    background: rgba(251, 113, 133, 0.14);
    border-color: rgba(251, 113, 133, 0.45);
    box-shadow: 0 0 20px -6px rgba(251, 113, 133, 0.6);
}
.atv-pp-role.is-team {
    color: #a7f3d0;
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.45);
}
.atv-pp-role.is-vip {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.16);
    border-color: rgba(168, 85, 247, 0.5);
}
.atv-pp-bio {
    margin: 10px 0 0;
    font-size: 14px;
    color: #c3c8d2;
    overflow-wrap: anywhere;
}
.atv-pp-rank {
    width: max-content;
    max-width: 100%;
    min-height: 38px;
    margin: 16px auto 0;
    padding: 4px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    border-top: 1px solid rgba(245, 185, 66, 0.35);
    border-bottom: 1px solid rgba(245, 185, 66, 0.35);
    background: linear-gradient(90deg, rgba(245, 185, 66, 0), rgba(245, 185, 66, 0.18), rgba(245, 185, 66, 0));
    color: #ffd98a;
    font-size: 13.5px;
    font-weight: 800;
}

.atv-pp-xp {
    margin: 20px 0 18px;
}
.atv-pp-xp-head,
.atv-pp-xp-sub {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.atv-pp-xp-head {
    margin-bottom: 7px;
    font-size: 12px;
    color: #aab0bd;
}
.atv-pp-xp-head strong {
    color: var(--pp-acc);
    font-weight: 800;
}
.atv-pp-xp-track {
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.atv-pp-xp-track span {
    display: block;
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #8b5cf6, var(--pp-acc));
    box-shadow: 0 0 16px rgba(var(--pp-acc-rgb), 0.6);
}
.atv-pp-xp-sub {
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--pp-muted);
}

.atv-pp-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.atv-pp-mini > div {
    padding: 12px 6px;
    text-align: center;
}
.atv-pp-mini > div + div {
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}
.atv-pp-mini b {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
}
.atv-pp-mini b.is-emerald {
    color: #6ee7b7;
}
.atv-pp-mini small {
    font-size: 11.5px;
    color: var(--pp-muted);
}

.atv-pp-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    margin: 14px 2px 18px;
    font-size: 12.5px;
    color: #aab0bd;
}
.atv-pp-meta i {
    margin-left: 6px;
}
.atv-pp-meta b {
    color: #ffffff;
    margin-left: 4px;
}

.atv-pp-actions {
    display: flex;
    gap: 8px;
}
.atv-pp-actions > .atv-pp-btn {
    flex: 1 1 0;
    min-width: 0;
}
/* User ID chip (admins only, partials/member/main.php): copies the ID on click. */
.atv-pp .atv-pp-actions > .atv-pp-uid {
    flex: 0 0 auto;
    min-width: 64px;
    gap: 6px;
    padding: 0 12px;
    border-style: dashed;
    border-color: rgba(var(--pp-acc-rgb, 245, 185, 66), 0.45);
}
.atv-pp-uid small {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}
.atv-pp-uid b {
    font-family: "AtvKalamehLatin", "IRANYekanX", sans-serif;
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: rgb(var(--pp-acc-rgb, 245, 185, 66));
}
.atv-pp .atv-pp-btn {
    height: 46px;
    margin: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.atv-pp .atv-pp-btn:hover {
    transform: translateY(-2px);
}
.atv-pp .atv-pp-btn.is-glass {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.atv-pp .atv-pp-btn.is-gold {
    background: linear-gradient(180deg, #ffc964, #f0ab22);
    color: #1c1503;
    box-shadow: 0 12px 30px -12px rgba(245, 185, 66, 0.85);
}
.atv-pp .atv-pp-btn.is-following {
    border-color: rgba(52, 211, 153, 0.45);
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
}
.atv-pp .atv-pp-btn.is-icon {
    padding: 0;
}
.atv-pp .atv-pp-btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.atv-pp-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}
.atv-pp-social a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    font-size: 17px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.atv-pp .atv-pp-social a.is-ig { color: #f9a8d4; }
.atv-pp-social a:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(var(--pp-acc-rgb), 0.4);
}

.atv-pp-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 12px;
    color: var(--pp-muted);
}
.atv-pp-swatches > span {
    margin-left: 4px;
}
.atv-pp .atv-pp-swatch {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #14151c;
    background: var(--sw);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.atv-pp .atv-pp-swatch:hover {
    transform: scale(1.12);
}
.atv-pp .atv-pp-swatch.is-active {
    box-shadow: 0 0 0 2px var(--sw), 0 0 14px var(--sw);
}

/* ---------- Main column ---------- */
.atv-pp-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}
.atv-pp-panel-box {
    position: relative;
    padding: 24px 26px;
    border-radius: 26px;
    background: var(--pp-box);
    border: 1px solid var(--pp-line);
    overflow: hidden;
}
.atv-pp-box-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.atv-pp .atv-pp-box-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
    color: var(--pp-text);
}
.atv-pp-box-head h2 i {
    color: var(--pp-acc);
}
.atv-pp-box-head > span {
    margin-right: auto;
    font-size: 12.5px;
    color: #aab0bd;
}
.atv-pp .is-sky { color: #38bdf8; }
.atv-pp .is-violet { color: #a78bfa; }
.atv-pp .is-rose { color: #fb7185; }
.atv-pp .is-amber { color: #fbbf24; }

/* Medal showcase */
.atv-pp-medals {
    background: radial-gradient(700px 200px at 50% 100%, rgba(245, 185, 66, 0.12), transparent 70%), var(--pp-box);
}
.atv-pp-medal-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.atv-pp-medal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    transition: transform 0.3s;
}
.atv-pp-medal:hover {
    transform: translateY(-6px);
}
.atv-pp-hex-o {
    display: block;
    filter: drop-shadow(0 0 14px rgba(var(--m), 0.55));
}
.atv-pp-hex {
    width: 92px;
    height: 104px;
    display: grid;
    place-items: center;
    clip-path: var(--pp-hex-poly);
    background: rgba(var(--m), 0.85);
}
.atv-pp-hex i {
    width: 88px;
    height: 100px;
    display: grid;
    place-items: center;
    clip-path: var(--pp-hex-poly);
    background: radial-gradient(circle at 50% 30%, rgba(var(--m), 0.45), rgba(var(--m), 0.08) 70%), #16171e;
    color: rgb(var(--m));
    font-size: 30px;
}
.atv-pp-medal b {
    font-size: 13px;
    color: var(--pp-text);
    line-height: 1.5;
}
.atv-pp-medal small {
    margin-top: -6px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--pp-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.atv-pp-medal.is-locked {
    opacity: 0.55;
}
.atv-pp-medal.is-locked .atv-pp-hex-o {
    filter: none;
}
.atv-pp-medal.is-locked .atv-pp-hex {
    background: rgba(255, 255, 255, 0.12);
}
.atv-pp-medal.is-locked .atv-pp-hex i {
    background: #16171e;
    color: #6b7280;
    font-size: 24px;
}

/* Watch status + genre taste */
.atv-pp-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
}
.atv-pp-watch {
    display: flex;
    align-items: center;
    gap: 24px;
}
.atv-pp-donut {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}
.atv-pp-donut svg {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35));
}
.atv-pp-donut-bg,
.atv-pp-donut-seg {
    fill: none;
    stroke-width: 12;
}
.atv-pp-donut-bg {
    stroke: rgba(255, 255, 255, 0.06);
}
.atv-pp-donut-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}
.atv-pp-donut-label b {
    font-size: 30px;
    font-weight: 900;
    color: var(--pp-text);
}
.atv-pp-donut-label small {
    font-size: 12px;
    color: var(--pp-muted);
}
.atv-pp-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.atv-pp .atv-pp-legend button {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--pp-text-2);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.atv-pp .atv-pp-legend button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
}
.atv-pp .atv-pp-legend button:disabled {
    cursor: default;
}
.atv-pp-legend b {
    margin-right: auto;
    color: var(--pp-text);
}
.atv-pp .atv-pp-legend button.is-zero {
    color: var(--pp-muted);
}
.atv-pp-legend button.is-zero .atv-pp-legend-dot {
    opacity: 0.45;
}
.atv-pp-legend button.is-zero b {
    color: var(--pp-muted);
}
.atv-pp-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}
.atv-pp-legend-dot.is-glow {
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.atv-pp-bubbles {
    min-height: 176px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
}
.atv-pp-bubble {
    width: var(--s);
    height: var(--s);
    padding: 6px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    color: #ffffff;
    background: radial-gradient(circle at 35% 30%, rgba(var(--c), 0.8), rgba(var(--c), 0.18));
    box-shadow: 0 0 36px -6px rgba(var(--c), 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    animation: atvPpFloat var(--d) ease-in-out infinite alternate;
}
.atv-pp-bubble:nth-child(even) {
    margin-top: 34px;
}
.atv-pp-bubble b {
    font-size: var(--fs);
    font-weight: 800;
}
.atv-pp-bubble small {
    font-size: 11px;
    opacity: 0.85;
}
.atv-pp-muted {
    margin: 0;
    font-size: 13px;
    color: var(--pp-muted);
}
.atv-pp-favs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.atv-pp-favs span {
    min-height: 34px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pp-line);
    font-size: 13px;
}
.atv-pp-favs strong {
    color: var(--pp-text);
}
.atv-pp .atv-pp-add-fav {
    display: inline-block;
    margin-top: 16px;
    font-size: 12.5px;
    color: #f5b942;
}

/* Activity tabs */
.atv-pp-activity-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.atv-pp-seg {
    display: inline-flex;
    max-width: 100%;
    padding: 5px;
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.07);
    scrollbar-width: none;
}
.atv-pp .atv-pp-seg button {
    height: 40px;
    margin: 0;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #aab0bd;
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.atv-pp-seg button small {
    font-size: 11.5px;
    opacity: 0.75;
}
.atv-pp .atv-pp-seg button.is-active {
    background: linear-gradient(180deg, #ffc964, #f0ab22);
    color: #1c1503;
    box-shadow: 0 8px 24px -8px rgba(245, 185, 66, 0.8);
}
.atv-pp-panel {
    display: none;
}
.atv-pp-panel.is-active {
    display: block;
}

.atv-pp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}
.atv-pp .atv-pp-filter {
    height: 36px;
    margin: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    color: #c3c8d2;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.atv-pp-filter small {
    opacity: 0.7;
}
.atv-pp .atv-pp-filter:hover {
    border-color: rgba(var(--pp-acc-rgb), 0.45);
    color: #ffffff;
}
.atv-pp .atv-pp-filter.is-active {
    border-color: rgba(var(--pp-acc-rgb), 0.6);
    background: rgba(var(--pp-acc-rgb), 0.14);
    color: #ffffff;
    box-shadow: 0 0 22px -6px rgba(var(--pp-acc-rgb), 0.7);
}

.atv-pp-shelf + .atv-pp-shelf {
    margin-top: 26px;
}
.atv-pp-shelf-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.atv-pp-shelf-head b {
    color: var(--pp-text);
}
.atv-pp-shelf-head span:last-child {
    font-size: 12.5px;
    color: var(--pp-muted);
}
.atv-pp-shelf-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 22px;
}
.atv-pp-shelf-grid::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--pp-acc-rgb), 0.45), transparent);
    filter: blur(2px);
}
.atv-pp-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.3;
    border-radius: 16px;
    overflow: hidden;
    background: #1c1f27;
    box-shadow: 0 22px 30px -16px rgba(0, 0, 0, 0.95);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.atv-pp-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.atv-pp-poster:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 30px 40px -18px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(var(--pp-acc-rgb), 0.5), 0 0 30px -6px rgba(var(--pp-acc-rgb), 0.5);
}
.atv-pp-poster:hover img {
    transform: scale(1.06);
}
.atv-pp-poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 11, 15, 0.92), rgba(10, 11, 15, 0) 52%);
}
.atv-pp-poster-ep {
    position: absolute;
    top: 8px;
    left: 8px;
    height: 22px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(12, 13, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
}
.atv-pp-poster-title {
    position: absolute;
    right: 10px;
    left: 10px;
    bottom: 10px;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.atv-pp-comments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.atv-pp-comment {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: var(--pp-tile);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, transform 0.2s;
}
.atv-pp-comment:hover {
    border-color: rgba(var(--pp-acc-rgb), 0.4);
    transform: translateY(-2px);
}
.atv-pp-comment img {
    width: 52px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 12px;
    object-fit: cover;
}
.atv-pp-comment-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.atv-pp-comment-body b {
    color: var(--pp-text);
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-pp-comment-text {
    margin: 4px 0 6px;
    color: var(--pp-text-2);
    font-size: 13.5px;
    line-height: 1.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.atv-pp-comment-body small {
    margin-top: auto;
    font-size: 12px;
    color: var(--pp-muted);
}

.atv-pp-board {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.atv-pp-board-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 18px;
    background: var(--pp-tile);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, background-color 0.2s;
}
.atv-pp-board-row:hover {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.05);
}
.atv-pp-rank-no {
    width: 36px;
    flex-shrink: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    color: #5b6170;
}
.is-top-1 .atv-pp-rank-no { color: #ffd98a; text-shadow: 0 0 18px rgba(245, 185, 66, 0.8); }
.is-top-2 .atv-pp-rank-no { color: #e5e7eb; text-shadow: 0 0 14px rgba(229, 231, 235, 0.5); }
.is-top-3 .atv-pp-rank-no { color: #f0a36b; text-shadow: 0 0 14px rgba(240, 163, 107, 0.6); }
.atv-pp-board-row img {
    width: 46px;
    height: 62px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
}
.atv-pp-board-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.atv-pp-board-body b {
    color: var(--pp-text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atv-pp-board-body small {
    font-size: 12.5px;
    color: var(--pp-muted);
}
.atv-pp-board-pill {
    height: 30px;
    padding: 0 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
    font-size: 12.5px;
    font-weight: 700;
}

.atv-pp-empty {
    padding: 46px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    border-radius: 20px;
    border: 1px dashed var(--pp-line-2);
    color: var(--pp-muted);
    font-size: 13px;
}
.atv-pp-empty i {
    font-size: 28px;
}
.atv-pp-empty b {
    color: var(--pp-text);
    font-size: 15px;
}

.atv-pp a:focus-visible,
.atv-pp button:focus-visible,
.atv-pp label:focus-within {
    outline: 2px solid var(--pp-acc);
    outline-offset: 2px;
}

/* ---------- Day mode: the member card stays dark, panels turn light ---------- */
#animetvApp.day .atv-pp {
    --pp-box: #ffffff;
    --pp-line: rgba(15, 23, 42, 0.08);
    --pp-line-2: rgba(15, 23, 42, 0.16);
    --pp-tile: #f6f7fb;
    --pp-text: #0f172a;
    --pp-text-2: #334155;
    --pp-muted: #64748b;
}
#animetvApp.day .atv-pp-panel-box {
    box-shadow: 0 24px 50px -32px rgba(15, 23, 42, 0.35);
}
#animetvApp.day .atv-pp-medals {
    background: radial-gradient(700px 200px at 50% 100%, rgba(245, 185, 66, 0.14), transparent 70%), #ffffff;
}
#animetvApp.day .atv-pp-box-head > span { color: #64748b; }
#animetvApp.day .atv-pp-donut-bg { stroke: rgba(15, 23, 42, 0.08); }
#animetvApp.day .atv-pp .atv-pp-legend button:hover:not(:disabled) { background: #f1f3f8; }
#animetvApp.day .atv-pp-seg { background: #f1f3f8; border-color: rgba(15, 23, 42, 0.06); }
#animetvApp.day .atv-pp .atv-pp-seg button:not(.is-active) { color: #475569; }
#animetvApp.day .atv-pp .atv-pp-filter { background: #ffffff; border-color: rgba(15, 23, 42, 0.12); color: #334155; }
#animetvApp.day .atv-pp .atv-pp-filter.is-active { color: #0f172a; }
#animetvApp.day .atv-pp-comment,
#animetvApp.day .atv-pp-board-row { border-color: rgba(15, 23, 42, 0.06); }
#animetvApp.day .atv-pp-favs span { background: #f6f7fb; }
#animetvApp.day .atv-pp-medal.is-locked .atv-pp-hex { background: rgba(15, 23, 42, 0.16); }
#animetvApp.day .atv-pp-medal.is-locked .atv-pp-hex i { background: #eef1f6; color: #94a3b8; }
#animetvApp.day .atv-pp-medal.is-unlocked .atv-pp-hex i { background: radial-gradient(circle at 50% 30%, rgba(var(--m), 0.35), rgba(var(--m), 0.08) 70%), #ffffff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .atv-pp-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-pp-side {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
    .atv-pp-medal-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 22px;
    }
}
@media (max-width: 760px) {
    .atv-pp-duo,
    .atv-pp-comments {
        grid-template-columns: minmax(0, 1fr);
    }
    .atv-pp-panel-box {
        padding: 18px;
        border-radius: 22px;
    }
    .atv-pp-shelf-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }
    .atv-pp-board-pill {
        display: none;
    }
}
@media (max-width: 420px) {
    .atv-pp-card-in {
        padding: 20px 16px;
    }
    .atv-pp-watch {
        flex-direction: column;
        align-items: stretch;
    }
    .atv-pp-donut {
        margin: 0 auto;
    }
    .atv-pp-hex {
        width: 76px;
        height: 86px;
    }
    .atv-pp-hex i {
        width: 72px;
        height: 82px;
        font-size: 24px;
    }
    .atv-pp-medal-row {
        gap: 18px 6px;
    }
    .atv-pp .atv-pp-name {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .atv-pp-card,
    .atv-pp-avatar,
    .atv-pp-bubble {
        animation: none;
    }
    .atv-pp-card,
    .atv-pp-poster,
    .atv-pp-poster img,
    .atv-pp-medal {
        transition: none;
    }
}
