/**
 * Job Quest Gamification Styles
 * Matching Original Leaderboard Design
 */

@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;500;600;700&display=swap');

/* ========================================
   CHARACTER WIDGET (LEADERBOARD STYLE)
   ======================================== */

.jqg-character-widget {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.jqg-leaderboard {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.jqg-header {
    margin-bottom: 1rem;
}

.job-sidebar-title {
    font-family: "Poppins", "system-ui", "San Francisco", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", Arial, serif;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

/* ========================================
   TOP USER DISPLAY
   ======================================== */

.jqg-top-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.job-avatar-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    object-fit: contain;
    flex-shrink: 0;
}

.jqg-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.jqg-nickname {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jqg-level {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.jqg-score {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 8px rgba(102, 126, 234, 0.4);
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.4));
    flex-shrink: 0;
}

/* ========================================
   PROGRESS BARS
   ======================================== */

.jqg-progress-section {
    margin-bottom: 1rem;
}

.jqg-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.jqg-progress-bar {
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.jqg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff 0%, #667eea 100%);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.jqg-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
}

/* Magic Points Progress Bar Styling */
.jqg-magic-bar {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.3);
}

.jqg-magic-fill {
    background: linear-gradient(90deg, #ffd700 0%, #ffaa00 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    animation: magicPulse 2s ease-in-out infinite;
}

@keyframes magicPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.9);
    }
}

.jqg-magic-value {
    color: #ffd700;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* ========================================
   STATUS MESSAGES
   ======================================== */

.jqg-status-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.jqg-status-message.jqg-active {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.jqg-status-message.jqg-ready {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.5);
    color: #fff;
    animation: readyPulse 2s ease-in-out infinite;
    text-align: left;
    line-height: 1.6;
}

.jqg-status-message.jqg-ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.jqg-levelup-notification {
    cursor: pointer;
}

.jqg-notification-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.jqg-notification-text {
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: left;
}

.jqg-notification-text strong {
    color: #ffd700;
    font-weight: 700;
}

@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(102, 126, 234, 0.9);
        transform: scale(1.02);
    }
}

