/* ============================================
   NEET HUB — NEET Map Styles
   ============================================ */

.map-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 1rem 2rem;
}

/* ============================================
   HEADER
   ============================================ */

.map-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.map-header-content h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.map-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.map-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.map-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   MAP CONTAINER
   ============================================ */

.map-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 245, 255, 0.2);
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.1), inset 0 0 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

#neetMap {
    width: 100%;
    height: 500px;
    background: #0a0a0f;
    z-index: 1;
}

.map-overlay-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.overlay-icon {
    font-size: 1rem;
}

/* ============================================
   NEON MARKERS
   ============================================ */

.neet-marker {
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pulse {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 245, 255, 0.15);
    animation: markerPulse 2s ease-in-out infinite;
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes markerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.1; }
}

.marker-dot {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.9), rgba(0, 245, 255, 0.3));
    border: 2px solid rgba(0, 245, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.6), 0 0 30px rgba(0, 245, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
}

.marker-dot:hover {
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.8), 0 0 50px rgba(0, 245, 255, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

.marker-count {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.75rem;
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* ============================================
   MAP POPUP
   ============================================ */

.neet-popup-container .leaflet-popup-content-wrapper {
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 245, 255, 0.3) !important;
    border-radius: 10px !important;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2) !important;
    color: #fff !important;
}

.neet-popup-container .leaflet-popup-tip {
    background: rgba(10, 10, 15, 0.95) !important;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.neet-popup {
    text-align: center;
    padding: 0.5rem;
    min-width: 120px;
}

.popup-region {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--neon-cyan);
    margin-bottom: 0.2rem;
}

.popup-country {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.popup-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-green);
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   LOCATION CARD
   ============================================ */

.location-card {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(57, 255, 20, 0.05));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.location-card-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.location-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.location-details {
    flex: 1;
}

.location-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.location-value {
    font-weight: 600;
    color: var(--neon-cyan);
    font-size: 1rem;
}

.location-refresh,
.location-remove {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-refresh:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
}

.location-remove:hover {
    border-color: #ff4757;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* ============================================
   SIGN IN PROMPT
   ============================================ */

.map-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(184, 41, 227, 0.08);
    border: 1px dashed rgba(184, 41, 227, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.signin-icon {
    font-size: 1.2rem;
}

.signin-btn {
    padding: 0.5rem 1.5rem;
    background: var(--neon-purple);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.signin-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

/* ============================================
   LEADERBOARD
   ============================================ */

.map-leaderboard {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6), rgba(18, 18, 26, 0.6));
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

.leaderboard-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: background 0.3s;
}

.leaderboard-row:hover {
    background: rgba(0, 245, 255, 0.05);
}

.lb-rank {
    font-size: 1.1rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.lb-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lb-region {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.lb-country {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.lb-count {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 12px rgba(0, 245, 255, 0.4);
    flex-shrink: 0;
}

.leaderboard-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   LEAFLET OVERRIDES
   ============================================ */

.leaflet-control-zoom a {
    background: rgba(10, 10, 15, 0.9) !important;
    color: var(--neon-cyan) !important;
    border-color: rgba(0, 245, 255, 0.2) !important;
    font-weight: 700;
    transition: background 0.3s, color 0.3s;
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 245, 255, 0.15) !important;
    color: #fff !important;
}

.leaflet-control-attribution {
    background: rgba(10, 10, 15, 0.7) !important;
    color: var(--text-muted) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.6rem !important;
    border-radius: 4px 0 0 0;
}

/* ============================================
   TOAST (same as other pages)
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success { background: rgba(57, 255, 20, 0.15); border: 1px solid rgba(57, 255, 20, 0.3); color: var(--neon-green); }
.toast-error { background: rgba(255, 71, 87, 0.15); border: 1px solid rgba(255, 71, 87, 0.3); color: #ff4757; }
.toast-info { background: rgba(0, 245, 255, 0.15); border: 1px solid rgba(0, 245, 255, 0.3); color: var(--neon-cyan); }

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

@media (max-width: 768px) {
    .map-page {
        padding: 70px 0.75rem 1.5rem;
    }

    .map-header-content h1 {
        font-size: 2rem;
    }

    .map-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    #neetMap {
        height: 400px;
    }

    .map-signin {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .map-header-content h1 {
        font-size: 1.5rem;
    }

    .map-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    #neetMap {
        height: 300px;
    }

    .location-card {
        padding: 0.8rem 1rem;
    }

    .location-card-inner {
        gap: 0.75rem;
    }

    .leaderboard-row {
        padding: 0.6rem 0.8rem;
    }
}
