/* =========================================================
   Drosly Premium Gamified Leaderboard
   File: public/landing/css/leaderboard.css
   Scope-safe: all classes start with .drosly-lb
========================================================= */

.drosly-lb {
    --lb-deep: #023720;
    --lb-deep-2: #012617;
    --lb-green: #008a50;
    --lb-green-2: #00b86b;
    --lb-mint: #dcfff1;
    --lb-mint-2: #f4fffa;
    --lb-gold: #f8c84c;
    --lb-gold-2: #ffeaa0;
    --lb-silver: #dbe7ef;
    --lb-bronze: #d69a63;
    --lb-text: #11251d;
    --lb-muted: #60756e;
    --lb-border: rgba(0, 138, 80, .14);
    --lb-shadow: 0 24px 80px rgba(2, 55, 32, .12);

    position: relative;
    min-height: 100vh;
    padding: 56px 0 90px;
    overflow: hidden;
    color: var(--lb-text);
    background:
        radial-gradient(circle at 10% 5%, rgba(0, 184, 107, .18), transparent 28rem),
        radial-gradient(circle at 90% 10%, rgba(248, 200, 76, .16), transparent 24rem),
        radial-gradient(circle at 50% 100%, rgba(0, 138, 80, .10), transparent 34rem),
        linear-gradient(180deg, #ffffff 0%, #f4fffa 42%, #ffffff 100%);
}

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

.drosly-lb::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .45;
    background-image:
        linear-gradient(rgba(2,55,32,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2,55,32,.035) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.drosly-lb::after {
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    right: -280px;
    top: 150px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0,184,107,.16), transparent 65%);
    filter: blur(4px);
    pointer-events: none;
    animation: lbOrbFloat 9s ease-in-out infinite;
}

.drosly-lb-container {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

/* ================= Hero ================= */

.drosly-lb-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 38px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(248,200,76,.85), rgba(0,184,107,.8), rgba(255,255,255,.4));
    box-shadow:
        0 38px 120px rgba(2, 55, 32, .22),
        0 0 0 1px rgba(255,255,255,.65) inset;
}

.drosly-lb-hero::before {
    content: "";
    position: absolute;
    inset: -120px;
    z-index: -1;
    background: conic-gradient(from 120deg, transparent, rgba(248,200,76,.25), rgba(0,184,107,.35), transparent);
    animation: lbHeroAura 8s linear infinite;
}

.drosly-lb-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 34px;
    align-items: center;
    min-height: 410px;
    border-radius: 36px;
    padding: 48px;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 20rem),
        radial-gradient(circle at 18% 92%, rgba(0,184,107,.24), transparent 24rem),
        linear-gradient(135deg, #023720 0%, #006a3e 52%, #00a35f 100%);
}

.drosly-lb-hero-grid::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -90px;
    top: -140px;
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    box-shadow:
        -90px 190px 0 rgba(255,255,255,.06),
        -380px 80px 0 rgba(248,200,76,.10);
}

.drosly-lb-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 999px;
    color: #e9fff5;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.11);
    backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.drosly-lb-title {
    margin: 22px 0 0;
    color: #fff;
    font-size: clamp(38px, 5vw, 76px);
    line-height: .95;
    font-weight: 1000;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 50px rgba(0,0,0,.22);
}

.drosly-lb-title span {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: 6px;
    color: transparent;
    background: linear-gradient(90deg, #fff7bf, #bffff0, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 22px rgba(248,200,76,.16));
}

.drosly-lb-desc {
    max-width: 670px;
    margin-top: 18px;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.85;
    font-weight: 650;
}

.drosly-lb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 30px;
}

