/* Player Stats Modal - Enhanced Mobile Styling */

/* Modal base styling */
#player-modal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Avatar pixel-perfect rendering */
.minecraft-pixel-art {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Better responsive text sizing */
@media (max-width: 640px) {
    #player-modal h3 {
        font-size: 1.5rem !important;
    }
    
    #player-modal .text-lg {
        font-size: 1rem !important;
    }
    
    #player-modal .text-xl {
        font-size: 1.25rem !important;
    }
    
    /* Compact stats grid for mobile */
    #player-modal .grid.grid-cols-1.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Smaller padding on mobile */
    #player-modal .p-4 {
        padding: 0.75rem !important;
    }
    
    /* Better stat row spacing */
    #player-modal .space-y-2 > * + * {
        margin-top: 0.5rem !important;
    }
    
    /* Smaller icons on mobile */
    #player-modal .fa-fire,
    #player-modal .fa-coins,
    #player-modal .fa-clock,
    #player-modal .fa-info-circle,
    #player-modal .fa-server,
    #player-modal .fa-chart-line {
        font-size: 0.875rem !important;
    }
}

/* Better modal backdrop */
#player-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Smooth animations */
#player-modal .rounded-xl {
    transition: all 0.2s ease-in-out;
}

#player-modal .rounded-xl:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Better focus states */
#player-modal button:focus {
    outline: 2px solid rgb(34, 197, 94);
    outline-offset: 2px;
}

/* Icon spacing improvements */
.fas + span {
    margin-left: 0.25rem;
}

/* Better text contrast on dark backgrounds */
#player-modal .text-gray-400 {
    color: rgb(156 163 175) !important;
}

#player-modal .text-gray-200 {
    color: rgb(229 231 235) !important;
}

/* Reusable stat layout helpers for perfect line alignment */
#player-modal .stat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#player-modal .stat-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

#player-modal .stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0; /* 10px vertical rhythm */
    border-bottom: 1px solid rgba(55, 65, 81, 0.35); /* gray-700/35 */
    line-height: 1.4;
}

#player-modal .stat-rows .stat-row:last-child {
    border-bottom: 0;
}

#player-modal .stat-label {
    color: rgb(156 163 175); /* gray-400 */
    font-weight: 600;
    font-size: 0.875rem; /* text-sm */
}

#player-modal .stat-value {
    color: rgb(229 231 235); /* gray-200 */
    font-size: 0.875rem;
    text-align: right;
}

#player-modal .stat-value-strong {
    font-weight: 700;
}

#player-modal .stat-value-accent {
    color: rgb(96 165 250); /* blue-400 */
    font-weight: 600;
}

#player-modal .stat-value-warn {
    color: rgb(251 146 60); /* orange-400 */
}

/* Responsive font sizing for stats */
@media (max-width: 768px) {
    #player-modal .font-bold.text-2xl {
        font-size: 1.75rem !important;
    }
    
    #player-modal .font-bold.text-xl {
        font-size: 1.25rem !important;
    }
}

/* Better spacing for quick stats */
#player-modal .flex.flex-wrap.justify-center {
    gap: 0.5rem;
}

@media (min-width: 640px) {
    #player-modal .flex.flex-wrap.justify-center {
        gap: 0.75rem;
    }
}

/* Improved UUID display */
#player-modal .break-all {
    word-break: break-all;
    line-height: 1.4;
}

/* Better border styling */
#player-modal .border-gray-700-30 {
    border-color: rgba(55, 65, 81, 0.3) !important;
}

/* Loading states */
.player-stats-loading {
    opacity: 0.6;
    pointer-events: none;
}

.player-stats-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Better scrollbar for modal content */
#player-modal .overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

#player-modal .overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.3);
    border-radius: 4px;
}

#player-modal .overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.6);
    border-radius: 4px;
}

#player-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}