.jqg-status-message.jqg-needs-points {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

/* ========================================
   USER STATS SECTION
   ======================================== */

.jqg-user-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   MODALS
   ======================================== */

.jqg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.jqg-modal.show {
    display: flex;
}

.jqg-modal-content {
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 0 20px rgba(102, 126, 234, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.jqg-modal-title {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 1rem;
    color: #fff;
    text-align: center;
    margin: 0 0 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
                 0 0 10px rgba(102, 126, 234, 0.5);
}

.jqg-modal-message {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.jqg-modal-choices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.jqg-choice-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.jqg-btn-powerup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.jqg-btn-powerup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.jqg-btn-rest {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.jqg-btn-rest:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.jqg-level-up-animation {
    animation: levelUpBurst 0.5s ease-out;
}

@keyframes levelUpBurst {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   SCORE POPUP (+1 ANIMATION)
   ======================================== */

.jqg-score-popup {
    position: fixed !important;
    z-index: 99999 !important;
    font-family: 'Pixelify Sans', 'Press Start 2P', 'Courier New', monospace !important;
    font-size: 6rem !important;
    font-weight: 700 !important;
    color: #ff0000 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: #ff0000 !important;
    background-clip: unset !important;
    pointer-events: none;
    animation: scoreFloat 3s ease-out forwards;
    line-height: 1 !important;
    white-space: nowrap;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Basic retro/pixel rendering - no smoothing */
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: none !important;
    -moz-osx-font-smoothing: unset !important;
    font-smooth: never !important;
    /* Basic pixel font - simple blocky style */
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    /* Simple black outline like retro games */
    text-shadow: 
        3px 3px 0 #000,
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        0 0 0 2px #000;
}

@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.8) translateY(-100px);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.jqg-pixel-shake {
    animation: pixelShake 0.5s ease-in-out;
}

@keyframes pixelShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* ========================================
   SPRITE CHARACTER & TUTORIAL WALKTHROUGH
   ======================================== */

/* Sprite character - pixelized stressed businessman (SIDE VIEW for walking) */
.jqg-sprite-character {
    width: 48px;
    height: 48px;
    position: absolute;
    z-index: 10002;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    animation: spriteRun 0.3s steps(2) infinite;
    /* Side view - walking right */
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8IS0tIFNJREUgVklFVyAtIFdBTEtJTkcgUklHSFQgLS0+CiAgPCEtLSBIZWFkIChzaWRlKSAtLT4KICA8cmVjdCB4PSIyMCIgeT0iOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiBmaWxsPSIjZmZkYmFjIi8+CiAgPCEtLSBIYWlyIChzaWRlLCBtZXNzeSkgLS0+CiAgPHJlY3QgeD0iMTgiIHk9IjgiIHdpZHRoPSIxNCIgaGVpZ2h0PSIzIiBmaWxsPSIjNTQzOTJhIi8+CiAgPHJlY3QgeD0iMTgiIHk9IjExIiB3aWR0aD0iMyIgaGVpZ2h0PSI0IiBmaWxsPSIjNTQzOTJhIi8+CiAgPCEtLSBFYXIgLS0+CiAgPHJlY3QgeD0iMjAiIHk9IjE0IiB3aWR0aD0iMiIgaGVpZ2h0PSIzIiBmaWxsPSIjZmZjYzk5Ii8+CiAgPCEtLSBFeWUgKHRpcmVkLCBzaWRlIHZpZXcpIC0tPgogIDxyZWN0IHg9IjI2IiB5PSIxMiIgd2lkdGg9IjIiIGhlaWdodD0iMSIgZmlsbD0iIzAwMCIvPgogIDwhLS0gQmFnIHVuZGVyIGV5ZSAtLT4KICA8cmVjdCB4PSIyNiIgeT0iMT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hLS0gQXJtIChiYWNrKSAtLT4KICA8cmVjdCB4PSIxOSIgeT0iMjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjgiIGZpbGw9IiMyYTNjNTQiLz4KICA8IS0tIExlZ3MgKHNpZGUgdmlldywgd2Fsa2luZykgLS0+CiAgPHJlY3QgeD0iMTkiIHk9IjQwIiB3aWR0aD0iNSIgaGVpZ2h0PSI4IiBmaWxsPSIjMzM0NDU1Ii8+CiAgPHJlY3QgeD0iMjYiIHk9IjQwIiB3aWR0aD0iNSIgaGVpZ2h0PSI4IiBmaWxsPSIjMzM0NDU1Ii8+Cjwvc3ZnPg==');
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* When stopped, switch to FRONT VIEW and face user */
.jqg-sprite-character.stopped {
    animation: spriteBounce 0.6s ease-in-out;
    /* Front view - facing user directly */
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8IS0tIEZST05UIFZJRVcgLSBGQUNJTkcgVVNFUiAtLT4KICA8IS0tIEhlYWQgKGZyb250KSAtLT4KICA8cmVjdCB4PSIxNiIgeT0iOCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSIjZmZkYmFjIi8+CiAgPCEtLSBIYWlyIChmcm9udCwgbWVzc3kpIC0tPgogIDxyZWN0IHg9IjE2IiB5PSI4IiB3aWR0aD0iMTYiIGhlaWdodD0iNCIgZmlsbD0iIzU0MzkyYSIvPgogIDxyZWN0IHg9IjE0IiB5PSI5IiB3aWR0aD0iMyIgaGVpZ2h0PSI1IiBmaWxsPSIjNTQzOTJhIi8+CiAgPHJlY3QgeD0iMzEiIHk9IjkiIHdpZHRoPSIzIiBoZWlnaHQ9IjUiIGZpbGw9IiM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S0gU2hpcnQgKGNvbGxhciwgZnJvbnQpIC0tPgogIDxyZWN0IHg9IjIwIiB5PSIyNyIgd2lkdGg9IjgiIGhlaWdodD0iNSIgZmlsbD0iI2VlZSIvPgogIDwhLS0gVGllICh1bmRvbmUvbG9vc2UsIGNyb29rZWQpIC0tPgogIDxyZWN0IHg9IjIyIiB5PSIzMiIgd2lkdGg9IjQiIGhlaWdodD0iOCIgZmlsbD0iI2NjMzMzMyIvPgogIDxyZWN0IHg9IjIzIiB5PSIzMyIgd2lkdGg9IjIiIGhlaWdodD0iMiIgZmlsbD0iIzg4MjIyMiIvPgogIDwhLS0gVGllIHNsaWdodGx5IGNyb29rZWQgLS0+CiAgPHJlY3QgeD0iMjUiIHk9IjM1IiB3aWR0aD0iMiIgaGVpZ2h0PSIzIiBmaWxsPSIjY2MzMzMzIi8+CiAgPCEtLSBBcm1zIChmcm9udCkgLS0+CiAgPHJlY3QgeD0iMTAiIHk9IjMwIiB3aWR0aD0iNCIgaGVpZ2h0PSI4IiBmaWxsPSIjMmEzYzU0Ii8+CiAgPHJlY3QgeD0iMzQiIHk9IjMwIiB3aWR0aD0iNCIgaGVpZ2h0PSI4IiBmaWxsPSIjMmEzYzU0Ii8+CiAgPCEtLSBMZWdzIChmcm9udCkgLS0+CiAgPHJlY3QgeD0iMTgiIHk9IjQzIiB3aWR0aD0iNiIgaGVpZ2h0PSI1IiBmaWxsPSIjMzM0NDU1Ii8+CiAgPHJlY3QgeD0iMjQiIHk9IjQzIiB3aWR0aD0iNiIgaGVpZ2h0PSI1IiBmaWxsPSIjMzM0NDU1Ii8+Cjwvc3ZnPg==');
    transform: none;
}

@keyframes spriteRun {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes spriteBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* Tutorial overlay with blur effect */
.jqg-tutorial-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.jqg-tutorial-overlay.show {
    display: block;
    opacity: 1;
}

/* Tutorial instruction box */
.jqg-tutorial-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10003;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    border: 3px solid rgba(255, 215, 0, 0.8);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8),
                0 0 50px rgba(255, 215, 0, 0.5),
                inset 0 0 30px rgba(255, 215, 0, 0.1);
    animation: tutorialPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes tutorialPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

.jqg-tutorial-sprite {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: tutorialSpriteBounce 1s ease-in-out infinite;
}

@keyframes tutorialSpriteBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.jqg-tutorial-title {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #ffd700;
    text-align: center;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(255, 215, 0, 0.6);
    line-height: 1.4;
}

.jqg-tutorial-message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.8;
    text-align: center;
    margin: 0 0 1.5rem 0;
    padding: 0 1rem;
}

.jqg-tutorial-progress {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.jqg-tutorial-btn {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.jqg-tutorial-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.7);
    background: linear-gradient(135deg, #ffee00 0%, #ffcc00 100%);
}

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

/* Magic content focused state (unblurred) */
.jqg-magic-focused {
    position: relative !important;
    z-index: 10002 !important;
    filter: none !important;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8),
                0 0 100px rgba(255, 215, 0, 0.5) !important;
    border: 2px solid rgba(255, 215, 0, 0.8) !important;
    border-radius: 8px;
}

/* Magic content highlight after tutorial */
.jqg-magic-highlight {
    animation: magicHighlight 1.5s ease-in-out 2;
    border: 2px solid #ffd700;
    border-radius: 8px;
}

@keyframes magicHighlight {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1),
                    0 0 60px rgba(255, 215, 0, 0.7);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .jqg-leaderboard {
        padding: 1rem;
    }
    
    .job-sidebar-title {
        font-size: 0.65rem;
    }
    
    .jqg-nickname {
        font-size: 0.75rem;
    }
    
    .jqg-score {
        font-size: 1.5rem;
    }
    
    .jqg-score-popup {
        font-size: 1.5rem;
    }
    
    .job-avatar-image {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .jqg-leaderboard {
        padding: 0.875rem;
    }
}