.drosly-lb-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    overflow: hidden;
    font-weight: 950;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.drosly-lb-btn::before {
    content: "";
    position: absolute;
    top: -60%;
    left: -80%;
    width: 45%;
    height: 220%;
    transform: rotate(24deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
    opacity: 0;
    transition: .25s ease;
}

.drosly-lb-btn:hover::before {
    left: 130%;
    opacity: 1;
    transition: .75s ease;
}

.drosly-lb-btn-primary {
    color: var(--lb-deep);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(0,0,0,.20);
}

.drosly-lb-btn-ghost {
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.09);
    backdrop-filter: blur(14px);
}

.drosly-lb-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 54px rgba(0,0,0,.22);
}

/* ================= Hero Score Card ================= */

.drosly-lb-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 28px;
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    background:
        linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.08)),
        radial-gradient(circle at top right, rgba(248,200,76,.20), transparent 14rem);
    backdrop-filter: blur(22px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        0 28px 70px rgba(0,0,0,.24);
    transform: perspective(1000px) rotateY(-7deg) rotateX(3deg);
    animation: lbCardBreath 4.8s ease-in-out infinite;
}

.drosly-lb-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0%, rgba(255,255,255,.18) 45%, transparent 60%);
    transform: translateX(-110%);
    animation: lbGlassSweep 4.6s ease-in-out infinite;
}

.drosly-lb-mini-title {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.72);
}

.drosly-lb-mini-score {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    font-size: clamp(38px, 4vw, 58px);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

.drosly-lb-mini-score small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.70);
    font-weight: 850;
    letter-spacing: 0;
}

.drosly-lb-mini-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 11px;
    margin-top: 24px;
}

.drosly-lb-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.12);
}

.drosly-lb-mini-item strong {
    color: rgba(255,255,255,.80);
    font-size: 13px;
    font-weight: 850;
}

.drosly-lb-mini-item span {
    color: #cffff0;
    font-size: 14px;
    font-weight: 1000;
}

/* ================= Period Tabs ================= */

.drosly-lb-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 11px;
    margin: 28px 0 0;
}

.drosly-lb-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    color: var(--lb-deep);
    font-size: 13px;
    font-weight: 950;
    text-decoration: none;
    border: 1px solid rgba(0,138,80,.14);
    background: rgba(255,255,255,.72);
    box-shadow: 0 16px 34px rgba(2,55,32,.06);
    backdrop-filter: blur(14px);
    transition: .22s ease;
}

.drosly-lb-tab:hover,
.drosly-lb-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--lb-deep), var(--lb-green));
    border-color: rgba(248,200,76,.35);
    transform: translateY(-3px);
    box-shadow:
        0 18px 38px rgba(2,55,32,.16),
        0 0 0 4px rgba(0,138,80,.08);
}

/* ================= Stats ================= */

.drosly-lb-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.drosly-lb-stat {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.72)),
        radial-gradient(circle at top right, rgba(0,184,107,.15), transparent 12rem);
    border: 1px solid var(--lb-border);
    box-shadow: var(--lb-shadow);
    backdrop-filter: blur(18px);
    transition: .25s ease;
}

.drosly-lb-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 34px 90px rgba(2,55,32,.15);
}

.drosly-lb-stat::before {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -38px;
    top: -38px;
    border-radius: 999px;
    background: rgba(248,200,76,.18);
}

.drosly-lb-stat span {
    display: block;
    color: var(--lb-muted);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.drosly-lb-stat strong {
    position: relative;
    display: block;
    margin-top: 9px;
    color: var(--lb-deep);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: -0.04em;
}

/* ================= Section Head ================= */

.drosly-lb-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 22px;
    margin: 48px 0 24px;
}

.drosly-lb-section-head h2 {
    margin: 0;
    color: var(--lb-deep);
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: -0.05em;
}

.drosly-lb-section-head p {
    margin: 8px 0 0;
    color: var(--lb-muted);
    font-size: 15px;
    font-weight: 750;
}

/* ================= Podium ================= */

.drosly-lb-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: end;
}

