/* Ranking Page Specific Styles */
:root {
    --rank-gold: #FFD700;
    --rank-silver: #C0C0C0;
    --rank-bronze: #CD7F32;
    --rank-bg-gold: rgba(255, 215, 0, 0.1);
    --rank-bg-silver: rgba(192, 192, 192, 0.1);
    --rank-bg-bronze: rgba(205, 127, 50, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-color: #0984e3;
    /* IPM Blue-ish or similar competitive color */
    --card-radius: 16px;
    --anim-speed: 0.3s;
}

body.page-ranking {
    overflow-x: hidden;
}

/* Base Layout */
.ranking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px 100px;
    /* Bottom padding for bottom nav */
    min-height: 100vh;
    width: 100%;
}

.ranking-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.ranking-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ranking-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
    margin-top: 5px;
}

.ranking-period-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(9, 132, 227, 0.08);
    border: 1px solid rgba(9, 132, 227, 0.18);
    border-radius: 12px;
    padding: 10px 14px;
    margin: 0 auto 24px;
    max-width: 720px;
}

.ranking-share-btn {
    border: 1px solid rgba(9, 132, 227, 0.28);
    background: #ffffff;
    color: #0f172a;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ranking-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(9, 132, 227, 0.14);
}

.ranking-share-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ranking-archive-section {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(232, 244, 255, 0.78));
    border: 1px solid rgba(9, 132, 227, 0.16);
    border-radius: 16px;
    padding: 14px;
    margin: 0 auto 22px;
    max-width: 720px;
    box-shadow: 0 8px 18px rgba(9, 132, 227, 0.08);
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.archive-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #0f172a;
}

.archive-header p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #475569;
}

.archive-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.archive-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.archive-select {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 8px 10px;
}

.archive-select:disabled {
    opacity: 0.7;
}

.archive-meta {
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 10px;
}

.archive-empty {
    background: rgba(148, 163, 184, 0.12);
    border: 1px dashed rgba(100, 116, 139, 0.35);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.84rem;
    color: #64748b;
    text-align: center;
}

.archive-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.archive-card {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #ffffff;
    padding: 10px;
    display: grid;
    gap: 6px;
}

.archive-card.rank-1 {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 8px 16px rgba(212, 175, 55, 0.14);
}

.archive-card.rank-2 {
    border-color: rgba(148, 163, 184, 0.35);
}

.archive-card.rank-3 {
    border-color: rgba(205, 127, 50, 0.32);
}

.archive-card.is-empty {
    background: #f8fafc;
    border-style: dashed;
    opacity: 0.82;
}

.archive-rank {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.archive-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-pimpinan {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(9, 132, 227, 0.12);
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    color: #334155;
}

.archive-score {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
}

.hall-of-fame-wrap {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.hall-of-fame-wrap h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: #0f172a;
}

.hall-of-fame-list {
    display: grid;
    gap: 8px;
}

.hof-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    padding: 8px 10px;
}

.hof-pos {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(9, 132, 227, 0.12);
    color: #1e3a8a;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hof-name {
    font-size: 0.84rem;
    color: #0f172a;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hof-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a05523;
    background: #fff7ed;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    padding: 4px 8px;
}

