/* ==================== MODERN KID-FRIENDLY SCOREBOARD STYLING ==================== */
.country-flag {
    width: 20px;
    height: 15px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin-left: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scoreboard-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 25%, #bae6fd 50%, #7dd3fc 75%, #38bdf8 100%);
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 20px 40px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: scoreboard-entrance 0.8s ease-out;
}

@keyframes scoreboard-entrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scoreboard-grid-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
    z-index: 0;
    animation: scoreboard-grid-float 20s ease-in-out infinite;
}

@keyframes scoreboard-grid-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.scoreboard-content {
    position: relative;
    z-index: 1;
}

/* ==================== MAIN TITLE STYLING ==================== */
.scoreboard-main-title-container {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
    position: relative;
    animation: scoreboard-main-title-entrance 0.8s ease-out;
}

@keyframes scoreboard-main-title-entrance {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    50% {
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scoreboard-main-title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
    border-radius: 2px;
    animation: scoreboard-main-title-line 1.2s ease-out 0.3s both;
}

@keyframes scoreboard-main-title-line {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 120px;
        opacity: 1;
    }
}

.scoreboard-main-title-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: scoreboard-main-title-icon-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.3));
}

@keyframes scoreboard-main-title-icon-bounce {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(5deg); 
    }
    50% { 
        transform: translateY(-15px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-10px) rotate(-5deg); 
    }
}

.scoreboard-main-title-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 30%, #d97706 60%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(251, 191, 36, 0.2);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    animation: scoreboard-main-title-text-glow 3s ease-in-out infinite;
}

@keyframes scoreboard-main-title-text-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.5));
    }
}

.scoreboard-main-title-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #64748b;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scoreboard-main-title-subtitle-fade 0.8s ease-out 0.6s both;
    font-style: italic;
}

@keyframes scoreboard-main-title-subtitle-fade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== WIDGET TITLE STYLING ==================== */
.scoreboard-widget-title-container {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    position: relative;
    animation: scoreboard-widget-title-entrance 0.6s ease-out;
}

@keyframes scoreboard-widget-title-entrance {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scoreboard-widget-title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #059669, #047857);
    border-radius: 2px;
    animation: scoreboard-widget-title-line 1s ease-out 0.2s both;
}

@keyframes scoreboard-widget-title-line {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 80px;
        opacity: 1;
    }
}

.scoreboard-widget-title-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    animation: scoreboard-widget-title-icon-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 3px 6px rgba(16, 185, 129, 0.3));
}

@keyframes scoreboard-widget-title-icon-bounce {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-6px) rotate(3deg); 
    }
    50% { 
        transform: translateY(-10px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-6px) rotate(-3deg); 
    }
}

.scoreboard-widget-title-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 30%, #047857 60%, #065f46 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 3px 6px rgba(16, 185, 129, 0.2);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
    animation: scoreboard-widget-title-text-glow 3s ease-in-out infinite;
}

@keyframes scoreboard-widget-title-text-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 3px rgba(16, 185, 129, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 10px rgba(5, 150, 105, 0.4));
    }
}

.scoreboard-widget-title-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #64748b;
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scoreboard-widget-title-subtitle-fade 0.6s ease-out 0.4s both;
    font-style: italic;
}

@keyframes scoreboard-widget-title-subtitle-fade {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scoreboard-no-activity {
    color: #64748b;
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    animation: scoreboard-no-activity-fade 0.6s ease-out;
}

@keyframes scoreboard-no-activity-fade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.scoreboard-table-cell {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
    padding: 1rem;
    transition: all 0.3s ease;
    animation: scoreboard-row-entrance 0.6s ease-out;
}

@keyframes scoreboard-row-entrance {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.scoreboard-profile-img {
    padding: 4px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.scoreboard-profile-img:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}

.scoreboard-username {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.scoreboard-grade {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
}

.scoreboard-activity {
    color: #374151;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

.scoreboard-points-chip {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    animation: scoreboard-points-pulse 2s ease-in-out infinite;
}

@keyframes scoreboard-points-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    }
}

.scoreboard-table {
    background: transparent !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1) !important;
}

.scoreboard-table .mud-table-container {
    background: transparent !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.scoreboard-table .mud-table {
    background: transparent !important;
}

.scoreboard-table thead {
    background: transparent !important;
    display: none;
}

.scoreboard-table tbody {
    background: transparent !important;
}

.scoreboard-table tbody tr {
    transition: all 0.3s ease !important;
    background: transparent !important;
    border-radius: 16px !important;
    margin-bottom: 0.5rem !important;
}

.scoreboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2) !important;
}

