 * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); height: 100vh; overflow: hidden; }

        /* Login Screen */
        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .login-box {
            background: white;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            width: 90%;
            max-width: 400px;
            text-align: center;
        }
        .login-title {
            font-size: 28px;
            margin-bottom: 10px;
            color: #2d3748;
        }
        .login-subtitle {
            color: #718096;
            margin-bottom: 30px;
        }
        .google-btn {
            width: 100%;
            padding: 12px 24px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            background: white;
            cursor: pointer;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            color: #4a5568;
            margin-bottom: 20px;
        }
        .google-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            border-color: #4285f4;
        }
        .google-icon {
            width: 20px;
            height: 20px;
            background-image: url("data:image/svg+xml,%3csvg width='18' height='18' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='%23000' fill-rule='evenodd'%3e%3cpath d='M9 3.48c1.69 0 2.83.73 3.48 1.34l2.54-2.48C13.46.89 11.43 0 9 0 5.48 0 2.44 2.02.96 4.96l2.91 2.26C4.6 5.05 6.62 3.48 9 3.48z' fill='%23EA4335'/%3e%3cpath d='M17.64 9.2c0-.74-.06-1.28-.19-1.84H9v3.34h4.96c-.1.83-.64 2.08-1.84 2.92l2.84 2.2c1.7-1.57 2.68-3.88 2.68-6.62z' fill='%234285F4'/%3e%3cpath d='M3.88 10.78A5.54 5.54 0 0 1 3.58 9c0-.62.11-1.22.29-1.78L.96 4.96A9.008 9.008 0 0 0 0 9c0 1.45.35 2.82.96 4.04l2.92-2.26z' fill='%23FBBC05'/%3e%3cpath d='M9 18c2.43 0 4.47-.8 5.96-2.18l-2.84-2.2c-.76.53-1.78.9-3.12.9-2.38 0-4.4-1.57-5.12-3.74L.97 13.04C2.45 15.98 5.48 18 9 18z' fill='%2334A853'/%3e%3c/g%3e%3c/svg%3e");
            background-size: contain;
            background-repeat: no-repeat;
        }
        .anonymous-btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.3s ease;
            background: linear-gradient(135deg, #a0aec0, #718096);
            color: white;
        }
        .anonymous-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        .divider {
            margin: 20px 0;
            text-align: center;
            position: relative;
        }
        .divider::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: #e2e8f0;
        }
        .divider span {
            background: white;
            padding: 0 15px;
            color: #718096;
        }

        /* Main App Styles */
        .app-container {
            display: none;
        }
        .container { 
            display: flex; 
            height: 100vh; 
            position: relative;
        }

        /* Sidebar styles with transition */
        .sidebar { 
            width: 320px; 
            background: rgba(255, 255, 255, 0.95); 
            backdrop-filter: blur(10px); 
            padding: 20px; 
            overflow-y: auto; 
            box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, width 0.3s ease;
            z-index: 100;
        }

        .sidebar.collapsed {
            transform: translateX(-100%);
            width: 0;
            padding: 0;
        }

        /* Toggle button */
        .sidebar-toggle {
            position: absolute;
            left: 320px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid rgba(0, 0, 0, 0.1);
            padding: 12px 10px;
            border-radius: 0 10px 10px 0;
            cursor: pointer;
            box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
            font-size: 18px;
            transition: all 0.3s ease;
            z-index: 10000;
            color: #2d3748;
            font-weight: bold;
            min-width: 40px;
            text-align: center;
        }

        .sidebar-toggle:hover {
            background: white;
            box-shadow: 3px 0 20px rgba(0, 0, 0, 0.3);
            transform: translateY(-50%) scale(1.05);
        }

        .sidebar.collapsed + .sidebar-toggle {
            left: 0;
            border-radius: 0 10px 10px 0;
        }

        .user-info {
            background: linear-gradient(135deg, #48bb78, #38a169);
            color: white;
            padding: 15px;
            border-radius: 12px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .user-avatar {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .user-photo {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.3);
        }
        .user-details h3 {
            margin-bottom: 5px;
            font-size: 14px;
        }
        .user-details p {
            font-size: 12px;
            opacity: 0.9;
        }
        .logout-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
        }
        .logout-btn:hover {
            background: rgba(255,255,255,0.3);
        }

        .logo { text-align: center; margin-bottom: 20px; }
        .logo h1 { color: #4a5568; font-size: 24px; margin-bottom: 5px; }
        .logo p { color: #718096; font-size: 14px; }
        .stats { background: linear-gradient(135deg, #4299e1, #3182ce); color: white; padding: 15px; border-radius: 12px; margin-bottom: 20px; text-align: center; }
        .stats h3 { margin-bottom: 10px; }
        .stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .stat-item { background: rgba(255, 255, 255, 0.2); padding: 8px; border-radius: 8px; font-size: 12px; }
        
        /* NUEVOS ESTILOS PARA FILTROS */
        .filters-section {
            background: linear-gradient(135deg, #805ad5, #6b46c1);
            color: white;
            border-radius: 12px;
            margin-bottom: 20px;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .filters-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
            cursor: pointer;
            user-select: none;
            transition: background-color 0.3s ease;
        }
        
        .filters-header:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .filters-title {
            margin: 0;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .filters-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .expand-arrow {
            font-size: 14px;
            transition: transform 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
        }
        
        .filters-section.collapsed .expand-arrow {
            transform: rotate(-90deg);
        }
        
        .toggle-all-btn {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 4px 8px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.3s ease;
        }
        
        .toggle-all-btn:hover {
            background: rgba(255,255,255,0.3);
        }
        
        .toggle-all-btn:active {
            transform: scale(0.95);
        }
        
        .filter-content {
            max-height: 200px;
            opacity: 1;
            transition: all 0.3s ease;
            overflow: hidden;
        }
        
        .filters-section.collapsed .filter-content {
            max-height: 0;
            opacity: 0;
            padding: 0;
        }
        
        .filter-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            padding: 0 15px 15px 15px;
            max-height: 180px;
            overflow-y: auto;
            overflow-x: hidden;
        }
        
        /* Estilos para la scrollbar */
        .filter-grid::-webkit-scrollbar {
            width: 4px;
        }
        
        .filter-grid::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
        }
        
        .filter-grid::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.4);
            border-radius: 2px;
        }
        
        .filter-grid::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.6);
        }
        
        .filter-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px;
            border-radius: 6px;
            background: rgba(255,255,255,0.1);
            transition: all 0.3s ease;
            min-height: 40px;
        }
        
        .filter-item:hover {
            background: rgba(255,255,255,0.2);
        }
        
        .filter-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: white;
            flex-shrink: 0;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            border: 2px solid rgba(255, 255, 255, 0.6);
            border-radius: 3px;
            background: transparent;
            position: relative;
            outline: none;
        }
        
        .filter-checkbox:checked {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(255, 255, 255, 0.9);
        }
        
        .filter-checkbox:checked::after {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #6b46c1;
            font-size: 12px;
            font-weight: bold;
            line-height: 1;
        }
        
        .filter-checkbox:focus {
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
        }
        
        .filter-label {
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            user-select: none;
            flex: 1;
            line-height: 1.2;
        }
        
        /* Mejora para dispositivos táctiles */
        @media (hover: none) and (pointer: coarse) {
            .filter-item {
                min-height: 44px;
                padding: 10px;
            }
            
            .filter-checkbox {
                width: 20px;
                height: 20px;
                border-width: 2px;
            }
            
            .filter-checkbox:checked::after {
                font-size: 14px;
            }
            
            .filter-label {
                font-size: 13px;
            }
            
            .filter-item:active {
                background: rgba(255,255,255,0.3);
                transform: scale(0.98);
            }
        }
        
        .add-marker-section { margin-bottom: 20px; }
        .section-title { font-size: 16px; font-weight: 600; color: #2d3748; margin-bottom: 15px; display: flex; align-items: center; }
        .marker-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
        .marker-btn { padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 500; transition: all 0.3s ease; display: flex; flex-direction: column; align-items: center; gap: 5px; }
        .marker-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
        .hot-zone { background: linear-gradient(135deg, #fc8181, #f56565); color: white; }
        .delay { background: linear-gradient(135deg, #fbd38d, #f6ad55); color: white; }
        .break { background: linear-gradient(135deg, #68d391, #48bb78); color: white; }
        .help { background: linear-gradient(135deg, #f687b3, #ed64a6); color: white; }
        .unsafe-zone { background: linear-gradient(135deg, #e53e3e, #c53030); color: white; }
        .police { background: linear-gradient(135deg, #3182ce, #2c5282); color: white; }
        .buy-sell { background: linear-gradient(135deg, #4fd1c7, #38b2ac); color: white; }
        .dead-zone { background: linear-gradient(135deg, #a0aec0, #718096); color: white; }
        .recent-reports { margin-top: 20px; }
        .report-item { background: rgba(255, 255, 255, 0.7); padding: 12px; margin-bottom: 8px; border-radius: 8px; border-left: 4px solid #4299e1; font-size: 12px; }
        .report-time { color: #718096; font-size: 10px; }
        .report-author { color: #4299e1; font-weight: 500; font-size: 10px; }

        .map-container { 
            flex: 1; 
            position: relative;
            transition: margin-left 0.3s ease;
        }

        .sidebar.collapsed ~ .map-container {
            margin-left: 0;
        }

        #map { 
            height: 100%; 
            border-radius: 0; 
            z-index: 1; 
        }
        .floating-controls { position: absolute; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
        .control-btn { background: rgba(255, 255, 255, 0.9); border: none; padding: 12px; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); font-size: 16px; transition: all 0.3s ease; }
        .control-btn:hover { background: white; transform: scale(1.1); }
        .custom-popup { font-family: inherit; }
        .popup-header { font-weight: 600; margin-bottom: 8px; color: #2d3748; }
        .popup-time { color: #718096; font-size: 12px; margin-top: 5px; }
        .popup-author { color: #4299e1; font-size: 11px; font-weight: 500; }
        .popup-votes { margin-top: 8px; display: flex; gap: 5px; }
        .vote-btn { padding: 4px 8px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
        .vote-up { background: #68d391; color: white; }
        .vote-down { background: #fc8181; color: white; }
        .modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(5px); }
        .modal-content { background-color: white; margin: 15% auto; padding: 30px; border-radius: 15px; width: 90%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
        .modal-header { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: #2d3748; }
        .form-group { margin-bottom: 20px; text-align: left; }
        .form-group label { display: block; margin-bottom: 8px; color: #4a5568; font-weight: 500; }
        .form-group input, .form-group textarea { width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 16px; transition: border-color 0.3s ease; resize: vertical; }
        .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #4299e1; }
        .modal-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
        .btn-modal { padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; }
        .btn-modal:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
        .btn-primary { background: linear-gradient(135deg, #4299e1, #3182ce); color: white; }
        .btn-secondary { background: #f7fafc; color: #4a5568; border: 2px solid #e2e8f0; }
        .error-message { color: #e53e3e; font-size: 14px; margin-top: 10px; text-align: center; }
        .loading { opacity: 0.6; pointer-events: none; }

        @media (max-width: 768px) { 
            .sidebar { width: 280px; } 
            .sidebar-toggle { left: 280px; }
            .sidebar.collapsed + .sidebar-toggle { left: 0; }
            .login-box { margin: 20px; padding: 30px; }
            
            /* Mejoras específicas para filtros en móvil */
            .filter-grid {
                grid-template-columns: 1fr;
                gap: 12px;
                max-height: 240px; /* Aumentado para móvil */
                padding: 0 18px 18px 18px;
            }
            
            /* Scrollbar más visible en móvil */
            .filter-grid::-webkit-scrollbar {
                width: 6px;
            }
            
            .filter-grid::-webkit-scrollbar-thumb {
                background: rgba(255, 255, 255, 0.5);
                border-radius: 3px;
            }
            
            .filters-header {
                padding: 18px;
            }
            
            .filters-header h3 {
                font-size: 15px;
            }
            
            .filter-content {
                max-height: 280px; /* Aumentado para móvil */
            }
            
            .toggle-all-btn {
                padding: 6px 12px;
                font-size: 12px;
                min-height: 32px;
            }
            
            /* Indicador visual de scroll */
            .filter-grid::after {
                content: '';
                position: sticky;
                bottom: 0;
                left: 0;
                right: 0;
                height: 20px;
                background: linear-gradient(transparent, rgba(107, 70, 193, 0.8));
                pointer-events: none;
                margin: -15px -18px 0 -18px;
                border-radius: 0 0 12px 12px;
            }
        }

        .custom-popup .popup-header {
            font-weight:bold;
            margin-bottom:4px;
        }

        .custom-popup .comment {
            border-bottom:1px dotted #ddd;
            padding:2px 0;
        }

        .custom-popup .comment:last-child {
            border-bottom:none;
        }


.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}
.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}
.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.8);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.8);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}
.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    color: white;
    font-weight: bold;
}
.marker-cluster span {
    line-height: 30px;
}

.logo-container {
  display: flex;             /* logo a la izquierda, texto a la derecha */
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;        /* separación con lo de abajo */
  text-align: left;
}

.logo-img {
  max-width: 100px;           /* ajustá según el espacio */
  height: auto;
}

.logo-text h1 {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 33px;
  font-weight: 700;
  color: #2D3748;
  margin: 0 0 4px 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.logo-text p {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #718096;
  margin: 0;
  letter-spacing: 0.3px;
}

.pioneer-badge { 
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
    animation: shine 2s ease-in-out infinite;
}
.pioneer-badge img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}
@keyframes shine {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Estilos para los enlaces legales en la pantalla de login */
.legal-links {
    text-align: center;
    margin-top: 25px; /* Aumenta el espacio con el botón de arriba */
    font-size: 12px;  /* Texto más pequeño */
    color: #718096;   /* Un color gris sutil, como el del subtítulo */
}

.legal-links a {
    color: #4a5568; /* Un color un poco más oscuro para que resalte */
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: #2d3748; /* Color más oscuro al pasar el mouse */
}

/* ESTILOS PARA EL BOTÓN Y MODAL DE RANKING */
.ranking-button-container {
    margin: 15px 0;
    cursor: pointer;
}

.ranking-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f6ad55, #ed8936);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.ranking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.ranking-btn:active {
    transform: translateY(0);
}

/* Modal de Ranking */
.ranking-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ranking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.close-ranking-btn {
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-ranking-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
    transform: rotate(90deg);
}

.ranking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ranking-tab {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    transition: all 0.3s ease;
}

.ranking-tab:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.ranking-tab.active {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border-color: #3182ce;
}

.ranking-content {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.ranking-loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-size: 14px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ranking-item:hover {
    transform: translateX(5px);
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ranking-item.top-3 {
    background: linear-gradient(135deg, #fef5e7, #fdeaa8);
    border-color: #f6ad55;
}

.ranking-item.current-user {
    background: linear-gradient(135deg, #e6fffa, #b2f5ea);
    border-color: #4fd1c7;
}

.ranking-position {
    font-size: 24px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.ranking-item.top-3 .ranking-position {
    font-size: 28px;
}

.ranking-position.gold { color: #f6ad55; }
.ranking-position.silver { color: #a0aec0; }
.ranking-position.bronze { color: #ed8936; }

.ranking-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0,0,0,0.1);
}

.ranking-avatar-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    border: 2px solid rgba(0,0,0,0.1);
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ranking-stats {
    font-size: 12px;
    color: #718096;
}

.ranking-value {
    font-size: 18px;
    font-weight: 700;
    color: #4299e1;
    min-width: 60px;
    text-align: right;
}

.ranking-item.top-3 .ranking-value {
    color: #ed8936;
}

.ranking-item.current-user .ranking-value {
    color: #38b2ac;
}

.ranking-empty {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.ranking-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .ranking-modal {
        max-width: 90%;
        margin: 10% auto;
    }

    .ranking-item {
        padding: 12px;
        gap: 10px;
    }

    .ranking-position {
        font-size: 20px;
        min-width: 35px;
    }

    .ranking-avatar,
    .ranking-avatar-placeholder {
        width: 40px;
        height: 40px;
    }

    .ranking-name {
        font-size: 14px;
    }

    .ranking-value {
        font-size: 16px;
    }
}

/* Estilos especiales para popup de pedidos de locales */
.order-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.order-popup .popup-header {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Animaciones para botón de instalación PWA */
@keyframes slideIn {
    from {
        transform: translateX(150%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(150%);
        opacity: 0;
    }
}

/* Hover effect para el botón de instalación */
#installBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

#installBtn:active {
    transform: translateY(0);
}

/* ESTILOS PARA EL BOTÓN Y MODAL DE RANKING */
.ranking-button-container {
    margin: 15px 0;
    cursor: pointer;
}

.ranking-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f6ad55, #ed8936);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.ranking-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.ranking-btn:active {
    transform: translateY(0);
}

/* Botones de Redes Sociales */
.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin: 15px 0 20px 0;
}

.social-btn {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.social-btn img {
    width: 50%;
    height: 50%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover img {
    transform: scale(1.1);
}

.tiktok-btn {
    background: #000000;
}

.tiktok-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.tiktok-btn:hover img {
    transform: scale(1.1);
}

.social-btn:active {
    transform: translateY(-1px);
}

/* ==============================================
   ESTILOS DEL CHAT GLOBAL
   ============================================== */

/* Botón Flotante (FAB) */
.chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 2000; /* Más alto que el mapa pero menos que los modales */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.5);
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
}

.chat-fab:active {
    transform: scale(0.95);
}

/* Ajuste cuando el sidebar está colapsado */
.sidebar.collapsed ~ .map-container ~ .chat-fab {
    right: 20px; /* Mantiene la misma posición */
}

/* Modal del Chat */
.chat-modal-content {
    width: 90%;
    max-width: 600px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    padding: 0; /* Header se encarga del padding superior */
}

/* Área de Mensajes */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.chat-loading {
    margin: auto;
    color: #718096;
    font-style: italic;
}

/* Mensaje Individual */
.chat-message {
    background-color: #ffffff;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    max-width: 80%;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chat-message-author {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.chat-message-author .pioneer-badge {
    margin-left: 5px;
    width: 16px;
    height: 16px;
}

.chat-message-text {
    font-size: 14px;
    color: #2d3748;
    word-wrap: break-word;
}

.chat-message-time {
    font-size: 10px;
    color: #a0aec0;
    margin-top: 5px;
    text-align: right;
}

/* Mensaje Enviado (propio) */
.chat-message.sent {
    background-color: #dcf8c6; /* Verde claro */
    align-self: flex-end;
    border-color: #c8e6b0;
}

.chat-message.sent .chat-message-author {
    color: #38a169; /* Verde oscuro */
}

/* Área de Input */
.chat-input-container {
    display: flex;
    padding: 15px;
    background-color: #ffffff;
}

#chatInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chatInput:focus {
    border-color: #3182ce;
}

#sendChatBtn {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#sendChatBtn:hover {
    background-color: #2b6cb0;
}

/* 🚀 NUEVO: Estilos para el Modal de Bienvenida */
.welcome-modal-content {
    max-width: 500px;
    text-align: left;
    line-height: 1.6;
}

.welcome-modal-content p {
    color: #4a5568;
    margin-bottom: 15px;
}

.welcome-modal-content p:last-child {
    margin-bottom: 0;
}

.welcome-modal-content strong {
    color: #2d3748;
}

.welcome-modal-content .modal-header {
    text-align: center;
    margin-bottom: 25px;
    font-size: 22px;
}

/* ==============================================
   ESTILOS PARA CAMBIAR NOMBRE
   ============================================== */

/* Contenedor del nombre y el botón */
.user-details h3 {
    display: inline; /* Hace que el <span> se ponga al lado */
    margin-right: 8px; /* Espacio entre el nombre y el lápiz */
}

/* Botón de editar nombre */
#editNameBtn {
    font-size: 14px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    display: none; /* Oculto por defecto, JS lo mostrará */
}

#editNameBtn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* ... (todos tus estilos anteriores) ... */

/* Estilo para el nuevo botón de reportar alerta */
.report-alert-btn {
    font-size: 16px; /* Tamaño del emoji */
    background: none;
    border: none;
    color: #a0aec0; /* Un gris sutil */
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.2s ease;
}

.report-alert-btn:hover {
    color: #e53e3e; /* Rojo al pasar el mouse */
    background-color: #fef2f2; /* Fondo rojo muy claro */
    transform: scale(1.1);
}