/* ══════════════════════════════════════════════════════════════════════════
   PLAYZONE: "مين فينا؟" (WHO AMONG US?) - PARTY GAME STYLES
   Futuristic Dark Neon & Glassmorphic Design for 3-15 Players
   ══════════════════════════════════════════════════════════════════════════ */

.whoswho-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    position: relative;
}

/* ── Top Match Bar & Progress ── */
.ww-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 12px;
}

.ww-room-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.35);
    color: #F472B6;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.88rem;
    font-family: 'JetBrains Mono', monospace;
}

.ww-room-badge button {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
    font-size: 1rem;
    transition: transform 0.2s;
}
.ww-room-badge button:hover { transform: scale(1.15); }

.ww-round-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-primary);
}

.ww-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #F87171;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-weight: 900;
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
    min-width: 80px;
    justify-content: center;
    transition: all 0.3s;
}
.ww-timer-badge.urgent {
    animation: urgentPulse 0.8s infinite alternate;
    background: rgba(239, 68, 68, 0.3);
    color: #FECACA;
}

@keyframes urgentPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
    100% { transform: scale(1.08); box-shadow: 0 0 16px rgba(239, 68, 68, 0.6); }
}

/* ── Lobby Stage ── */
.ww-lobby-box {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.ww-lobby-header {
    margin-bottom: 28px;
}
.ww-lobby-icon-big {
    font-size: 3.5rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 6px 16px rgba(236, 72, 153, 0.4));
    display: inline-block;
    animation: gentleFloat 3s ease-in-out infinite;
}
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ww-lobby-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.ww-lobby-title span {
    background: linear-gradient(135deg, #F472B6, #EC4899, #DB2777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ww-lobby-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Lobby Room Code & Share Bar */
.ww-share-container {
    background: rgba(11, 15, 25, 0.7);
    border: 1px dashed rgba(236, 72, 153, 0.4);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    max-width: 680px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.ww-share-code-info {
    text-align: right;
}
.ww-share-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 700;
}
.ww-share-code-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: #F472B6;
    letter-spacing: 2px;
}
.ww-share-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-ww-copy, .btn-ww-wa {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: none;
}
.btn-ww-copy {
    background: rgba(56, 139, 253, 0.15);
    border: 1px solid rgba(56, 139, 253, 0.35);
    color: var(--accent-cyan);
}
.btn-ww-copy:hover {
    background: rgba(56, 139, 253, 0.3);
}
.btn-ww-wa {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.btn-ww-wa:hover {
    background: linear-gradient(135deg, #34D399, #10B981);
    transform: translateY(-2px);
}

/* Lobby Settings & Roster */
.ww-lobby-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    text-align: right;
    margin-bottom: 32px;
}
@media (max-width: 800px) {
    .ww-lobby-columns { grid-template-columns: 1fr; }
}

.ww-sub-panel {
    background: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
}
.ww-panel-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Roster list */
.ww-roster-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}
.ww-roster-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}
.ww-roster-card:hover {
    border-color: rgba(236, 72, 153, 0.4);
    transform: translateY(-2px);
}
.ww-roster-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
}
.ww-roster-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ww-roster-tag {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-weight: 700;
}
.ww-host-crown {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.9rem;
}