.scoreboard-table td {
    background: transparent !important;
    border: none !important;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.points-chip {
    font-weight: 700;
    box-shadow: 0 0 16px rgba(76, 175, 80, 0.35);
}

.muted {
    color: #64748b;
}

.view-scoreboard-btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 0.75rem 2rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.3s ease !important;
    animation: scoreboard-btn-pulse 2s ease-in-out infinite;
}

@keyframes scoreboard-btn-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    }
}

.view-scoreboard-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4) !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .scoreboard-main-title-container {
        padding: 1rem 0;
        margin-bottom: 1.5rem;
    }
    
    .scoreboard-main-title-icon {
        font-size: 3rem;
    }
    
    .scoreboard-main-title-text {
        font-size: 2rem;
    }
    
    .scoreboard-main-title-subtitle {
        font-size: 1rem;
    }
    
    .scoreboard-widget-title-container {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }
    
    .scoreboard-widget-title-icon {
        font-size: 2rem;
    }
    
    .scoreboard-widget-title-text {
        font-size: 1.25rem;
    }
    
    .scoreboard-widget-title-subtitle {
        font-size: 0.85rem;
    }
    
    .scoreboard-table-cell {
        padding: 0.75rem;
    }
    
    .scoreboard-profile-img {
        width: 36px;
        height: 36px;
    }
    
    .scoreboard-username {
        font-size: 1rem;
    }
    
    .scoreboard-activity {
        font-size: 0.9rem;
    }
    
    .scoreboard-grade {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .scoreboard-main-title-container {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }
    
    .scoreboard-main-title-icon {
        font-size: 2.5rem;
    }
    
    .scoreboard-main-title-text {
        font-size: 1.75rem;
    }
    
    .scoreboard-main-title-subtitle {
        font-size: 0.9rem;
    }
    
    .scoreboard-widget-title-container {
        padding: 0.5rem 0;
        margin-bottom: 0.75rem;
    }
    
    .scoreboard-widget-title-icon {
        font-size: 1.75rem;
    }
    
    .scoreboard-widget-title-text {
        font-size: 1.1rem;
    }
    
    .scoreboard-widget-title-subtitle {
        font-size: 0.8rem;
    }
    
    .scoreboard-container {
        padding: 1rem !important;
    }
    
    .scoreboard-table-cell {
        padding: 0.5rem;
    }
    
    .user-cell {
        gap: 0.75rem;
    }
    
    .scoreboard-profile-img {
        width: 32px;
        height: 32px;
    }
}

/* Mobile responsive styles for scoreboard */
@media (max-width: 960px) {
    /* Make data labels more visible on mobile */
    .scoreboard-table td::before {
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        font-size: 0.875rem !important;
    }

    /* Ensure user cell stacks properly on mobile */
    .user-cell {
        gap: 12px;
    }

    /* Better spacing for mobile table cells */
    .scoreboard-table-cell {
        padding: 12px 8px !important;
    }

    /* Make the profile image slightly smaller on mobile */
    .scoreboard-profile-img {
        width: 36px;
        height: 36px;
    }

    /* Increase text size for better readability */
    .scoreboard-username {
        font-size: 0.95rem !important;
    }

    .scoreboard-activity {
        font-size: 0.9rem !important;
    }

    .scoreboard-grade {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 600px) {
    /* Extra small screens - make labels even more prominent */
    .scoreboard-table td::before {
        font-size: 0.8rem !important;
        margin-bottom: 4px;
        display: block;
    }

    .scoreboard-container {
        padding: 12px !important;
    }

    .scoreboard-title {
        font-size: 1rem !important;
    }
}
/* Removed light mode media query to maintain gradient across all themes */