/* webplayer — tela "Quem está assistindo?" + troca de servidor.
   Usa --accent / --bg definidos em index.php a partir do branding. */

/* O container fica dentro de .main-wrapper (já centralizado); por isso não
   define display/min-height próprios — o index.php controla via style inline. */
.wp-profiles {
    width: 100%;
    padding: 1em 0;
    box-sizing: border-box;
    color: var(--text, #fff);
}

.wp-profiles-title {
    font-size: clamp(32px, 5vw, 64px);
    margin: 0 0 12px;
    font-weight: 800;
    letter-spacing: -2px;
    color: #fff;
    text-align: center;
}

.wp-profiles-subtitle {
    margin: 0 0 2em;
    text-align: center;
    color: #9b9b9b;
    font-size: 1rem;
    line-height: 1.55;
    max-width: 520px;
}

/* Mensagem de tela (ex.: descoberta vazia ao trocar de servidor). */
.wp-profiles-error {
    margin: 0 0 1.5em;
    padding: 12px 18px;
    max-width: 480px;
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.14);
    color: #ff6b70;
    font-weight: 700;
    font-size: 0.92rem;
    text-align: center;
}

.wp-profile-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}

.wp-profile-card {
    cursor: pointer;
    width: 160px;
    padding: 6px 6px 16px;
    text-align: center;
    border-radius: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.wp-profile-card:hover,
.wp-profile-card:focus-visible {
    transform: scale(1.05) translateY(-6px);
    box-shadow: 0 18px 40px var(--accent, #8b5cf6);
}

.wp-profile-card:focus-visible {
    outline: 3px solid var(--accent, #8b5cf6);
    outline-offset: 4px;
}

.wp-profile-card.loading {
    opacity: 0.55;
    pointer-events: none;
}

.wp-profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid transparent;
    background: var(--bg, #0b0620);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-profile-card:hover .wp-profile-avatar,
.wp-profile-card:focus-visible .wp-profile-avatar {
    border-color: #fff;
}

.wp-profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-profile-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3.4rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent, #8b5cf6) 0%, transparent 100%);
}

.wp-profile-name {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #e5e5e5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-profile-host {
    margin: 0;
    font-size: 0.78rem;
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Erro por card (falha ao selecionar aquele servidor). */
.wp-profile-card-error {
    display: none;
    margin: 8px 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ff6b70;
}

.wp-profile-card.has-error .wp-profile-card-error {
    display: block;
}

@media (max-width: 640px) {
    .wp-profile-card {
        width: 130px;
    }
    .wp-profile-avatar {
        width: 110px;
        height: 110px;
    }
    .wp-profile-initial {
        font-size: 2.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-profile-card,
    .wp-profile-avatar {
        transition: none;
    }
    .wp-profile-card:hover,
    .wp-profile-card:focus-visible {
        transform: none;
    }
}