.period-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 6px 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.reset-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* User Rank Card (Sticky/Highlighted) */
.user-rank-card {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    color: white;
    border-radius: var(--card-radius);
    padding: 1.2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(9, 132, 227, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.user-rank-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    transform: rotate(45deg);
    pointer-events: none;
}

.user-rank-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.user-rank-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-rank-name {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-rank-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-rank-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.user-stats {
    text-align: right;
    min-width: 84px;
    font-variant-numeric: tabular-nums;
}

.user-score {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
}

.user-time {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Controls & Filter */
.ranking-controls {
    margin-bottom: 2rem;
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(9, 132, 227, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
}

/* Top 3 Podium */
.top-3-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 2rem;
    align-items: stretch;
}

.podium-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 220px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.podium-item.rank-1 {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 8px 18px rgba(212, 175, 55, 0.16);
}

.podium-item.rank-2 {
    border-color: rgba(148, 163, 184, 0.45);
}

.podium-item.rank-3 {
    border-color: rgba(205, 127, 50, 0.35);
}

.podium-item.is-empty {
    border-style: dashed;
    background: #f8fafc;
    box-shadow: none;
    opacity: 0.8;
}

.avatar-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-container.placeholder {
    border-style: dashed;
    box-shadow: none;
    color: #94a3b8;
    background: #f1f5f9;
}

.rank-1 .avatar-container {
    width: 72px;
    height: 72px;
    border-color: var(--rank-gold);
    background: #fffbeb;
}

.rank-2 .avatar-container {
    border-color: var(--rank-silver);
}

.rank-3 .avatar-container {
    border-color: var(--rank-bronze);
}

.crown-icon {
    font-size: 1.1rem;
    color: var(--rank-gold);
}

.podium-base {
    width: 100%;
    border-radius: 0;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    min-height: 112px;
}

.podium-rank {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.podium-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    min-height: 2.3em;
    width: 100%;
    text-align: center;
}

.podium-pimpinan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(9, 132, 227, 0.12);
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0 auto 2px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-score {
    font-weight: 700;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.rank-1 .podium-score {
    color: #d4af37;
}

.rank-2 .podium-score {
    color: #7f8c8d;
}

.rank-3 .podium-score {
    color: #a05523;
}

/* List Ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 36px minmax(0, 1fr) 76px;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    gap: 12px;
    overflow: hidden;
    opacity: 0;
    animation: slideUp 0.4s forwards;
}

.rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.rank-item.is-me {
    background: #f0f8ff;
    border-left-color: var(--accent-color);
}

.rank-pos {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
}

.rank-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.rank-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-pimpinan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(9, 132, 227, 0.12);
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.rank-score-box {
    text-align: right;
    min-width: 72px;
    font-variant-numeric: tabular-nums;
}

.rank-score {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.rank-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
}

.rank-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8f1ff;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    overflow: hidden;
    flex-shrink: 0;
}

.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-avatar .avatar-char {
    line-height: 1;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -8px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Notification Toast (Custom for Ranking) */
.rank-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 90%;
    max-width: 350px;
}

.rank-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.rank-toast-icon {
    font-size: 1.2rem;
    color: var(--rank-gold);
}

.rank-toast-content {
    flex: 1;
}

.rank-toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.rank-toast-msg {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Responsive adjustments */
/* Responsive adjustments & Visual Hierarchy */
@media (max-width: 480px) {
    .ranking-container {
        padding-top: 10px;
    }

    /* Top 3 lebih rapi dan konsisten di mobile */
    .top-3-container {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 1.5rem;
    }

    .podium-item {
        min-height: 0;
        padding: 12px;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 12px;
        align-items: center;
    }

    .podium-base {
        min-height: 0;
        align-items: flex-start;
        text-align: left;
    }

    .podium-name,
    .podium-pimpinan,
    .podium-score,
    .podium-rank {
        text-align: left;
    }

    .avatar-container {
        width: 56px;
        height: 56px;
        margin-bottom: 0;
    }

    .rank-1 .avatar-container {
        width: 62px;
        height: 62px;
    }

    .podium-name {
        font-size: 0.9rem;
        min-height: 0;
    }

    .podium-score {
        font-size: 0.95rem;
    }

    /* Separator Label */
    .ranking-list::before {
        content: 'Peringkat Global';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        color: var(--text-secondary);
        margin: 0 auto 16px;
        font-weight: 700;
        opacity: 0.6;
        position: relative;
    }

    /* Compact List Items */
    .rank-item {
        grid-template-columns: 28px 28px minmax(0, 1fr) 62px;
        padding: 10px 12px;
        gap: 10px;
        border-radius: 10px;
    }

    .rank-pos {
        font-size: 0.9rem;
    }

    .rank-name {
        font-size: 0.9rem;
    }

    .rank-meta {
        font-size: 0.7rem;
    }

    .rank-score {
        font-size: 0.9rem;
    }

    .rank-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    /* Sticky User Card */
    .user-rank-card {
        padding: 1rem;
        margin-bottom: 2rem;
        border-radius: 12px;
    }

    .user-rank-value {
        font-size: 1.5rem;
    }

    .user-score {
        font-size: 1.2rem;
    }
}

@media (max-width: 414px) {
    .rank-item {
        grid-template-columns: 28px 28px minmax(0, 1fr) 58px;
        padding: 10px 10px;
        gap: 8px;
    }

    .rank-score-box {
        min-width: 58px;
    }

    .rank-score {
        font-size: 0.85rem;
    }

    .rank-time {
        font-size: 0.65rem;
    }
}

@media (max-width: 375px) {
    .rank-item {
        grid-template-columns: 26px 26px minmax(0, 1fr) 54px;
        padding: 9px 10px;
    }

    .rank-name {
        font-size: 0.85rem;
    }

    .rank-pimpinan {
        font-size: 0.7rem;
    }

    .rank-meta {
        font-size: 0.65rem;
    }

    .rank-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
}

@media (max-width: 320px) {
    .ranking-container {
        padding: 12px 12px 100px;
    }

    .rank-item {
        grid-template-columns: 24px 24px minmax(0, 1fr) 50px;
        padding: 8px 8px;
    }

    .rank-pos {
        font-size: 0.8rem;
    }

    .rank-score {
        font-size: 0.8rem;
    }

    .rank-time {
        font-size: 0.6rem;
    }
}

/* --- New UX Enhancements --- */

/* Active Indicators */
.active-badge {
    display: inline-block;
    font-size: 0.8rem;
    margin-left: 4px;
    animation: pulse-fire 2s infinite;
    cursor: help;
}

.active-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #2ecc71;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-fire {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        filter: drop-shadow(0 0 4px orange);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* Rank Movement */
.rank-move {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 16px;
    margin-top: 2px;
    font-size: 0.8rem;
}

.rank-up {
    color: #2ecc71;
    animation: slideUpSmall 0.3s ease;
}

.rank-down {
    color: #e74c3c;
    animation: slideDownSmall 0.3s ease;
}

.rank-same {
    color: #bdc3c7;
    opacity: 0.5;
    font-size: 0.6rem;
}

.rank-new {
    background: var(--accent-color);
    color: white;
    font-size: 0.5rem;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
}

@keyframes slideUpSmall {
    from {
        transform: translateY(5px);
        opacity: 0;
    }

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

@keyframes slideDownSmall {
    from {
        transform: translateY(-5px);
        opacity: 0;
    }

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

/* Motivational Copy */
.rank-motivation-text {
    font-size: 0.75rem;
    color: #e67e22;
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    gap: 6px;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.cta-mini {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.cta-mini:hover {
    transform: scale(1.05);
    background: #076dbf;
}

/* Global CTA */
.ranking-footer-cta {
    margin-top: 24px;
    text-align: center;
    padding-bottom: 20px;
}

.btn-shine {
    position: relative;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent-color), #0984e3);
    color: white;
    font-family: inherit;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(9, 132, 227, 0.4);
    transition: transform 0.2s;
}

.btn-shine:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 132, 227, 0.5);
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Enhanced Podium Badges */
.badge-box {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #0f172a;
    color: white;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    z-index: 3;
}

.badge-box.silver {
    background: var(--rank-silver);
}

.badge-box.bronze {
    background: var(--rank-bronze);
}

.badge-box.gold {
    background: var(--rank-gold);
}

@media (max-width: 768px) {
    .ranking-period-note {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ranking-share-btn {
        align-self: stretch;
        justify-content: center;
    }

    .archive-header {
        flex-direction: column;
        align-items: stretch;
    }

    .archive-controls {
        min-width: 0;
    }

    .archive-podium {
        grid-template-columns: 1fr;
    }
}

.crown-box {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    color: var(--rank-gold);
    filter: drop-shadow(0 2px 5px rgba(255, 215, 0, 0.6));
    animation: floatCrown 2s ease-in-out infinite;
    z-index: 5;
}

@keyframes floatCrown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* Premium Esport Podium Override */
.top-3-container {
    align-items: flex-end;
    min-height: 240px;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.03) 0%, transparent 60%);
    margin-top: 30px;
    gap: 16px;
}
.podium-item.rank-1 { z-index: 3; margin-bottom: 0px;}
.podium-item.rank-2 { z-index: 2; margin-bottom: -15px; }
.podium-item.rank-3 { z-index: 1; margin-bottom: -25px; }

.podium-item.rank-1 .avatar-container { box-shadow: 0 0 0 4px #fbbf24, 0 0 20px rgba(251, 191, 36, 0.6); margin-bottom: -20px; width: 80px; height: 80px; }
.podium-item.rank-2 .avatar-container { box-shadow: 0 0 0 3px #94a3b8, 0 0 15px rgba(148, 163, 184, 0.4); margin-bottom: -15px; }
.podium-item.rank-3 .avatar-container { box-shadow: 0 0 0 3px #b45309, 0 0 15px rgba(180, 83, 9, 0.4); margin-bottom: -15px; }

.podium-item {
    transition: transform 0.3s ease;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.podium-item:hover { transform: translateY(-5px); }

.podium-item.is-empty .podium-base { border-style: dashed; opacity: 0.7; box-shadow: none; }

.podium-base {
    background: #fff;
    border-radius: 12px;
    padding: 35px 8px 15px;
    text-align: center;
    width: 100%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1;
}
.rank-1 .podium-base { padding-top: 40px; background: linear-gradient(to bottom, #fff, #fffaeb); border: 1px solid #fde68a;}
.rank-2 .podium-base { padding-top: 35px; background: linear-gradient(to bottom, #fff, #f8fafc); border: 1px solid #e2e8f0; }
.rank-3 .podium-base { padding-top: 35px; background: linear-gradient(to bottom, #fff, #fffbeb); border: 1px solid #fef3c7; }

/* Badge Box Adjustments */
.badge-box {
    top: auto;
    bottom: -6px;
    right: 50%;
    transform: translateX(50%);
    width: 24px;
    height: 24px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.badge-box.gold { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; border: 2px solid #fff;}
.badge-box.silver { background: linear-gradient(135deg, #64748b, #94a3b8); color: white; border: 2px solid #fff;}
.badge-box.bronze { background: linear-gradient(135deg, #b45309, #d97706); color: white; border: 2px solid #fff;}
