
/* ============================================================
   VOICE AKTORZY — proste karty-flip (najechanie odwraca kartę):
   awers: skin NPC + nazwa + głos, rewers: aktor + opis + sociale.
   ============================================================ */
#voice {
    position: relative;
    background:
        radial-gradient(70% 45% at 50% 0%, rgba(228, 59, 107, 0.12), transparent 60%),
        radial-gradient(90% 55% at 50% 116%, rgba(178, 68, 74, 0.12), transparent 72%);
}

#voice .content {
    display: flex;
    flex-direction: column;
    gap: 46px;
}

#voice .va-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    align-items: center;
}

#voice .va-head h1 {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: var(--display-font);
    color: var(--white-color);
    font-size: 42px;
    font-weight: 700;
    text-transform: uppercase;
}

#voice .va-head h1::before,
#voice .va-head h1::after {
    content: "";
    height: 2px;
    width: 72px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(228, 59, 107, 0.65));
}
#voice .va-head h1::after {
    background: linear-gradient(90deg, rgba(228, 59, 107, 0.65), transparent);
}
#voice .va-head h1 i {
    color: var(--main-color);
    font-size: 30px;
    text-shadow: 0 0 20px rgba(228, 59, 107, 0.6);
}

#voice .va-head h1 span { color: var(--main-color); }

#voice .va-head p {
    color: var(--description-color);
    font-size: 17px;
    line-height: 1.6;
    max-width: 640px;
}

/* stan "wkrótce" (gdy config.voiceActors jest puste) */
#voice .va-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 60px 30px;
    border-radius: 18px;
    background: rgba(247, 170, 169, 0.05);
    border: 1px solid rgba(247, 170, 169, 0.14);
    color: var(--description-color);
    line-height: 1.6;
}
#voice .va-empty i { font-size: 40px; color: var(--main-color); }
#voice .va-empty b { color: var(--white-color); }

/* siatka kart */
#voice .va-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
}

/* --- prosta karta-flip --- */
#voice .user {
    position: relative;
    width: 242px;
    height: 404px;
    perspective: 900px;
    cursor: pointer;
    border-radius: 18px;
    transition: transform 0.25s ease;
}
#voice .user:hover { transform: translateY(-6px); }
#voice .user:focus-visible {
    outline: 2px solid var(--main-color);
    outline-offset: 4px;
}
#voice .card-flip {
    position: relative;
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
    will-change: transform;
}
#voice .user.flipped .card-flip { transform: rotateY(180deg); }
/* najechanie odwraca kartę (urządzenia z kursorem; na dotyku działa tap) */
@media (hover: hover) and (pointer: fine) {
    #voice .user:hover .card-flip { transform: rotateY(180deg); }
}

#voice .card-face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 18px;
    border-radius: 18px;
    /* gradientowa ramka: tło przycięte do padding-box, gradient w border-box */
    border: 1px solid transparent;
    background:
        radial-gradient(90% 55% at 50% 108%, rgba(228, 59, 107, 0.16), transparent 70%) padding-box,
        linear-gradient(180deg, rgba(46, 24, 30, 0.92), rgba(16, 8, 11, 0.96)) padding-box,
        linear-gradient(165deg, rgba(228, 59, 107, 0.60), rgba(247, 170, 169, 0.14) 45%, rgba(228, 59, 107, 0.50)) border-box;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}
#voice .user:hover .card-face {
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38), 0 0 32px rgba(228, 59, 107, 0.30);
}
#voice .card-back {
    transform: rotateY(180deg);
    gap: 12px;
    padding: 26px 22px;
    text-align: center;
}

/* --- awers: model NPC (poświata + świecący podest) --- */
#voice .card-front .skin-view {
    position: relative;
    width: 150px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#voice .card-front .skin-view::before {
    content: "";
    position: absolute;
    inset: -12px;
    background: radial-gradient(circle at 50% 42%, rgba(228, 59, 107, 0.20), transparent 62%);
    z-index: 0;
    pointer-events: none;
}
#voice .card-front .skin-view::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 112px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(50% 60% at 50% 50%, rgba(228, 59, 107, 0.55), rgba(228, 59, 107, 0.12) 60%, transparent 78%);
    animation: vaFloor 2.8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}