.drosly-lb-podium-card {
    position: relative;
    overflow: hidden;
    min-height: 315px;
    padding: 30px 24px;
    border-radius: 34px;
    text-align: center;
    border: 1px solid var(--lb-border);
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.74)),
        radial-gradient(circle at 50% 0%, rgba(0,184,107,.16), transparent 16rem);
    box-shadow: var(--lb-shadow);
    backdrop-filter: blur(16px);
    transform-style: preserve-3d;
    transition: transform .28s ease, box-shadow .28s ease;
    animation: lbPodiumIn .6s ease both;
}

.drosly-lb-podium-card:nth-child(2) {
    animation-delay: .08s;
}

.drosly-lb-podium-card:nth-child(3) {
    animation-delay: .16s;
}

.drosly-lb-podium-card:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 42px 100px rgba(2,55,32,.17);
}

.drosly-lb-podium-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.42), transparent);
    transform: translateX(-125%);
    transition: .8s ease;
}

.drosly-lb-podium-card:hover::before {
    transform: translateX(125%);
}

.drosly-lb-podium-card.rank-1 {
    min-height: 380px;
    border-color: rgba(248,200,76,.50);
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,252,232,.80)),
        radial-gradient(circle at 50% 0%, rgba(248,200,76,.32), transparent 18rem);
    box-shadow:
        0 38px 110px rgba(248,200,76,.14),
        0 24px 80px rgba(2,55,32,.12);
}

.drosly-lb-podium-card.rank-2 {
    min-height: 345px;
}

.drosly-lb-podium-card.rank-3 {
    min-height: 325px;
}

.drosly-lb-rank-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    font-size: 15px;
    font-weight: 1000;
    background: linear-gradient(135deg, var(--lb-deep), var(--lb-green));
    box-shadow: 0 16px 34px rgba(0,138,80,.25);
}

.drosly-lb-crown {
    position: relative;
    z-index: 1;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 22px;
    font-size: 28px;
    background: linear-gradient(135deg, #fff5b8, #f8c84c);
    box-shadow:
        0 20px 34px rgba(248,200,76,.30),
        0 0 28px rgba(248,200,76,.26);
    animation: lbCrownFloat 2.8s ease-in-out infinite;
}

.drosly-lb-avatar {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 30px;
    color: #fff;
    font-size: 26px;
    font-weight: 1000;
    letter-spacing: -0.03em;
    background:
        linear-gradient(135deg, var(--lb-green), var(--lb-green-2)),
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.65), transparent 35%);
    border: 5px solid #fff;
    box-shadow:
        0 20px 38px rgba(0,138,80,.24),
        inset 0 1px 0 rgba(255,255,255,.28);
}

.drosly-lb-name {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    color: var(--lb-text);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 1000;
}

.drosly-lb-sub {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    color: var(--lb-muted);
    font-size: 13px;
    font-weight: 800;
}

.drosly-lb-points {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 17px;
    border-radius: 999px;
    color: #fff;
    font-weight: 1000;
    background: linear-gradient(135deg, var(--lb-deep), var(--lb-green));
    box-shadow:
        0 18px 32px rgba(2,55,32,.18),
        0 0 0 4px rgba(0,138,80,.08);
}

.drosly-lb-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 17px;
}

.drosly-lb-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--lb-deep);
    font-size: 12px;
    font-weight: 950;
    background: rgba(220,255,241,.82);
    border: 1px solid rgba(0,138,80,.10);
}

/* ================= Table ================= */

.drosly-lb-table-wrap {
    margin-top: 22px;
    overflow-x: auto;
    border-radius: 32px;
    padding: 14px;
    border: 1px solid var(--lb-border);
    background: rgba(255,255,255,.70);
    box-shadow: var(--lb-shadow);
    backdrop-filter: blur(18px);
}

.drosly-lb-table {
    width: 100%;
    min-width: 830px;
    border-collapse: separate;
    border-spacing: 0 11px;
}