/* Lobby Form Inputs */
.ww-form-row {
    margin-bottom: 16px;
}
.ww-form-lbl {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.ww-select, .ww-input {
    width: 100%;
    background: var(--bg-raised);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
}
.ww-select:focus, .ww-input:focus {
    border-color: var(--accent-blue);
    outline: none;
}

/* Lobby Actions Buttons */
.ww-lobby-launch-bar {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.btn-ww-start {
    background: linear-gradient(135deg, #EC4899, #BE185D);
    border: 1px solid #F472B6;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    padding: 16px 42px;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(236, 72, 153, 0.45);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-ww-start:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 36px rgba(236, 72, 153, 0.65);
}
.btn-ww-bot {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #C084FC;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-ww-bot:hover {
    background: rgba(168, 85, 247, 0.25);
    transform: translateY(-2px);
}
.btn-ww-custom-q {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #FBBF24;
    padding: 14px 22px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-ww-custom-q:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════════════════════════
   2. ACTIVE GAMEPLAY STAGE (THE QUESTION & VOTING)
   ══════════════════════════════════════════════════════════════════════════ */
.ww-question-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 2px solid rgba(236, 72, 153, 0.45);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 0 32px rgba(236, 72, 153, 0.2);
    position: relative;
    transition: all 0.3s;
}
.ww-question-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #F472B6;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 18px;
}
.ww-question-text {
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.4;
    margin-bottom: 22px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.ww-question-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.btn-ww-speak {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-ww-speak:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Voting Status Notice */
.ww-status-banner {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 24px;
    color: var(--text-secondary);
}
.ww-status-banner.voted {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.12);
    color: #6EE7B7;
}

/* Players Grid for Voting */
.ww-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.ww-player-vote-card {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ww-player-vote-card:hover {
    transform: translateY(-4px);
    border-color: #EC4899;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.25);
}
.ww-player-vote-card.selected {
    border-color: #EC4899;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(15, 23, 42, 0.9));
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.45);
    transform: scale(1.03);
}
.ww-player-vote-card.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    filter: grayscale(20%);
}

.ww-vote-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: var(--shadow-sm);
    border: 3px solid rgba(255, 255, 255, 0.15);
}
.ww-vote-player-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 4px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ww-vote-status-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}
.ww-player-vote-card.voted-done .ww-vote-status-tag {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

/* ══════════════════════════════════════════════════════════════════════════
   3. REVEAL STAGE (THE DRAMATIC EXPOSURE & RESULTS)
   ══════════════════════════════════════════════════════════════════════════ */
.ww-reveal-stage {
    text-align: center;
    margin-bottom: 40px;
}

.ww-victim-spotlight {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.25) 0%, rgba(15, 23, 42, 0.98) 100%);
    border: 3px solid #EC4899;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    max-width: 650px;
    margin: 0 auto 32px;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.35);
    animation: spotlightPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes spotlightPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ww-victim-title {
    font-size: 1rem;
    font-weight: 800;
    color: #F472B6;
    margin-bottom: 12px;
    letter-spacing: 1px;
}
.ww-victim-avatar-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 14px;
}
.ww-victim-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    border: 4px solid #EC4899;
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.6);
}
.ww-victim-crown {
    position: absolute;
    top: -16px;
    right: -10px;
    font-size: 2rem;
    animation: crownFloat 2s ease-in-out infinite;
}
@keyframes crownFloat {
    0%, 100% { transform: rotate(15deg) translateY(0); }
    50% { transform: rotate(15deg) translateY(-6px); }
}

.ww-victim-name {
    font-size: 1.9rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 6px;
}
.ww-victim-votes-count {
    font-size: 1.15rem;
    font-weight: 800;
    color: #FCD34D;
    margin-bottom: 10px;
}
.ww-victim-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #FBBF24;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.95rem;
}

/* Detailed Tally Grid in Reveal Stage */
.ww-tally-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.ww-tally-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    text-align: right;
    transition: all 0.2s;
}
.ww-tally-card.top-voted {
    border-color: #EC4899;
    background: rgba(236, 72, 153, 0.08);
}
.ww-tally-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.ww-tally-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.ww-tally-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #FFFFFF;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ww-tally-vote-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 900;
    font-size: 0.85rem;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}
.ww-tally-card.top-voted .ww-tally-vote-badge {
    background: #EC4899;
    color: #FFFFFF;
}

.ww-voters-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.ww-voter-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Discussion Prompt & Reactions */
.ww-discussion-box {
    background: rgba(11, 15, 25, 0.8);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.ww-discussion-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FCD34D;
}
.ww-reactions-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.btn-ww-reaction {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 1.3rem;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s;
}
.btn-ww-reaction:hover {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.18);
}

/* Floating Reactions Stream */
.ww-floating-reactions-area {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 100px;
    height: 300px;
    pointer-events: none;
    z-index: 999;
}
.ww-floating-emoji {
    position: absolute;
    bottom: 0;
    font-size: 2rem;
    animation: floatUpFade 2.5s ease-out forwards;
}
@keyframes floatUpFade {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    50% { transform: translateY(-120px) scale(1.2); opacity: 0.9; }
    100% { transform: translateY(-250px) scale(1); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════════════════
   4. GAME OVER PODIUM & AWARDS
   ══════════════════════════════════════════════════════════════════════════ */
.ww-gameover-card {
    background: linear-gradient(135deg, rgba(24, 32, 48, 0.95), rgba(15, 23, 42, 0.98));
    border: 2px solid #EC4899;
    border-radius: var(--radius-xl);
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 0 40px rgba(236, 72, 153, 0.3);
}
.ww-gameover-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 8px;
}
.ww-gameover-title span {
    color: #F472B6;
}
.ww-gameover-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.ww-awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.ww-award-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.ww-award-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.ww-award-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: #FBBF24;
    margin-bottom: 6px;
}
.ww-award-winner {
    font-size: 1.25rem;
    font-weight: 900;
    color: #FFFFFF;
    margin-bottom: 4px;
}
.ww-award-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Modals */
.ww-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ww-modal-backdrop.open {
    display: flex;
}
.ww-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    text-align: right;
}
.ww-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.ww-modal-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #FFFFFF;
}
.btn-ww-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
