/* Reaction Widget + Share — Dark theme */
.reaction-widget {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
    align-items: center;
    position: relative;
}
.reaction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    user-select: none;
    position: relative;
}
.reaction-btn:hover {
    background: rgba(212,168,67,0.1);
    border-color: rgba(212,168,67,0.3);
    color: #fff;
}
.reaction-btn.active {
    background: rgba(212,168,67,0.15);
    border-color: rgba(212,168,67,0.5);
    color: #d4a843;
}
.reaction-btn.dimmed {
    opacity: 0.5;
}
.reaction-btn .r-emoji {
    font-size: 1rem;
    line-height: 1;
}
.reaction-btn .r-count {
    font-variant-numeric: tabular-nums;
    min-width: 1ch;
}
.reaction-btn .r-count.bounce {
    animation: r-bounce 0.3s ease;
}
@keyframes r-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); color: #d4a843; }
    100% { transform: scale(1); }
}
.reaction-btn .r-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    white-space: nowrap;
    pointer-events: none;
}
.reaction-btn .r-tooltip.show {
    display: block;
    animation: r-fade 1.5s ease forwards;
}
@keyframes r-fade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Share button in reaction widget */
.reaction-share-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 20px;
    color: #d4a843;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    user-select: none;
    margin-left: 4px;
}
.reaction-share-btn:hover {
    background: rgba(212,168,67,0.18);
    border-color: rgba(212,168,67,0.4);
}

/* Share dropdown */
.share-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: #1e1e30;
    border: 1px solid rgba(212,168,67,0.3);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: share-pop 0.15s ease;
}
@keyframes share-pop {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.share-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    cursor: pointer;
    border-radius: 6px;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}
.share-option:hover {
    background: rgba(212,168,67,0.12);
    color: #d4a843;
}

/* Standalone share button */
.standalone-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(212,168,67,0.1);
    border: 1px solid rgba(212,168,67,0.25);
    border-radius: 8px;
    color: #d4a843;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.standalone-share-btn:hover {
    background: rgba(212,168,67,0.2);
    border-color: rgba(212,168,67,0.4);
}

/* Toast */
.reaction-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #d4a843;
    color: #1a1a2e;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    animation: r-toast 2.5s ease forwards;
}
@keyframes r-toast {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Leaderboard styles */
.leaderboard-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    justify-content: center;
}
.leaderboard-tab {
    padding: 8px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.leaderboard-tab:hover {
    background: rgba(212,168,67,0.1);
    border-color: rgba(212,168,67,0.3);
}
.leaderboard-tab.active {
    background: rgba(212,168,67,0.15);
    border-color: rgba(212,168,67,0.5);
    color: #d4a843;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    transition: all 0.15s ease;
}
.leaderboard-entry:hover {
    background: rgba(212,168,67,0.06);
    border-color: rgba(212,168,67,0.15);
}
.lb-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    min-width: 36px;
    text-align: center;
}
.leaderboard-entry:nth-child(1) .lb-rank { color: #ffd700; font-size: 1.4rem; }
.leaderboard-entry:nth-child(2) .lb-rank { color: #c0c0c0; font-size: 1.3rem; }
.leaderboard-entry:nth-child(3) .lb-rank { color: #cd7f32; font-size: 1.3rem; }
.lb-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.05);
}
.lb-info {
    flex: 1;
    min-width: 0;
}
.lb-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.lb-party-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.lb-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #d4a843;
    white-space: nowrap;
}
.lb-reaction-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}
.lb-reaction-bar span {
    font-size: 0.82rem;
    white-space: nowrap;
}
.lb-share-btn {
    padding: 6px 10px;
    background: rgba(212,168,67,0.08);
    border: 1px solid rgba(212,168,67,0.2);
    border-radius: 6px;
    color: #d4a843;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.lb-share-btn:hover {
    background: rgba(212,168,67,0.18);
}

/* Coming soon overlay */
.coming-soon-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212,168,67,0.12);
    border: 1px solid rgba(212,168,67,0.3);
    border-radius: 12px;
    color: #d4a843;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .reaction-widget {
        gap: 6px;
    }
    .reaction-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    .reaction-share-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    .share-dropdown {
        right: auto;
        left: 0;
    }
    .leaderboard-entry {
        padding: 10px 12px;
        gap: 10px;
    }
    .lb-photo {
        width: 32px;
        height: 32px;
    }
    .lb-reaction-bar {
        display: none;
    }
}