@keyframes vaFloor { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
#voice .skin-view .skin-canvas { z-index: 1; }
#voice .skin-view .skin-fallback { max-width: 150px; max-height: 200px; }
#voice .skin-view .skin-canvas {
    position: absolute;
    inset: 0;
    margin: auto;
    cursor: grab;
}
#voice .skin-view .skin-canvas:active { cursor: grabbing; }
#voice .skin-view.is-3d .skin-fallback { display: none; }

/* Render/obrazek modelu NPC */
#voice .skin-view .npc-render {
    position: relative;
    z-index: 1;
    max-width: 150px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
    animation: vaFloat 3s ease-in-out infinite;
}
@keyframes vaFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { #voice .skin-view .npc-render { animation: none; } }

/* nazwa NPC / nick aktora — różowa pigułka */
#voice .user .name {
    align-self: center;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(228, 59, 107, 0.16), rgba(20, 9, 12, 0.55));
    border: 1px solid rgba(228, 59, 107, 0.40);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 0 16px rgba(228, 59, 107, 0.18);
    color: var(--white-color);
    font-family: var(--display-font);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 15px;
    font-weight: 600;
}

/* przód: rola NPC pod nazwą */
#voice .card-front .va-npc-role {
    margin-top: -4px;
    color: #F27E9E;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    opacity: 0.92;
}

/* przód: chip "kto podkłada głos" */
#voice .card-front .va-voice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(247, 170, 169, 0.08);
    border: 1px solid rgba(247, 170, 169, 0.18);
    color: var(--description-color);
    font-size: 13px;
}
#voice .card-front .va-voice i { color: #F27E9E; font-size: 12px; }
#voice .card-front .va-voice b { color: #F27E9E; font-weight: 700; }

/* --- rewers: aktor --- */
#voice .card-back .va-avatar {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(228, 59, 107, 0.45);
    box-shadow: 0 0 24px rgba(228, 59, 107, 0.35);
}
#voice .card-back .va-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(228, 59, 107, 0.18), rgba(20, 9, 12, 0.6));
    color: #F27E9E;
    font-size: 30px;
}
#voice .card-back .va-role {
    color: var(--description-color);
    font-size: 13px;
    opacity: 0.85;
}
#voice .card-back .desc {
    color: var(--description-color);
    font-size: 14.5px;
    line-height: 1.65;
    max-width: 186px;
}
/* sociale aktora — pionowa lista: ikona + nazwa kanału */
#voice .card-back .va-socials {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
}
#voice .card-back .va-social-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(228, 59, 107, 0.12);
    border: 1px solid rgba(228, 59, 107, 0.32);
    color: #F27E9E;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}
#voice .card-back .va-social-row i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
}
#voice .card-back .va-social-row span {
    color: var(--white-color);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#voice .card-back a.va-social-row:hover {
    background: rgba(228, 59, 107, 0.24);
    transform: translateX(2px);
}
#voice .card-back .va-social-row.is-placeholder {
    opacity: 0.55;
    cursor: default;
}

/* --- karty-widmo „Wkrótce" (wypełniają rząd) --- */
#voice .va-ghost { cursor: default; }
#voice .va-ghost:hover { transform: none; }
#voice .va-ghost .va-ghost-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: 18px;
    border: 2px dashed rgba(247, 170, 169, 0.18);
    background: linear-gradient(180deg, rgba(46, 24, 30, 0.30), rgba(16, 8, 11, 0.42));
    color: rgba(217, 205, 208, 0.42);
}
#voice .va-ghost .va-ghost-ico {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(247, 170, 169, 0.05);
    border: 1px solid rgba(247, 170, 169, 0.12);
    font-size: 24px;
}
#voice .va-ghost .va-ghost-txt {
    font-family: var(--display-font);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
}

/*Responsive*/
@media (prefers-reduced-motion: reduce) {
    #voice .card-flip { transition: none; }
    #voice .card-front .skin-view::after { animation: none; }
}
@media screen and (max-width: 819px) {
    #voice .va-head h1 { font-size: 30px; }
}
@media screen and (max-width: 460px) {
    #voice .user { width: 100%; max-width: 260px; }
    /* na telefonie tytuł bez dekoracyjnych kresek (rozpychały go poza ekran) */
    #voice .va-head h1::before,
    #voice .va-head h1::after { display: none; }
    #voice .va-head h1 { font-size: 26px; gap: 10px; flex-wrap: wrap; justify-content: center; }
    #voice .va-head h1 i { font-size: 22px; }
}