.drosly-lb-table th {
    padding: 12px 16px;
    color: var(--lb-muted);
    text-align: start;
    font-size: 11px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.drosly-lb-table td {
    padding: 16px;
    color: var(--lb-text);
    font-weight: 850;
    background: rgba(255,255,255,.92);
    border-top: 1px solid rgba(0,138,80,.09);
    border-bottom: 1px solid rgba(0,138,80,.09);
    transition: .2s ease;
}

.drosly-lb-table tr:hover td {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(2,55,32,.06);
}

.drosly-lb-table td:first-child {
    border-left: 1px solid rgba(0,138,80,.09);
    border-radius: 20px 0 0 20px;
}

.drosly-lb-table td:last-child {
    border-right: 1px solid rgba(0,138,80,.09);
    border-radius: 0 20px 20px 0;
}

.drosly-lb-user {
    display: flex;
    align-items: center;
    gap: 13px;
}

.drosly-lb-user .drosly-lb-avatar {
    width: 50px;
    height: 50px;
    margin: 0;
    border-radius: 17px;
    border-width: 3px;
    font-size: 15px;
}

.drosly-lb-rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--lb-deep);
    font-weight: 1000;
    background: linear-gradient(135deg, #e8fff5, #ffffff);
    border: 1px solid rgba(0,138,80,.10);
}

.drosly-lb-empty {
    margin-top: 24px;
    padding: 42px 26px;
    border-radius: 30px;
    text-align: center;
    color: var(--lb-muted);
    font-size: 16px;
    font-weight: 850;
    background:
        linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.65)),
        radial-gradient(circle at top, rgba(0,184,107,.12), transparent 18rem);
    border: 1px dashed rgba(0,138,80,.26);
    box-shadow: 0 18px 60px rgba(2,55,32,.06);
}

/* ================= Animations ================= */

@keyframes lbHeroAura {
    to {
        transform: rotate(360deg);
    }
}

@keyframes lbOrbFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(45px) translateX(-35px);
    }
}

@keyframes lbCardBreath {
    0%, 100% {
        transform: perspective(1000px) rotateY(-7deg) rotateX(3deg) translateY(0);
    }
    50% {
        transform: perspective(1000px) rotateY(-5deg) rotateX(2deg) translateY(-8px);
    }
}

@keyframes lbGlassSweep {
    0%, 45% {
        transform: translateX(-110%);
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    78%, 100% {
        transform: translateX(115%);
        opacity: 0;
    }
}

@keyframes lbPodiumIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes lbCrownFloat {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-7px) rotate(4deg);
    }
}

/* ================= Responsive ================= */

@media (max-width: 980px) {
    .drosly-lb {
        padding: 36px 0 70px;
    }

    .drosly-lb-hero-grid {
        grid-template-columns: 1fr;
        padding: 34px;
    }

    .drosly-lb-hero-card {
        transform: none;
        animation: none;
    }

    .drosly-lb-stats,
    .drosly-lb-podium {
        grid-template-columns: 1fr;
    }

    .drosly-lb-podium-card,
    .drosly-lb-podium-card.rank-1,
    .drosly-lb-podium-card.rank-2,
    .drosly-lb-podium-card.rank-3 {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .drosly-lb-container {
        width: min(100% - 22px, 1200px);
    }

    .drosly-lb-hero {
        border-radius: 28px;
    }

    .drosly-lb-hero-grid {
        border-radius: 26px;
        padding: 26px;
    }

    .drosly-lb-title {
        font-size: 38px;
    }

    .drosly-lb-desc {
        font-size: 15px;
    }

    .drosly-lb-actions {
        flex-direction: column;
    }

    .drosly-lb-btn {
        width: 100%;
    }

    .drosly-lb-section-head {
        display: block;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .drosly-lb *,
    .drosly-lb *::before,
    .drosly-lb *::after {
        animation: none !important;
        transition: none !important;
    }
}
