/* public/css/snifferboard.css */

/* ================= ROOT ================= */
:root {
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --highlight-bg: #e3f2fd;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --green-score: #4caf50;
    --red-score: #e91e63;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
}

/* ================= CONTAINER ================= */
.leaderboard-container {
    width: 100%;
    max-width: min(600px, 100%);
    margin: 40px auto;
    padding-inline: clamp(12px, 4vw, 20px);
}

/* ================= HEADER ================= */
.leaderboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.leaderboard-header h1,
.leaderboard-header h2 {
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin: 0;
}

.leaderboard-header h1 {
    font-size: 2.5rem;
}

.leaderboard-header h2 {
    font-size: 1.6rem;
}

.leaderboard-header p {
    font-size: 0.9rem;
    color: #777;
}

#snifferboard-title {
    font-size: clamp(1.6rem, 6vw, 3rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
}

/* ================= LIST ================= */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* ================= ITEM ================= */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    background: var(--card-bg);
    padding: clamp(10px, 3vw, 15px) clamp(12px, 4vw, 20px);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ================= ACTIVE USER ================= */
.leaderboard-item.active-user {
    background: var(--highlight-bg);
    border: 2px solid #2196f3;
    transform: scale(1.02);
    z-index: 2;
}

/* ================= COLUMNS ================= */
.rank-col {
    flex: 0 0 auto;
    width: 36px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.user-col {
    flex: 1 1 auto;
    min-width: 0;
}

.score-col {
    flex: 0 0 auto;
}

/* ================= USER ================= */
.user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    min-width: 0;
}

.avatar-wrapper img {
    width: clamp(32px, 10vw, 45px);
    height: clamp(32px, 10vw, 45px);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.username {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.username p {
    margin: 0;
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.verifiedIcon {
    width: 14px;
    height: 14px;
}

/* ================= SCORE ================= */
.score-badge {
    padding: clamp(4px, 1.5vw, 6px) clamp(10px, 3vw, 14px);
    border-radius: 20px;
    font-weight: 800;
    font-size: clamp(0.75rem, 3vw, 0.95rem);
    white-space: nowrap;
}

.score-badge.positive {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--green-score);
}

.score-badge.negative {
    background-color: rgba(233, 30, 99, 0.1);
    color: var(--red-score);
}

.score-badge.neutral {
    background-color: #eee;
    color: #777;
}

/* ================= RANK BADGES ================= */
.rank-badge {
    font-size: 1.4rem;
}

/* ================= LOAD MORE ================= */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
}

.load-btn {
    background: rgba(65, 255, 173, 0.695);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}

.load-btn:hover {
    background: rgba(65, 255, 173, 0.519);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.load-btn:active {
    transform: translateY(0);
}

.load-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.load-btn.hidden {
    display: none;
}

.icon {
    font-size: 1.1rem;
    font-weight: bold;
}

/* ================= HOME SNIFFERBOARD ================= */
.home-snifferboard {
    width: 100%;
    max-width: min(500px, 100%);
    margin: 40px auto;
    padding-inline: clamp(12px, 4vw, 20px);
}

/* ================= FOOTER ================= */
.snifferboard-footer {
    text-align: center;
    margin-top: 20px;
}

.view-all-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.view-all-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: translateY(-2px);
}

/* ================= ANIMATION ================= */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= MOBILE ================= */
@media (max-width: 420px) {
    .rank-col {
        width: 30px;
    }
}